diff options
| author | kr.angelov <kr.angelov@chalmers.se> | 2008-05-21 13:10:54 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@chalmers.se> | 2008-05-21 13:10:54 +0000 |
| commit | c544ef31823c7d2c28c28cae408cca5d71e6978d (patch) | |
| tree | b9693bc684d1737062e45438cedf7536cf5513d5 /src-3.0/GF/GFCC/CId.hs | |
| parent | 529374caaa6d451400f57f1ff82106d89d603944 (diff) | |
use ByteString internally in Ident, CId and Label
Diffstat (limited to 'src-3.0/GF/GFCC/CId.hs')
| -rw-r--r-- | src-3.0/GF/GFCC/CId.hs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src-3.0/GF/GFCC/CId.hs b/src-3.0/GF/GFCC/CId.hs index e4efa98ba..928dc18e2 100644 --- a/src-3.0/GF/GFCC/CId.hs +++ b/src-3.0/GF/GFCC/CId.hs @@ -1,14 +1,15 @@ -module GF.GFCC.CId ( - module GF.GFCC.Raw.AbsGFCCRaw, - prCId, - cId - ) where +module GF.GFCC.CId (CId(..), wildCId, mkCId, prCId) where -import GF.GFCC.Raw.AbsGFCCRaw (CId(CId)) +import GF.Infra.PrintClass +import Data.ByteString.Char8 as BS -prCId :: CId -> String -prCId (CId s) = s +newtype CId = CId BS.ByteString deriving (Eq,Ord,Show) + +wildCId :: CId +wildCId = CId (BS.singleton '_') -cId :: String -> CId -cId = CId +mkCId :: String -> CId +mkCId s = CId (BS.pack s) +prCId :: CId -> String +prCId (CId x) = BS.unpack x |
