summaryrefslogtreecommitdiff
path: root/src/GF/Speech/SRG.hs
diff options
context:
space:
mode:
authorbringert <unknown>2005-09-14 14:17:29 +0000
committerbringert <unknown>2005-09-14 14:17:29 +0000
commita8bc5590afe8951cb473854a6b701464f11db2d7 (patch)
treeaec845ad4a93fe6264ea7d9aa72930e5fb03bd45 /src/GF/Speech/SRG.hs
parent16f2bf8cd6b0a5925988fc91e18f3af5246dfc98 (diff)
Added Graphviz module for graphviz stuff. Move a lot of utility functions to GF.Data.Utilities.
Diffstat (limited to 'src/GF/Speech/SRG.hs')
-rw-r--r--src/GF/Speech/SRG.hs32
1 files changed, 6 insertions, 26 deletions
diff --git a/src/GF/Speech/SRG.hs b/src/GF/Speech/SRG.hs
index 6d88a677e..24f2e868d 100644
--- a/src/GF/Speech/SRG.hs
+++ b/src/GF/Speech/SRG.hs
@@ -5,9 +5,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
--- > CVS $Date: 2005/09/12 15:46:44 $
+-- > CVS $Date: 2005/09/14 15:17:30 $
-- > CVS $Author: bringert $
--- > CVS $Revision: 1.16 $
+-- > CVS $Revision: 1.17 $
--
-- Representation of, conversion to, and utilities for
-- printing of a general Speech Recognition Grammar.
@@ -20,6 +20,7 @@
module GF.Speech.SRG where
+import GF.Data.Utilities
import GF.Infra.Ident
import GF.Formalism.CFG
import GF.Formalism.Utilities (Symbol(..))
@@ -80,29 +81,8 @@ mkCatNames prefix origNames = listToFM (zip origNames names)
-- * Utilities for building and printing SRGs
--
-nl :: ShowS
-nl = showChar '\n'
-
-sp :: ShowS
-sp = showChar ' '
-
-wrap :: String -> ShowS -> String -> ShowS
-wrap o s c = showString o . s . showString c
-
-concatS :: [ShowS] -> ShowS
-concatS = foldr (.) id
-
-unwordsS :: [ShowS] -> ShowS
-unwordsS = join " "
-
-unlinesS :: [ShowS] -> ShowS
-unlinesS = join "\n"
-
-join :: String -> [ShowS] -> ShowS
-join glue = concatS . intersperse (showString glue)
-
-prtS :: Print a => a -> ShowS
-prtS = showString . prt
-
lookupFM_ :: (Ord key, Show key) => FiniteMap key elt -> key -> elt
lookupFM_ fm k = lookupWithDefaultFM fm (error $ "Key not found: " ++ show k) k
+
+prtS :: Print a => a -> ShowS
+prtS = showString . prt \ No newline at end of file