Versionbump: Type of ConP changed

This commit is contained in:
Stephan Barth 2024-02-12 18:19:12 +01:00
parent 5fce01ef40
commit df89d4a379

View File

@ -111,6 +111,9 @@ afterN n = do
deriveShowWith :: (String -> String) -> Name -> Q [Dec]
deriveShowWith = deriveSimpleWith ''Show 'show
unitTypeOut :: () -> ()
unitTypeOut = id
deriveSimpleWith :: Name -> Name -> (String -> String) -> Name -> Q [Dec]
deriveSimpleWith cls fun strOp ty = do
(TyConI tyCon) <- reify ty
@ -125,7 +128,7 @@ deriveSimpleWith cls fun strOp ty = do
genClause :: Con -> Q Clause
genClause (NormalC name []) =
let pats = [ConP name []]
let pats = [ConP name [] []]
body = NormalB $ LitE $ StringL $ strOp $ nameBase name
in return $ Clause pats body []
genClause _ = fail "deriveShowTheme: constructors not allowed to have arguments"