Commit d80e3485 authored by Iustin Pop's avatar Iustin Pop
Browse files

Change a type computation for compatibility with 6.12

This is the last warning related to TemplateHaskell that was 6.12
specific; for some reason, it doesn't "see" that traw/tname were used.

The patch just replaces the quoting syntax with an explicit type
declaration; while less readable, it also has less warnings.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarRené Nussbaumer <>
parent ffbd9592
......@@ -246,7 +246,7 @@ strADTDecl name constructors =
-- @
genToRaw :: Name -> Name -> Name -> [(String, Either String Name)] -> Q [Dec]
genToRaw traw fname tname constructors = do
sigt <- [t| $(conT tname) -> $(conT traw) |]
let sigt = AppT (AppT ArrowT (ConT tname)) (ConT traw)
-- the body clauses, matching on the constructor and returning the
-- raw value
clauses <- mapM (\(c, v) -> clause [recP (mkName c) []]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment