1
0
forked from GitHub/gf-core

More haddock documentation improvements

This commit is contained in:
hallgren
2014-10-16 14:03:57 +00:00
parent c0ebbc4edf
commit c924491289
16 changed files with 92 additions and 56 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -8,7 +8,8 @@
-----------------------------------------------------------------------------
module GF.Grammar.Printer
( TermPrintQual(..)
( -- ** Pretty printing
TermPrintQual(..)
, ppModule
, ppJudgement
, ppParams

View File

@@ -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,