Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

exported interned string constructors

  • Loading branch information...
commit 250399d7d2f9a57de187ecaa7dab738d58602bd5 1 parent 48a3b70
@ekmett authored
Showing with 7 additions and 7 deletions.
  1. +6 −6 Data/ByteString/Interned.hs
  2. +1 −1  Data/String/Interned.hs
View
12 Data/ByteString/Interned.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE TypeFamilies, FlexibleInstances #-}
module Data.ByteString.Interned
- ( InternedByteString
+ ( InternedByteString(..)
) where
import Data.String
@@ -10,7 +10,7 @@ import Data.ByteString.Char8 as Char8
import Data.Hashable
import Data.Function (on)
-data InternedByteString = IBS
+data InternedByteString = InternedByteString
{-# UNPACK #-} !(Id InternedByteString)
{-# UNPACK #-} !ByteString
@@ -24,19 +24,19 @@ instance Ord InternedByteString where
compare = compare `on` identity
instance Show InternedByteString where
- showsPrec d (IBS _ b) = showsPrec d b
+ showsPrec d (InternedByteString _ b) = showsPrec d b
instance Interned InternedByteString where
type Uninterned InternedByteString = ByteString
data Description InternedByteString = DBS {-# UNPACK #-} !ByteString
deriving (Eq)
describe = DBS
- identify = IBS
- identity (IBS i _) = i
+ identify = InternedByteString
+ identity (InternedByteString i _) = i
cache = ibsCache
instance Uninternable InternedByteString where
- unintern (IBS _ b) = b
+ unintern (InternedByteString _ b) = b
instance Hashable (Description InternedByteString) where
hash (DBS h) = hash h
View
2  Data/String/Interned.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE TypeFamilies, FlexibleInstances #-}
module Data.String.Interned
- ( InternedString
+ ( InternedString(..)
) where
import Data.String
Please sign in to comment.
Something went wrong with that request. Please try again.