summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/PGFtoHaskell.hs
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2017-02-24 20:50:36 +0000
committeraarne <aarne@chalmers.se>2017-02-24 20:50:36 +0000
commit34627e742793d6e2cea114b8fe4cf7cb9df9a85f (patch)
treec1f4266879ee1ad648d45f5177db2d03cd54ef7a /src/compiler/GF/Compile/PGFtoHaskell.hs
parentae512e09e0ea8e260145be3c74c40853dfc71219 (diff)
corrected fg generation for lexical categories, to avoid a type error in generated code
Diffstat (limited to 'src/compiler/GF/Compile/PGFtoHaskell.hs')
-rw-r--r--src/compiler/GF/Compile/PGFtoHaskell.hs2
1 files changed, 1 insertions, 1 deletions
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)