diff options
| author | aarne <aarne@chalmers.se> | 2017-02-24 20:50:36 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2017-02-24 20:50:36 +0000 |
| commit | 34627e742793d6e2cea114b8fe4cf7cb9df9a85f (patch) | |
| tree | c1f4266879ee1ad648d45f5177db2d03cd54ef7a /src/compiler/GF/Compile/PGFtoHaskell.hs | |
| parent | ae512e09e0ea8e260145be3c74c40853dfc71219 (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.hs | 2 |
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) |
