From 34627e742793d6e2cea114b8fe4cf7cb9df9a85f Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 24 Feb 2017 20:50:36 +0000 Subject: [PATCH] corrected fg generation for lexical categories, to avoid a type error in generated code --- src/compiler/GF/Compile/PGFtoHaskell.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/GF/Compile/PGFtoHaskell.hs b/src/compiler/GF/Compile/PGFtoHaskell.hs index f4cf66219..8beafc8b3 100644 --- a/src/compiler/GF/Compile/PGFtoHaskell.hs +++ b/src/compiler/GF/Compile/PGFtoHaskell.hs @@ -240,7 +240,7 @@ fInstance gId lexical m (cat,rules) = then " " ++ gId cat ++ " (fgs t) where\n fgs t = case unApp t of" else " case unApp t of") ++++ unlines [mkInst f xx | (f,xx) <- nonLexicalRules (lexical cat) rules] ++++ - (if lexical cat then " (i,[]) -> " ++ lexicalConstructor cat +++ "(prCId i)" else "") ++++ + (if lexical cat then " Just (i,[]) -> " ++ lexicalConstructor cat +++ "(showCId i)" else "") ++++ " _ -> error (\"no" +++ cat ++ " \" ++ show t)" where isList = isListCat (cat,rules)