summaryrefslogtreecommitdiff
path: root/src/GF/API.hs
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/API.hs
parent4fd0c636f8590bf800715f2598e54ccc22c99b90 (diff)
"Committed_by_peb"
Diffstat (limited to 'src/GF/API.hs')
-rw-r--r--src/GF/API.hs18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/GF/API.hs b/src/GF/API.hs
index b07678ddd..cc3a8c206 100644
--- a/src/GF/API.hs
+++ b/src/GF/API.hs
@@ -1,7 +1,7 @@
----------------------------------------------------------------------
-- |
--- Module : (Module)
--- Maintainer : (Maintainer)
+-- Module : API
+-- Maintainer : Aarne Ranta
-- Stability : (stable)
-- Portability : (portable)
--
@@ -9,7 +9,7 @@
-- > CVS $Author $
-- > CVS $Revision $
--
--- (Description of the module)
+-- Application Programmer's Interface to GF; also used by Shell. AR 10/11/2001
-----------------------------------------------------------------------------
module API where
@@ -72,8 +72,6 @@ import List (nub)
import Monad (liftM)
import System (system)
--- Application Programmer's Interface to GF; also used by Shell. AR 10/11/2001
-
type GFGrammar = StateGrammar
type GFCat = CFCat
type Ident = I.Ident
@@ -279,7 +277,7 @@ optParseArgErrMsg opts gr s = do
_ -> return ts
return (ts',m)
--- analyses word by word
+-- | analyses word by word
morphoAnalyse :: Options -> GFGrammar -> String -> String
morphoAnalyse opts gr
| oElem beShort opts = morphoTextShort mo
@@ -318,7 +316,7 @@ optPrintSyntax opts = customOrDefault opts grammarPrinter customSyntaxPrinter
optPrintTree :: Options -> GFGrammar -> Tree -> String
optPrintTree opts = customOrDefault opts grammarPrinter customTermPrinter
--- look for string command (-filter=x)
+-- | look for string command (-filter=x)
optStringCommand :: Options -> GFGrammar -> String -> String
optStringCommand opts g =
optIntOrAll opts flagLength .
@@ -352,19 +350,19 @@ optTokenizer opts gr = show . customOrDefault opts useTokenizer customTokenizer
-- performs UTF8 if the language does not have flag coding=utf8; replaces name*U
--- convert a Unicode string into a UTF8 encoded string
+-- | convert a Unicode string into a UTF8 encoded string
optEncodeUTF8 :: GFGrammar -> String -> String
optEncodeUTF8 gr = case getOptVal (stateOptions gr) uniCoding of
Just "utf8" -> id
_ -> encodeUTF8
--- convert a UTF8 encoded string into a Unicode string
+-- | convert a UTF8 encoded string into a Unicode string
optDecodeUTF8 :: GFGrammar -> String -> String
optDecodeUTF8 gr = case getOptVal (stateOptions gr) uniCoding of
Just "utf8" -> decodeUTF8
_ -> id
--- convert a string encoded with some coding given by the coding flag to UTF8
+-- | convert a string encoded with some coding given by the coding flag to UTF8
anyCodingToUTF8 :: Options -> String -> String
anyCodingToUTF8 opts =
encodeUTF8 . customOrDefault opts uniCoding customUniCoding