From a9bc1160521a0196ab8407a565b7643fe649f6f6 Mon Sep 17 00:00:00 2001 From: hallgren Date: Mon, 20 Oct 2014 19:45:43 +0000 Subject: Some small documentation improvements --- src/compiler/GF/Compile.hs | 3 +++ src/compiler/GF/Main.hs | 1 + 2 files changed, 4 insertions(+) (limited to 'src/compiler/GF') diff --git a/src/compiler/GF/Compile.hs b/src/compiler/GF/Compile.hs index fb37cd1fe..2eed7a6ff 100644 --- a/src/compiler/GF/Compile.hs +++ b/src/compiler/GF/Compile.hs @@ -30,6 +30,8 @@ import PGF(PGF,defaultProbabilities,setProbabilities,readProbabilitiesFromFile) compileToPGF :: Options -> [FilePath] -> IOE PGF compileToPGF opts fs = link opts =<< batchCompile opts fs +-- | Link a grammar into a 'PGF' that can be used to 'PGF.linearize' and +-- 'PGF.parse' with the "PGF" run-time system. link :: Options -> (Ident,t,SourceGrammar) -> IOE PGF link opts (cnc,_,gr) = putPointE Normal opts "linking ... " $ do @@ -40,6 +42,7 @@ link opts (cnc,_,gr) = return $ setProbabilities probs $ if flag optOptimizePGF opts then optimizePGF pgf else pgf +-- | Returns the name of the abstract syntax corresponding to the named concrete syntax srcAbsName gr cnc = err (const cnc) id $ abstractOfConcrete gr cnc -- | Compile the given grammar files and everything they depend on diff --git a/src/compiler/GF/Main.hs b/src/compiler/GF/Main.hs index c7656248f..1679c376c 100644 --- a/src/compiler/GF/Main.hs +++ b/src/compiler/GF/Main.hs @@ -23,6 +23,7 @@ main = do uncurry mainOpts =<< getOptions -- | Get and parse GF command line arguments. Fix relative paths. +-- Calls 'getArgs' and 'parseOptions'. getOptions = do args <- getArgs case parseOptions args of -- cgit v1.2.3