From f637f2da8b4a4ebc3b673d6953b6da71aaf3d003 Mon Sep 17 00:00:00 2001 From: dk14 Date: Mon, 25 Jan 2021 21:39:48 +0700 Subject: [PATCH] fix eta --- marlowe-actus/src/Language/Marlowe/ACTUS/Analysis.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/marlowe-actus/src/Language/Marlowe/ACTUS/Analysis.hs b/marlowe-actus/src/Language/Marlowe/ACTUS/Analysis.hs index 76b18fa407a..d255f3fefb9 100644 --- a/marlowe-actus/src/Language/Marlowe/ACTUS/Analysis.hs +++ b/marlowe-actus/src/Language/Marlowe/ACTUS/Analysis.hs @@ -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 = 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 @@ -33,7 +33,7 @@ postProcessSchedule ct s = simillarity (_, l) (_, r) = calculationDay l == calculationDay r regroup = L.groupBy simillarity overwrite = map (L.head . sortOn priority) . regroup - in (overwrite . trim) s + in overwrite . trim sampleCashflows :: (Day -> RiskFactors) -> ContractTerms -> [CashFlow]