refactor GF.Infra.Modules for better error messages

This commit is contained in:
krasimir
2010-01-31 15:54:25 +00:00
parent acd927f87b
commit be6465a2eb
10 changed files with 159 additions and 162 deletions

View File

@@ -13,7 +13,7 @@
-----------------------------------------------------------------------------
module GF.Infra.Ident (-- * Identifiers
Ident(..), ident2bs, showIdent,
Ident(..), ident2bs, showIdent, ppIdent,
identC, identV, identA, identAV, identW,
argIdent, varStr, varX, isWildIdent, varIndex,
-- * refreshing identifiers
@@ -23,7 +23,7 @@ module GF.Infra.Ident (-- * Identifiers
import GF.Data.Operations
import qualified Data.ByteString.Char8 as BS
-- import Monad
import Text.PrettyPrint
-- | the constructors labelled /INTERNAL/ are
@@ -51,6 +51,9 @@ ident2bs i = case i of
showIdent :: Ident -> String
showIdent i = BS.unpack $! ident2bs i
ppIdent :: Ident -> Doc
ppIdent = text . showIdent
identC :: BS.ByteString -> Ident
identV :: BS.ByteString -> Int -> Ident
identA :: BS.ByteString -> Int -> Ident