FIX special case type

This commit is contained in:
Nathan Dwarshuis 2023-08-16 21:04:16 -04:00
parent 001ca0ff37
commit d4044dede3
2 changed files with 13 additions and 10 deletions

View File

@ -278,7 +278,7 @@ let DatePat =
-}
< Cron : CronPat.Type | Mod : ModPat.Type >
let TxAmount1 =
let TxAmount1_ =
\(re : Type) ->
{ a1Column : Text
, a1Fmt :
@ -289,7 +289,7 @@ let TxAmount1 =
re
}
let TxAmount2 =
let TxAmount2_ =
\(re : Type) ->
{ a2Positive : Text
, a2Negative : Text
@ -301,9 +301,9 @@ let TxAmount2 =
re
}
let TxAmountSpec =
let TxAmountSpec_ =
\(re : Type) ->
< AmountSingle : TxAmount1 re | AmountDual : TxAmount2 re >
< AmountSingle : TxAmount1_ re | AmountDual : TxAmount2_ re >
let TxOpts_ =
{-
@ -319,7 +319,7 @@ let TxOpts_ =
{-
Column title for amount
-}
TxAmountSpec re
TxAmountSpec_ re
, toDesc :
{-
Column title for description
@ -343,12 +343,14 @@ let TxOpts_ =
, toSkipBlankOther : List Text
}
let TxAmountSpec = TxAmountSpec_ Text
let TxOpts =
{ Type = TxOpts_ Text
, default =
{ toDate = "Date"
, toAmount =
(TxAmountSpec Text).AmountSingle
TxAmountSpec.AmountSingle
{ a1Column = "Amount", a1Fmt = "([-+])?([0-9\\.]+)" }
, toDesc = "Description"
, toOther = [] : List Text
@ -1199,6 +1201,7 @@ in { CurID
, AcntMatcher_
, AcntMatcher
, TxAmountSpec
, TxAmount1
, TxAmount2
, TxAmountSpec_
, TxAmount1_
, TxAmount2_
}

View File

@ -49,8 +49,8 @@ makeHaskellTypesWith
, SingleConstructor "ModPat" "ModPat" "(./dhall/Types.dhall).ModPat.Type"
, SingleConstructor "CronPat" "CronPat" "(./dhall/Types.dhall).CronPat.Type"
, SingleConstructor "ValMatcher" "ValMatcher" "(./dhall/Types.dhall).ValMatcher.Type"
, SingleConstructor "TxAmount1" "TxAmount1" "(./dhall/Types.dhall).TxAmount1"
, SingleConstructor "TxAmount2" "TxAmount2" "(./dhall/Types.dhall).TxAmount2"
, SingleConstructor "TxAmount1" "TxAmount1" "(./dhall/Types.dhall).TxAmount1_"
, SingleConstructor "TxAmount2" "TxAmount2" "(./dhall/Types.dhall).TxAmount2_"
, SingleConstructor
"Amount"
"Amount"