From b7b7a7c91cc861440dd541b5f4e9eb5b409bcce0 Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Tue, 29 Aug 2017 18:44:50 +0200 Subject: the embedded grammars now work with both the pure Haskell and the Haskell binding API --- src/compiler/GF/Compile/PGFtoHaskell.hs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/compiler') 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", -- cgit v1.2.3