summaryrefslogtreecommitdiff
path: root/src/GF/API/GrammarToHaskell.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/API/GrammarToHaskell.hs')
-rw-r--r--src/GF/API/GrammarToHaskell.hs12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/GF/API/GrammarToHaskell.hs b/src/GF/API/GrammarToHaskell.hs
index 081d533e3..61e720dd1 100644
--- a/src/GF/API/GrammarToHaskell.hs
+++ b/src/GF/API/GrammarToHaskell.hs
@@ -9,7 +9,9 @@
-- > CVS $Author $
-- > CVS $Revision $
--
--- (Description of the module)
+-- to write a GF abstract grammar into a Haskell module with translations from
+-- data objects into GF trees. Example: GSyntax for Agda.
+-- AR 11/11/1999 -- 7/12/2000 -- 18/5/2004
-----------------------------------------------------------------------------
module GrammarToHaskell (grammar2haskell) where
@@ -20,17 +22,13 @@ import Macros
import Modules
import Operations
--- to write a GF abstract grammar into a Haskell module with translations from
--- data objects into GF trees. Example: GSyntax for Agda.
--- AR 11/11/1999 -- 7/12/2000 -- 18/5/2004
-
--- the main function
+-- | the main function
grammar2haskell :: GFC.CanonGrammar -> String
grammar2haskell gr = foldr (++++) [] $
haskPreamble ++ [datatypes gr', gfinstances gr', fginstances gr']
where gr' = hSkeleton gr
--- by this you can prefix all identifiers with stg; the default is 'G'
+-- | by this you can prefix all identifiers with stg; the default is 'G'
gId :: OIdent -> OIdent
gId i = 'G':i