Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

exported interned string constructors

  • Loading branch information...
commit 250399d7d2f9a57de187ecaa7dab738d58602bd5 1 parent 48a3b70
Edward Kmett authored July 31, 2011
12  Data/ByteString/Interned.hs
... ...
@@ -1,6 +1,6 @@
1 1
 {-# LANGUAGE TypeFamilies, FlexibleInstances #-}
2 2
 module Data.ByteString.Interned
3  
-  ( InternedByteString
  3
+  ( InternedByteString(..)
4 4
   ) where
5 5
 
6 6
 import Data.String
@@ -10,7 +10,7 @@ import Data.ByteString.Char8 as Char8
10 10
 import Data.Hashable
11 11
 import Data.Function (on)
12 12
 
13  
-data InternedByteString = IBS 
  13
+data InternedByteString = InternedByteString 
14 14
   {-# UNPACK #-} !(Id InternedByteString)
15 15
   {-# UNPACK #-} !ByteString
16 16
 
@@ -24,19 +24,19 @@ instance Ord InternedByteString where
24 24
   compare = compare `on` identity
25 25
 
26 26
 instance Show InternedByteString where
27  
-  showsPrec d (IBS _ b) = showsPrec d b
  27
+  showsPrec d (InternedByteString _ b) = showsPrec d b
28 28
 
29 29
 instance Interned InternedByteString where
30 30
   type Uninterned InternedByteString = ByteString
31 31
   data Description InternedByteString = DBS {-# UNPACK #-} !ByteString
32 32
     deriving (Eq) 
33 33
   describe = DBS
34  
-  identify = IBS
35  
-  identity (IBS i _) = i
  34
+  identify = InternedByteString
  35
+  identity (InternedByteString i _) = i
36 36
   cache = ibsCache
37 37
 
38 38
 instance Uninternable InternedByteString where
39  
-  unintern (IBS _ b) = b 
  39
+  unintern (InternedByteString _ b) = b 
40 40
 
41 41
 instance Hashable (Description InternedByteString) where
42 42
   hash (DBS h) = hash h
2  Data/String/Interned.hs
... ...
@@ -1,6 +1,6 @@
1 1
 {-# LANGUAGE TypeFamilies, FlexibleInstances #-}
2 2
 module Data.String.Interned
3  
-  ( InternedString
  3
+  ( InternedString(..)
4 4
   ) where
5 5
 
6 6
 import Data.String

0 notes on commit 250399d

Please sign in to comment.
Something went wrong with that request. Please try again.