Skip to content

Commit

Permalink
fix-stylish haskell
Browse files Browse the repository at this point in the history
  • Loading branch information
dk14 committed Jan 21, 2021
1 parent 36380b3 commit e9d83c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions marlowe-actus/src/Language/Marlowe/ACTUS/Analysis.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# LANGUAGE RecordWildCards #-}
module Language.Marlowe.ACTUS.Analysis(sampleCashflows, genProjectedCashflows, genZeroRiskAssertions) where

import qualified Data.List as L (scanl, tail, zip, dropWhile, groupBy, head)
import qualified Data.List as L (dropWhile, groupBy, head, scanl, tail, zip)
import qualified Data.Map as M (fromList, lookup)
import Data.Maybe (fromJust, fromMaybe)
import Data.Sort (sortOn)
Expand All @@ -25,7 +25,7 @@ genProjectedCashflows :: ContractTerms -> [CashFlow]
genProjectedCashflows = sampleCashflows (const $ RiskFactors 1.0 1.0 1.0 0.0)

postProcessSchedule :: ContractTerms -> [(EventType, ShiftedDay)] -> [(EventType, ShiftedDay)]
postProcessSchedule ct s =
postProcessSchedule ct s =
let trim = L.dropWhile (\(_, d) -> calculationDay d < ct_SD ct)
prioritised = [AD, IED, PR, PI, PRF, PY, FP, PRD, TD, IP, IPCI, IPCB, RR, PP, CE, MD, RRF, SC, STD, DV, XD, MR]
priority :: (EventType, ShiftedDay) -> Integer
Expand All @@ -47,7 +47,7 @@ sampleCashflows riskFactors terms =
scheduleEvent e = preserveDate e <$> getSchedule e
events = sortOn (paymentDay . snd) $ concatMap scheduleEvent eventTypes
events' = postProcessSchedule terms events

applyStateTransition (st, ev, date) (ev', date') =
(stateTransition ev (riskFactors $ calculationDay date) terms st (calculationDay date), ev', date')
calculatePayoff (st, ev, date) =
Expand Down

0 comments on commit e9d83c9

Please sign in to comment.