Skip to content

Commit

Permalink
parenthesis around #{const ..}.
Browse files Browse the repository at this point in the history
  • Loading branch information
wavewave committed Aug 30, 2023
1 parent c5f7502 commit bd733a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fficxx/src/FFICXX/Generate/Code/HsEnum.hs
Expand Up @@ -57,7 +57,7 @@ genHsEnumDecl enum =
mk1to1 (x, y) = ([mkPVar x], mkVar y, EmptyLocalBinds noExtField)
mkFromIntegralCxx x =
mkVar "fromIntegral"
`app` mkVarWithComment "" ("#{const " <> x <> "}")
`app` mkVarWithComment "" ("( #{const " <> x <> "} )")
-- NOTE: toEnum should not be used.
-- TODO: make this somewhat safer with error messages.
mkToEnum = [([wildcard], mkVar "undefined", EmptyLocalBinds noExtField)]
Expand Down

0 comments on commit bd733a2

Please sign in to comment.