summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/PGFtoHaskell.hs
diff options
context:
space:
mode:
authorKrasimir Angelov <kr.angelov@gmail.com>2017-08-29 18:44:50 +0200
committerKrasimir Angelov <kr.angelov@gmail.com>2017-08-29 18:44:50 +0200
commitb7b7a7c91cc861440dd541b5f4e9eb5b409bcce0 (patch)
tree352d48f11bea696fe257839f8f7dcf8e6b386fce /src/compiler/GF/Compile/PGFtoHaskell.hs
parent62e5852669fc351d41d1c895822fd7e2cbddf803 (diff)
the embedded grammars now work with both the pure Haskell and the Haskell binding API
Diffstat (limited to 'src/compiler/GF/Compile/PGFtoHaskell.hs')
-rw-r--r--src/compiler/GF/Compile/PGFtoHaskell.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/compiler/GF/Compile/PGFtoHaskell.hs b/src/compiler/GF/Compile/PGFtoHaskell.hs
index 24acc289a..f4e3a0297 100644
--- a/src/compiler/GF/Compile/PGFtoHaskell.hs
+++ b/src/compiler/GF/Compile/PGFtoHaskell.hs
@@ -56,21 +56,20 @@ haskPreamble gadt name =
"import Data.Monoid"
] else []) ++
[
- "import PGF hiding (Tree)",
- "import qualified PGF",
+ "import PGF",
"----------------------------------------------------",
"-- automatic translation from GF to Haskell",
"----------------------------------------------------",
"",
"class Gf a where",
- " gf :: a -> PGF.Tree",
- " fg :: PGF.Tree -> a",
+ " gf :: a -> Expr",
+ " fg :: Expr -> a",
"",
predefInst gadt "GString" "String" "unStr" "mkStr",
"",
predefInst gadt "GInt" "Int" "unInt" "mkInt",
"",
- predefInst gadt "GFloat" "Double" "unDouble" "mkDouble",
+ predefInst gadt "GFloat" "Double" "unFloat" "mkFloat",
"",
"----------------------------------------------------",
"-- below this line machine-generated",