summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2014-10-15 20:42:36 +0000
committerhallgren <hallgren@chalmers.se>2014-10-15 20:42:36 +0000
commit393dde2eb93a975442697c177dbb161e4300bea0 (patch)
treec1a9b693e6ffcd154eb1105ba973317638073dd9 /src
parent8381c7b0c05c7086325c7adcebc1cfe7fffd6ad4 (diff)
Fixes for the haddock documentation
Diffstat (limited to 'src')
-rw-r--r--src/compiler/GF/Compile.hs1
-rw-r--r--src/compiler/GF/Compile/Compute/Predef.hs2
-rw-r--r--src/compiler/GF/Compile/Compute/Value.hs4
-rw-r--r--src/compiler/GF/Compile/Multi.hs4
-rw-r--r--src/compiler/GF/Compile/TypeCheck/TC.hs2
-rw-r--r--src/compiler/GF/CompileInParallel.hs4
-rw-r--r--src/compiler/GF/CompileOne.hs8
-rw-r--r--src/compiler/GF/Grammar/Unify.hs2
8 files changed, 15 insertions, 12 deletions
diff --git a/src/compiler/GF/Compile.hs b/src/compiler/GF/Compile.hs
index ffa0f0b0a..b52469cdb 100644
--- a/src/compiler/GF/Compile.hs
+++ b/src/compiler/GF/Compile.hs
@@ -41,6 +41,7 @@ link opts (cnc,_,gr) =
srcAbsName gr cnc = err (const cnc) id $ abstractOfConcrete gr cnc
+-- | Compile the given grammar files and everything they depend on
batchCompile :: Options -> [FilePath] -> IOE (Ident,UTCTime,SourceGrammar)
batchCompile opts files = do
(gr,menv) <- foldM (compileModule opts) emptyCompileEnv files
diff --git a/src/compiler/GF/Compile/Compute/Predef.hs b/src/compiler/GF/Compile/Compute/Predef.hs
index 74697a89b..ba215ba30 100644
--- a/src/compiler/GF/Compile/Compute/Predef.hs
+++ b/src/compiler/GF/Compile/Compute/Predef.hs
@@ -98,7 +98,7 @@ delta f vs =
Plus -> ap2 ((+)::Int->Int->Int)
EqInt -> ap2 ((==)::Int->Int->Bool)
LessInt -> ap2 ((<)::Int->Int->Bool)
- {- | Show | Read | ToStr | MapStr | EqVal -}
+ {- -- | Show | Read | ToStr | MapStr | EqVal -}
Error -> ap1 VError
-- Canonical values:
PBool -> canonical
diff --git a/src/compiler/GF/Compile/Compute/Value.hs b/src/compiler/GF/Compile/Compute/Value.hs
index f076e47ba..35f093ada 100644
--- a/src/compiler/GF/Compile/Compute/Value.hs
+++ b/src/compiler/GF/Compile/Compute/Value.hs
@@ -11,7 +11,7 @@ data Value
| VCApp QIdent [Value] -- from QC, constructors
| VGen Int [Value] -- for lambda bound variables, possibly applied
| VMeta MetaId Env [Value]
--- | VClosure Env Term -- used in Typecheck.ConcreteNew
+-- -- | VClosure Env Term -- used in Typecheck.ConcreteNew
| VAbs BindType Ident Binding -- used in Compute.ConcreteNew
| VProd BindType Value Ident Binding -- used in Compute.ConcreteNew
| VInt Int
@@ -32,7 +32,7 @@ data Value
| VFV [Value]
| VAlts Value [(Value, Value)]
| VStrs [Value]
--- | VGlue Value Value -- hmm
+-- -- | VGlue Value Value -- hmm
| VExtR Value Value -- hmm
| VError String
deriving (Eq,Show)
diff --git a/src/compiler/GF/Compile/Multi.hs b/src/compiler/GF/Compile/Multi.hs
index 59e8ed34c..38c8bfdc7 100644
--- a/src/compiler/GF/Compile/Multi.hs
+++ b/src/compiler/GF/Compile/Multi.hs
@@ -17,10 +17,10 @@ import Data.Char
> langs Eng Fin Swe
-- baseline rules: semicolon-separated line-by-line entries update abs and cncs, adding to S
-cheers ; skål ; terveydeksi
+cheers ; skål ; terveydeksi
-- alternatives within a language are comma-separated
-cheers ; skål ; terveydeksi, kippis
+cheers ; skål ; terveydeksi, kippis
-- more advanced: verbatim abstract rules prefixed by "> abs"
> abs cat Drink ;
diff --git a/src/compiler/GF/Compile/TypeCheck/TC.hs b/src/compiler/GF/Compile/TypeCheck/TC.hs
index 531d862f4..570a07275 100644
--- a/src/compiler/GF/Compile/TypeCheck/TC.hs
+++ b/src/compiler/GF/Compile/TypeCheck/TC.hs
@@ -42,7 +42,7 @@ data AExp =
| AApp AExp AExp Val
| AAbs Ident Val AExp
| AProd Ident AExp AExp
--- | AEqs [([Exp],AExp)] --- not used
+-- -- | AEqs [([Exp],AExp)] --- not used
| ARecType [ALabelling]
| AR [AAssign]
| AP AExp Label Val
diff --git a/src/compiler/GF/CompileInParallel.hs b/src/compiler/GF/CompileInParallel.hs
index c5e7fe866..702602f4a 100644
--- a/src/compiler/GF/CompileInParallel.hs
+++ b/src/compiler/GF/CompileInParallel.hs
@@ -1,4 +1,5 @@
-module GF.CompileInParallel where
+-- | Parallel grammar compilation
+module GF.CompileInParallel(batchCompile) where
import Prelude hiding (catch)
import Control.Monad(join,ap,when,unless)
import Control.Applicative
@@ -18,6 +19,7 @@ import GF.Infra.Ident(identS)
import GF.Text.Pretty
import qualified Data.ByteString.Lazy as BS
+-- | Compile the given grammar files and everything they depend on
batchCompile jobs opts rootfiles0 =
do rootfiles <- mapM canonical rootfiles0
lib_dir <- canonical =<< getLibraryDirectory opts
diff --git a/src/compiler/GF/CompileOne.hs b/src/compiler/GF/CompileOne.hs
index f182f66d0..1d008326c 100644
--- a/src/compiler/GF/CompileOne.hs
+++ b/src/compiler/GF/CompileOne.hs
@@ -30,9 +30,9 @@ import Control.Monad((<=<))
type OneOutput = (Maybe FullPath,CompiledModule)
type CompiledModule = SourceModule
+--compileOne :: Options -> SourceGrammar -> FullPath -> IOE OneOutput
-- | Compile a given source file (or just load a .gfo file),
-- given a 'SourceGrammar' containing everything it depends on.
---compileOne :: Options -> SourceGrammar -> FullPath -> IOE OneOutput
compileOne opts srcgr file =
if isGFO file
then reuseGFO opts srcgr file
@@ -40,8 +40,8 @@ compileOne opts srcgr file =
if b1 then useTheSource opts srcgr file
else reuseGFO opts srcgr (gf2gfo opts file)
--- | For compiled gf, read the file and update environment
--- also undo common subexp optimization, to enable normal computations
+-- | For compiled gf, read the file and update environment.
+-- Also undo common subexp optimization, to enable normal computations.
reuseGFO opts srcgr file =
do sm00 <- putPointE Verbose opts ("+ reading" +++ file) $
decodeModule file
@@ -61,8 +61,8 @@ reuseGFO opts srcgr file =
return (Just file,sm)
--- | For gf source, do full compilation and generate code
--useTheSource :: Options -> SourceGrammar -> FullPath -> IOE OneOutput
+-- | For gf source, do full compilation and generate code.
useTheSource opts srcgr file =
do sm <- putpOpt ("- parsing" +++ file)
("- compiling" +++ file ++ "... ")
diff --git a/src/compiler/GF/Grammar/Unify.hs b/src/compiler/GF/Grammar/Unify.hs
index 9ec6e5078..b4960b635 100644
--- a/src/compiler/GF/Grammar/Unify.hs
+++ b/src/compiler/GF/Grammar/Unify.hs
@@ -9,7 +9,7 @@
-- > CVS $Author: bringert $
-- > CVS $Revision: 1.4 $
--
--- (c) Petri Mäenpää & Aarne Ranta, 1998--2001
+-- (c) Petri Mäenpää & Aarne Ranta, 1998--2001
--
-- brute-force adaptation of the old-GF program AR 21\/12\/2001 ---
-- the only use is in 'TypeCheck.splitConstraints'