Skip to content

Commit

Permalink
Fix casing on OmitKey
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenGraves committed Dec 20, 2024
1 parent f870ee0 commit e9b7436
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion json-fleece-codegen-util/src/Fleece/CodeGenUtil.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1797,7 +1797,7 @@ fieldFleeceSchemaCode =
fleeceFieldFunction :: FleeceSchemaField -> Bool -> HC.HaskellCode
fleeceFieldFunction field useOptionalNullableBool
| fieldRequired field = fleeceCoreVar "required"
| useOptionalNullableBool = fleeceCoreVar "optionalNullable" <> " " <> fleeceCoreVar "OmitKey"
| useOptionalNullableBool = fleeceCoreVar "optionalNullable" <> " " <> fleeceCoreConstructorVar "OmitKey"
| otherwise = fleeceCoreVar "optional"

mkFleeceSchemaField ::
Expand Down Expand Up @@ -2055,6 +2055,12 @@ fleeceCoreVar =
. HC.varNameToCodeDefaultQualification
. HC.toVarName "Fleece.Core" (Just "FC")

fleeceCoreConstructorVar :: HC.FromCode c => T.Text -> c
fleeceCoreConstructorVar =
HC.fromCode
. HC.varNameToCodeDefaultQualification
. HC.toConstructorVarName "Fleece.Core" (Just "FC")

fleeceCoreFunApp :: HC.FromCode c => T.Text -> T.Text -> c
fleeceCoreFunApp functionName argument =
let
Expand Down

0 comments on commit e9b7436

Please sign in to comment.