From dcd260f6fd1f59bd2efa05f3abbbd4cb3a0587b1 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sat, 10 Jun 2023 21:38:13 -0400 Subject: [PATCH] FIX update types --- dhall/common.dhall | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/dhall/common.dhall b/dhall/common.dhall index b8c96d0..b20c534 100644 --- a/dhall/common.dhall +++ b/dhall/common.dhall @@ -4,10 +4,10 @@ let List/map = let T = ./Types.dhall -let nullSplit = +let nullEntry = \(a : T.EntryAcntGetter) -> \(c : T.EntryCurGetter) -> - T.EntryGetter::{ eAcnt = a, eCurrency = c, eTags = [] : List T.TagID } + T.ToEntryGetter::{ eAcnt = a, eCurrency = c, eTags = [] : List T.TagID } let nullOpts = T.TxOpts::{=} @@ -86,33 +86,33 @@ let mRngYMD = \(r : Natural) -> T.DateMatcher.In { _1 = T.YMDMatcher.YMD (greg y m d), _2 = r } -let PartSplit = { _1 : T.AcntID, _2 : Double, _3 : Text } +let PartEntry = { _1 : T.AcntID, _2 : Double, _3 : Text } let partN = \(c : T.EntryCurGetter) -> \(a : T.EntryAcntGetter) -> \(comment : Text) -> - \(ss : List PartSplit) -> - let toSplit = - \(x : PartSplit) -> - nullSplit (T.EntryAcntGetter.ConstT x._1) c + \(ss : List PartEntry) -> + let toEntry = + \(x : PartEntry) -> + nullEntry (T.EntryAcntGetter.ConstT x._1) c // { eValue = Some (T.EntryNumGetter.ConstN x._2) , eComment = x._3 } - in [ nullSplit a c // { eComment = comment } ] - # List/map PartSplit T.EntryGetter.Type toSplit ss + in [ nullEntry a c // { eComment = comment } ] + # List/map PartEntry T.ToEntryGetter.Type toEntry ss let part1 = \(c : T.EntryCurGetter) -> \(a : T.EntryAcntGetter) -> \(comment : Text) -> - partN c a comment ([] : List PartSplit) + partN c a comment ([] : List PartEntry) let part1_ = \(c : T.EntryCurGetter) -> \(a : T.EntryAcntGetter) -> - partN c a "" ([] : List PartSplit) + partN c a "" ([] : List PartEntry) let addDay = \(x : T.GregorianM) -> @@ -135,7 +135,7 @@ let mvDenP = \(x : Natural) -> mvP // { vmDen = Some x } let mvDenN = \(x : Natural) -> mvN // { vmDen = Some x } -in { nullSplit +in { nullEntry , nullMatch , nullVal , nullOpts @@ -170,6 +170,6 @@ in { nullSplit , mvDen , mvDenP , mvDenN - , PartSplit + , PartEntry } /\ T