ENH update dhall interface
This commit is contained in:
parent
4c0b192b9c
commit
a144b9fa3c
|
@ -476,7 +476,7 @@ let EntryGetter =
|
||||||
Means for getting an entry from a given row in a statement
|
Means for getting an entry from a given row in a statement
|
||||||
-}
|
-}
|
||||||
{ Type = Entry EntryAcntGetter EntryNumGetter TagID
|
{ Type = Entry EntryAcntGetter EntryNumGetter TagID
|
||||||
, default = { eValue = None EntryNumGetter, eComment = "" }
|
, default = { eComment = "", eTags = [] : List TagID }
|
||||||
}
|
}
|
||||||
|
|
||||||
let TxSubGetter =
|
let TxSubGetter =
|
||||||
|
|
|
@ -6,8 +6,8 @@ let T = ./Types.dhall
|
||||||
|
|
||||||
let nullEntry =
|
let nullEntry =
|
||||||
\(a : T.EntryAcntGetter) ->
|
\(a : T.EntryAcntGetter) ->
|
||||||
\(c : T.EntryCurGetter) ->
|
\(v : T.EntryNumGetter) ->
|
||||||
T.ToEntryGetter::{ eAcnt = a, eCurrency = c, eTags = [] : List T.TagID }
|
T.EntryGetter::{ eAcnt = a, eValue = v }
|
||||||
|
|
||||||
let nullOpts = T.TxOpts::{=}
|
let nullOpts = T.TxOpts::{=}
|
||||||
|
|
||||||
|
@ -89,30 +89,15 @@ let mRngYMD =
|
||||||
let PartEntry = { _1 : T.AcntID, _2 : Double, _3 : Text }
|
let PartEntry = { _1 : T.AcntID, _2 : Double, _3 : Text }
|
||||||
|
|
||||||
let partN =
|
let partN =
|
||||||
\(c : T.EntryCurGetter) ->
|
|
||||||
\(a : T.EntryAcntGetter) ->
|
|
||||||
\(comment : Text) ->
|
|
||||||
\(ss : List PartEntry) ->
|
\(ss : List PartEntry) ->
|
||||||
let toEntry =
|
let toEntry =
|
||||||
\(x : PartEntry) ->
|
\(x : PartEntry) ->
|
||||||
nullEntry (T.EntryAcntGetter.ConstT x._1) c
|
nullEntry
|
||||||
// { eValue = Some (T.ToEntryNumGetter.TConstN x._2)
|
(T.EntryAcntGetter.ConstT x._1)
|
||||||
, eComment = x._3
|
(T.EntryNumGetter.ConstN x._2)
|
||||||
}
|
// { eComment = x._3 }
|
||||||
|
|
||||||
in [ nullEntry a c // { eComment = comment } ]
|
in List/map PartEntry T.EntryGetter.Type toEntry ss
|
||||||
# List/map PartEntry T.ToEntryGetter.Type toEntry ss
|
|
||||||
|
|
||||||
let part1 =
|
|
||||||
\(c : T.EntryCurGetter) ->
|
|
||||||
\(a : T.EntryAcntGetter) ->
|
|
||||||
\(comment : Text) ->
|
|
||||||
partN c a comment ([] : List PartEntry)
|
|
||||||
|
|
||||||
let part1_ =
|
|
||||||
\(c : T.EntryCurGetter) ->
|
|
||||||
\(a : T.EntryAcntGetter) ->
|
|
||||||
partN c a "" ([] : List PartEntry)
|
|
||||||
|
|
||||||
let addDay =
|
let addDay =
|
||||||
\(x : T.GregorianM) ->
|
\(x : T.GregorianM) ->
|
||||||
|
@ -157,8 +142,6 @@ in { nullEntry
|
||||||
, greg
|
, greg
|
||||||
, gregM
|
, gregM
|
||||||
, partN
|
, partN
|
||||||
, part1
|
|
||||||
, part1_
|
|
||||||
, addDay
|
, addDay
|
||||||
, comma = 44
|
, comma = 44
|
||||||
, tab = 9
|
, tab = 9
|
||||||
|
|
Loading…
Reference in New Issue