1
0
forked from GitHub/gf-core

Fixes for the haddock documentation

This commit is contained in:
hallgren
2014-10-15 20:42:36 +00:00
parent 4829dacee8
commit e0c0ff0020
8 changed files with 15 additions and 12 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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 ++ "... ")

View File

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