From c544ef31823c7d2c28c28cae408cca5d71e6978d Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Wed, 21 May 2008 13:10:54 +0000 Subject: use ByteString internally in Ident, CId and Label --- src-3.0/GF/GFCC/CId.hs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src-3.0/GF/GFCC/CId.hs') 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 -- cgit v1.2.3