ENH update common
This commit is contained in:
parent
4098e72060
commit
d7c61ac293
|
@ -557,7 +557,7 @@ let StatementParser_ =
|
||||||
, mVal = ValMatcher::{=}
|
, mVal = ValMatcher::{=}
|
||||||
, mDesc = None Text
|
, mDesc = None Text
|
||||||
, mOther = [] : List (FieldMatcher_ re)
|
, mOther = [] : List (FieldMatcher_ re)
|
||||||
, mTx = None EntryGetter.Type
|
, mTx = None TxGetter
|
||||||
, mTimes = None Natural
|
, mTimes = None Natural
|
||||||
, mPriority = +0
|
, mPriority = +0
|
||||||
}
|
}
|
||||||
|
@ -1024,4 +1024,5 @@ in { CurID
|
||||||
, TaxValue
|
, TaxValue
|
||||||
, BudgetTransferValue
|
, BudgetTransferValue
|
||||||
, BudgetTransferType
|
, BudgetTransferType
|
||||||
|
, TxGetter
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,15 +18,15 @@ let d = dec2 True
|
||||||
let d_ = dec2 False
|
let d_ = dec2 False
|
||||||
|
|
||||||
let nullSplit =
|
let nullSplit =
|
||||||
\(a : T.SplitAcnt) ->
|
\(a : T.EntryAcntGetter) ->
|
||||||
\(c : T.SplitCur) ->
|
\(c : T.EntryCurGetter) ->
|
||||||
T.ExpSplit::{ sAcnt = a, sCurrency = c, sTags = [] : List T.TagID }
|
T.EntryGetter::{ sAcnt = a, sCurrency = c, sTags = [] : List T.TagID }
|
||||||
|
|
||||||
let nullOpts = T.TxOpts::{=}
|
let nullOpts = T.TxOpts::{=}
|
||||||
|
|
||||||
let nullVal = T.MatchVal::{=}
|
let nullVal = T.ValMatcher::{=}
|
||||||
|
|
||||||
let nullMatch = T.Match::{=}
|
let nullMatch = T.StatementParser::{=}
|
||||||
|
|
||||||
let nullCron = T.CronPat::{=}
|
let nullCron = T.CronPat::{=}
|
||||||
|
|
||||||
|
@ -49,12 +49,12 @@ let cron1 =
|
||||||
|
|
||||||
let matchInf_ = nullMatch
|
let matchInf_ = nullMatch
|
||||||
|
|
||||||
let matchInf = \(x : T.ToTx) -> nullMatch // { mTx = Some x }
|
let matchInf = \(x : T.TxGetter) -> nullMatch // { mTx = Some x }
|
||||||
|
|
||||||
let matchN_ = \(n : Natural) -> nullMatch // { mTimes = Some n }
|
let matchN_ = \(n : Natural) -> nullMatch // { mTimes = Some n }
|
||||||
|
|
||||||
let matchN =
|
let matchN =
|
||||||
\(n : Natural) -> \(x : T.ToTx) -> matchInf x // { mTimes = Some n }
|
\(n : Natural) -> \(x : T.TxGetter) -> matchInf x // { mTimes = Some n }
|
||||||
|
|
||||||
let match1_ = matchN_ 1
|
let match1_ = matchN_ 1
|
||||||
|
|
||||||
|
@ -68,61 +68,63 @@ let greg =
|
||||||
\(d : Natural) ->
|
\(d : Natural) ->
|
||||||
{ gYear = y, gMonth = m, gDay = d }
|
{ gYear = y, gMonth = m, gDay = d }
|
||||||
|
|
||||||
let mY = \(y : Natural) -> T.MatchDate.On (T.MatchYMD.Y y)
|
let mY = \(y : Natural) -> T.DateMatcher.On (T.YMDMatcher.Y y)
|
||||||
|
|
||||||
let mYM =
|
let mYM =
|
||||||
\(y : Natural) ->
|
\(y : Natural) ->
|
||||||
\(m : Natural) ->
|
\(m : Natural) ->
|
||||||
T.MatchDate.On (T.MatchYMD.YM (gregM y m))
|
T.DateMatcher.On (T.YMDMatcher.YM (gregM y m))
|
||||||
|
|
||||||
let mYMD =
|
let mYMD =
|
||||||
\(y : Natural) ->
|
\(y : Natural) ->
|
||||||
\(m : Natural) ->
|
\(m : Natural) ->
|
||||||
\(d : Natural) ->
|
\(d : Natural) ->
|
||||||
T.MatchDate.On (T.MatchYMD.YMD (greg y m d))
|
T.DateMatcher.On (T.YMDMatcher.YMD (greg y m d))
|
||||||
|
|
||||||
let mRngY =
|
let mRngY =
|
||||||
\(y : Natural) ->
|
\(y : Natural) ->
|
||||||
\(r : Natural) ->
|
\(r : Natural) ->
|
||||||
T.MatchDate.In { _1 = T.MatchYMD.Y y, _2 = r }
|
T.DateMatcher.In { _1 = T.YMDMatcher.Y y, _2 = r }
|
||||||
|
|
||||||
let mRngYM =
|
let mRngYM =
|
||||||
\(y : Natural) ->
|
\(y : Natural) ->
|
||||||
\(m : Natural) ->
|
\(m : Natural) ->
|
||||||
\(r : Natural) ->
|
\(r : Natural) ->
|
||||||
T.MatchDate.In { _1 = T.MatchYMD.YM (gregM y m), _2 = r }
|
T.DateMatcher.In { _1 = T.YMDMatcher.YM (gregM y m), _2 = r }
|
||||||
|
|
||||||
let mRngYMD =
|
let mRngYMD =
|
||||||
\(y : Natural) ->
|
\(y : Natural) ->
|
||||||
\(m : Natural) ->
|
\(m : Natural) ->
|
||||||
\(d : Natural) ->
|
\(d : Natural) ->
|
||||||
\(r : Natural) ->
|
\(r : Natural) ->
|
||||||
T.MatchDate.In { _1 = T.MatchYMD.YMD (greg y m d), _2 = r }
|
T.DateMatcher.In { _1 = T.YMDMatcher.YMD (greg y m d), _2 = r }
|
||||||
|
|
||||||
let PartSplit = { _1 : T.AcntID, _2 : T.Decimal, _3 : Text }
|
let PartSplit = { _1 : T.AcntID, _2 : T.Decimal, _3 : Text }
|
||||||
|
|
||||||
let partN =
|
let partN =
|
||||||
\(c : T.SplitCur) ->
|
\(c : T.EntryCurGetter) ->
|
||||||
\(a : T.SplitAcnt) ->
|
\(a : T.EntryAcntGetter) ->
|
||||||
\(comment : Text) ->
|
\(comment : Text) ->
|
||||||
\(ss : List PartSplit) ->
|
\(ss : List PartSplit) ->
|
||||||
let toSplit =
|
let toSplit =
|
||||||
\(x : PartSplit) ->
|
\(x : PartSplit) ->
|
||||||
nullSplit (T.SplitAcnt.ConstT x._1) c
|
nullSplit (T.EntryAcntGetter.ConstT x._1) c
|
||||||
// { sValue = Some (T.SplitNum.ConstN x._2), sComment = x._3 }
|
// { sValue = Some (T.EntryNumGetter.ConstN x._2)
|
||||||
|
, sComment = x._3
|
||||||
|
}
|
||||||
|
|
||||||
in [ nullSplit a c // { sComment = comment } ]
|
in [ nullSplit a c // { sComment = comment } ]
|
||||||
# List/map PartSplit T.ExpSplit.Type toSplit ss
|
# List/map PartSplit T.EntryGetter.Type toSplit ss
|
||||||
|
|
||||||
let part1 =
|
let part1 =
|
||||||
\(c : T.SplitCur) ->
|
\(c : T.EntryCurGetter) ->
|
||||||
\(a : T.SplitAcnt) ->
|
\(a : T.EntryAcntGetter) ->
|
||||||
\(comment : Text) ->
|
\(comment : Text) ->
|
||||||
partN c a comment ([] : List PartSplit)
|
partN c a comment ([] : List PartSplit)
|
||||||
|
|
||||||
let part1_ =
|
let part1_ =
|
||||||
\(c : T.SplitCur) ->
|
\(c : T.EntryCurGetter) ->
|
||||||
\(a : T.SplitAcnt) ->
|
\(a : T.EntryAcntGetter) ->
|
||||||
partN c a "" ([] : List PartSplit)
|
partN c a "" ([] : List PartSplit)
|
||||||
|
|
||||||
let addDay =
|
let addDay =
|
||||||
|
|
Loading…
Reference in New Issue