forked from GitHub/gf-core
use ByteString internally in Ident, CId and Label
This commit is contained in:
@@ -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
|
||||
|
||||
newtype CId = CId BS.ByteString deriving (Eq,Ord,Show)
|
||||
|
||||
wildCId :: CId
|
||||
wildCId = CId (BS.singleton '_')
|
||||
|
||||
mkCId :: String -> CId
|
||||
mkCId s = CId (BS.pack s)
|
||||
|
||||
prCId :: CId -> String
|
||||
prCId (CId s) = s
|
||||
|
||||
cId :: String -> CId
|
||||
cId = CId
|
||||
|
||||
prCId (CId x) = BS.unpack x
|
||||
|
||||
Reference in New Issue
Block a user