summaryrefslogtreecommitdiff
path: root/src/GF/Infra
diff options
context:
space:
mode:
authorpeb <unknown>2005-02-09 11:46:54 +0000
committerpeb <unknown>2005-02-09 11:46:54 +0000
commita0d412986305d4b45e82afde62ea48f1b06edb9d (patch)
treebca6f55ef01469442ef55f6bd0caa511e147350f /src/GF/Infra
parent4fd0c636f8590bf800715f2598e54ccc22c99b90 (diff)
"Committed_by_peb"
Diffstat (limited to 'src/GF/Infra')
-rw-r--r--src/GF/Infra/CheckM.hs4
-rw-r--r--src/GF/Infra/Comments.hs5
-rw-r--r--src/GF/Infra/Ident.hs19
3 files changed, 16 insertions, 12 deletions
diff --git a/src/GF/Infra/CheckM.hs b/src/GF/Infra/CheckM.hs
index 3794cc903..8f0657e27 100644
--- a/src/GF/Infra/CheckM.hs
+++ b/src/GF/Infra/CheckM.hs
@@ -19,7 +19,7 @@ import Grammar
import Ident
import PrGrammar
--- the strings are non-fatal warnings
+-- | the strings are non-fatal warnings
type Check a = STM (Context,[String]) a
checkError :: String -> Check a
@@ -28,7 +28,7 @@ checkError = raise
checkCond :: String -> Bool -> Check ()
checkCond s b = if b then return () else checkError s
--- warnings should be reversed in the end
+-- | warnings should be reversed in the end
checkWarn :: String -> Check ()
checkWarn s = updateSTM (\ (cont,msg) -> (cont, s:msg))
diff --git a/src/GF/Infra/Comments.hs b/src/GF/Infra/Comments.hs
index e5f74f5ab..919b7dd12 100644
--- a/src/GF/Infra/Comments.hs
+++ b/src/GF/Infra/Comments.hs
@@ -12,9 +12,10 @@
-- (Description of the module)
-----------------------------------------------------------------------------
-module Comments where
+module Comments ( remComments
+ ) where
--- comment removal : line tails prefixed by -- as well as chunks in {- ... -}
+-- | comment removal : line tails prefixed by -- as well as chunks in {- ... -}
remComments :: String -> String
remComments s =
diff --git a/src/GF/Infra/Ident.hs b/src/GF/Infra/Ident.hs
index fe2d7d82d..659084b1b 100644
--- a/src/GF/Infra/Ident.hs
+++ b/src/GF/Infra/Ident.hs
@@ -17,14 +17,17 @@ module Ident where
import Operations
-- import Monad
+
+-- | the constructors labelled /INTERNAL/ are
+-- internal representation never returned by the parser
data Ident =
- IC String -- raw identifier after parsing, resolved in Rename
- | IW -- wildcard
+ IC String -- ^ raw identifier after parsing, resolved in Rename
+ | IW -- ^ wildcard
-- below this line: internal representation never returned by the parser
- | IV (Int,String) -- variable
- | IA (String,Int) -- argument of cat at position
- | IAV (String,Int,Int) -- argument of cat with bindings at position
+ | IV (Int,String) -- ^ /INTERNAL/ variable
+ | IA (String,Int) -- ^ /INTERNAL/ argument of cat at position
+ | IAV (String,Int,Int) -- ^ /INTERNAL/ argument of cat with bindings at position
deriving (Eq, Ord, Show, Read)
@@ -42,14 +45,14 @@ prIdent i = case i of
-- normal identifier
-- ident s = IC s
--- to mark argument variables
+-- | to mark argument variables
argIdent 0 (IC c) i = identA (c,i)
argIdent b (IC c) i = identAV (c,b,i)
--- used in lin defaults
+-- | used in lin defaults
strVar = identA ("str",0)
--- wild card
+-- | wild card
wildIdent = identW
isWildIdent :: Ident -> Bool