diff options
| author | krasimir <krasimir@chalmers.se> | 2010-01-31 15:54:25 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-01-31 15:54:25 +0000 |
| commit | be6465a2ebb1aba43433cff29bf5bad6e2065e26 (patch) | |
| tree | 8702aca1395dbf3f91379eb73378badf1742db5c /src/compiler/GF/Infra/Ident.hs | |
| parent | acd927f87bfcc9b1a3b9f38371239adf27a3bf6b (diff) | |
refactor GF.Infra.Modules for better error messages
Diffstat (limited to 'src/compiler/GF/Infra/Ident.hs')
| -rw-r--r-- | src/compiler/GF/Infra/Ident.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/GF/Infra/Ident.hs b/src/compiler/GF/Infra/Ident.hs index efe6f9261..967945be9 100644 --- a/src/compiler/GF/Infra/Ident.hs +++ b/src/compiler/GF/Infra/Ident.hs @@ -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 |
