summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Grammar
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2014-10-16 14:03:57 +0000
committerhallgren <hallgren@chalmers.se>2014-10-16 14:03:57 +0000
commitc924491289259fa8a5a259ed97f2d9e817e3338c (patch)
tree178f045daa6520ca0979d093167727511c06541e /src/compiler/GF/Grammar
parentc0ebbc4edfeaf16a6a5f4392ea097ea3d72a0e06 (diff)
More haddock documentation improvements
Diffstat (limited to 'src/compiler/GF/Grammar')
-rw-r--r--src/compiler/GF/Grammar/Grammar.hs11
-rw-r--r--src/compiler/GF/Grammar/MMacros.hs4
-rw-r--r--src/compiler/GF/Grammar/Macros.hs2
-rw-r--r--src/compiler/GF/Grammar/Printer.hs3
-rw-r--r--src/compiler/GF/Grammar/Values.hs6
5 files changed, 17 insertions, 9 deletions
diff --git a/src/compiler/GF/Grammar/Grammar.hs b/src/compiler/GF/Grammar/Grammar.hs
index 816a9f438..36904c579 100644
--- a/src/compiler/GF/Grammar/Grammar.hs
+++ b/src/compiler/GF/Grammar/Grammar.hs
@@ -15,6 +15,7 @@
-----------------------------------------------------------------------------
module GF.Grammar.Grammar (
+ -- ** Grammar modules
SourceGrammar, SourceModInfo(..), SourceModule, ModuleType(..),
emptySourceGrammar, mGrammar, modules, prependModule, moduleMap,
@@ -32,9 +33,8 @@ module GF.Grammar.Grammar (
abstractOfConcrete,
ModuleStatus(..),
-
- PMCFG(..), Production(..), FId, FunId, SeqId, LIndex, Sequence,
-
+
+ -- ** Judgements and terms
Info(..),
Location(..), L(..), unLoc, noLoc, ppLocation, ppL,
Type,
@@ -58,7 +58,10 @@ module GF.Grammar.Grammar (
Altern,
Substitution,
varLabel, tupleLabel, linLabel, theLinLabel,
- ident2label, label2ident
+ ident2label, label2ident,
+
+ -- ** PMCFG
+ PMCFG(..), Production(..), FId, FunId, SeqId, LIndex, Sequence
) where
import GF.Infra.Ident
diff --git a/src/compiler/GF/Grammar/MMacros.hs b/src/compiler/GF/Grammar/MMacros.hs
index 9f4587967..66d8a857f 100644
--- a/src/compiler/GF/Grammar/MMacros.hs
+++ b/src/compiler/GF/Grammar/MMacros.hs
@@ -28,6 +28,8 @@ import GF.Grammar.Macros
import Control.Monad
import GF.Text.Pretty
+-- ** Some more abstractions on grammars, esp. for Edit
+
{-
nodeTree :: Tree -> TrNode
argsTree :: Tree -> [Tree]
@@ -151,7 +153,7 @@ substTerm ss g c = case c of
metaSubstExp :: MetaSubst -> [(MetaId,Exp)]
metaSubstExp msubst = [(m, errVal (meta2exp m) (val2expSafe v)) | (m,v) <- msubst]
--- * belong here rather than to computation
+-- ** belong here rather than to computation
substitute :: [Var] -> Substitution -> Exp -> Err Exp
substitute v s = return . substTerm v s
diff --git a/src/compiler/GF/Grammar/Macros.hs b/src/compiler/GF/Grammar/Macros.hs
index dde1201d8..f5ddb7ae0 100644
--- a/src/compiler/GF/Grammar/Macros.hs
+++ b/src/compiler/GF/Grammar/Macros.hs
@@ -33,6 +33,8 @@ import Control.Monad (liftM, liftM2, liftM3)
import Data.List (sortBy,nub)
import GF.Text.Pretty
+-- ** Macros for constructing and analysing source code terms.
+
typeForm :: Type -> (Context, Cat, [Term])
typeForm t =
case t of
diff --git a/src/compiler/GF/Grammar/Printer.hs b/src/compiler/GF/Grammar/Printer.hs
index da29e3ebd..63603c5f8 100644
--- a/src/compiler/GF/Grammar/Printer.hs
+++ b/src/compiler/GF/Grammar/Printer.hs
@@ -8,7 +8,8 @@
-----------------------------------------------------------------------------
module GF.Grammar.Printer
- ( TermPrintQual(..)
+ ( -- ** Pretty printing
+ TermPrintQual(..)
, ppModule
, ppJudgement
, ppParams
diff --git a/src/compiler/GF/Grammar/Values.hs b/src/compiler/GF/Grammar/Values.hs
index 0476825df..7bfc8a24b 100644
--- a/src/compiler/GF/Grammar/Values.hs
+++ b/src/compiler/GF/Grammar/Values.hs
@@ -12,12 +12,12 @@
-- (Description of the module)
-----------------------------------------------------------------------------
-module GF.Grammar.Values (-- * values used in TC type checking
+module GF.Grammar.Values (-- ** Values used in TC type checking
Exp, Val(..), Env,
- -- * annotated tree used in editing
+ -- ** Annotated tree used in editing
--Z Tree, TrNode(..), Atom(..),
Binds, Constraints, MetaSubst,
- -- * for TC
+ -- ** For TC
valAbsInt, valAbsFloat, valAbsString, vType,
isPredefCat,
eType,