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

View File

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