on master help sign in
Move to Data.* module namespace
10f0317Duncan Coutts
Text.hs → Data/Text.hsrenamed+6−6
@@ -1,7 +1,7 @@
1{-# OPTIONS_GHC -fglasgow-exts #-}
1{-# OPTIONS_GHC -fglasgow-exts #-}
2{-# LANGUAGE BangPatterns #-}
2{-# LANGUAGE BangPatterns #-}
3
3
4−module Text where
4+module Data.Text where
5
5
6import Prelude (Char,Bool,Int,Maybe,String,
6import Prelude (Char,Bool,Int,Maybe,String,
7 Eq,(==),
7 Eq,(==),
@@ -21,14 +21,14 @@ import Data.Monoid(Monoid(..))
21import Data.Word(Word16(..))
21import Data.Word(Word16(..))
22import System.IO hiding (readFile)
22import System.IO hiding (readFile)
23
23
24−import qualified Text.Fusion as S
24+import qualified Data.Text.Fusion as S
25−import Text.Fusion (Stream(..),Step(..),Encoding(..),
25+import Data.Text.Fusion (Stream(..),Step(..),Encoding(..),
26 stream,unstream,stream_bs,unstream_bs,restream,
26 stream,unstream,stream_bs,unstream_bs,restream,
27 errorEmptyList)
27 errorEmptyList)
28−import Text.Internal(Text(..),empty)
28+import Data.Text.Internal(Text(..),empty)
29import qualified Prelude as P
29import qualified Prelude as P
30−import Text.UnsafeChar(unsafeChr)
30+import Data.Text.UnsafeChar(unsafeChr)
31−import qualified Text.Utf16 as U16
31+import qualified Data.Text.Utf16 as U16
32
32
33instance Eq Text where
33instance Eq Text where
34 t1 == t2 = (stream t1) `S.eq` (stream t2)
34 t1 == t2 = (stream t1) `S.eq` (stream t2)
Text/Fusion.hs → Data/Text/Fusion.hsrenamed+6−6
@@ -1,7 +1,7 @@
1{-# OPTIONS_GHC -fglasgow-exts #-}
1{-# OPTIONS_GHC -fglasgow-exts #-}
2{-# LANGUAGE BangPatterns #-}
2{-# LANGUAGE BangPatterns #-}
3
3
4−module Text.Fusion where
4+module Data.Text.Fusion where
5
5
6import Prelude hiding (map, tail, head, foldr, filter,concat)
6import Prelude hiding (map, tail, head, foldr, filter,concat)
7
7
@@ -20,11 +20,11 @@ import Foreign.Storable(pokeByteOff)
20import GHC.Exts
20import GHC.Exts
21import System.IO.Unsafe(unsafePerformIO)
21import System.IO.Unsafe(unsafePerformIO)
22
22
23−import Text.Internal(Text(..),empty)
23+import Data.Text.Internal(Text(..),empty)
24−import Text.UnsafeChar(unsafeChr,unsafeChr8,unsafeChr32)
24+import Data.Text.UnsafeChar(unsafeChr,unsafeChr8,unsafeChr32)
25−import qualified Text.Utf8 as U8
25+import qualified Data.Text.Utf8 as U8
26−import qualified Text.Utf16 as U16
26+import qualified Data.Text.Utf16 as U16
27−import qualified Text.Utf32 as U32
27+import qualified Data.Text.Utf32 as U32
28
28
29default(Int)
29default(Int)
30
30
Text/Internal.hs → Data/Text/Internal.hsrenamed+1−1
@@ -1,4 +1,4 @@
1−module Text.Internal where
1+module Data.Text.Internal where
2
2
3import Data.Array.ST(newArray_,runSTUArray)
3import Data.Array.ST(newArray_,runSTUArray)
4import Data.Array.Unboxed(UArray(..))
4import Data.Array.Unboxed(UArray(..))
Text/UnsafeChar.hs → Data/Text/UnsafeChar.hsrenamed+1−1
@@ -1,6 +1,6 @@
1{-# OPTIONS_GHC -fglasgow-exts #-}
1{-# OPTIONS_GHC -fglasgow-exts #-}
2
2
3−module Text.UnsafeChar where
3+module Data.Text.UnsafeChar where
4
4
5import GHC.Exts
5import GHC.Exts
6import GHC.Word
6import GHC.Word
Text/Utf16.hs → Data/Text/Utf16.hsrenamed+2−2
@@ -1,6 +1,6 @@
1{-# OPTIONS_GHC -fglasgow-exts #-}
1{-# OPTIONS_GHC -fglasgow-exts #-}
2
2
3−module Text.Utf16 where
3+module Data.Text.Utf16 where
4
4
5import GHC.Exts
5import GHC.Exts
6import GHC.Word
6import GHC.Word
@@ -21,4 +21,4 @@ validate1 x1 = (x1 >= 0 && x1 < 0xD800) || (x1 > 0xDFFF && x1 < 0x10000)
21
21
22validate2 :: Word16 -> Word16 -> Bool
22validate2 :: Word16 -> Word16 -> Bool
23validate2 x1 x2 = (x1 >= 0xD800 && x1 <= 0xDBFF) &&
23validate2 x1 x2 = (x1 >= 0xD800 && x1 <= 0xDBFF) &&
24− (x2 >= 0xDC00 && x2 <= 0xDFFF)
24+ (x2 >= 0xDC00 && x2 <= 0xDFFF)
Text/Utf32.hs → Data/Text/Utf32.hsrenamed+1−1
@@ -1,4 +1,4 @@
1−module Text.Utf32 where
1+module Data.Text.Utf32 where
2
2
3import Data.Bits
3import Data.Bits
4import Data.Char
4import Data.Char
Text/Utf32/Fusion.hs → Data/Text/Utf32/Fusion.hsrenamed

The content is the same.

Text/Utf32/Internal.hs → Data/Text/Utf32/Internal.hsrenamed

The content is the same.

Text/Utf8.hs → Data/Text/Utf8.hsrenamed+1−1
@@ -1,5 +1,5 @@
1{-# OPTIONS_GHC -fglasgow-exts #-}
1{-# OPTIONS_GHC -fglasgow-exts #-}
2−module Text.Utf8 where
2+module Data.Text.Utf8 where
3
3
4import Data.Char(ord)
4import Data.Char(ord)
5import Data.Bits
5import Data.Bits
Text/Utf8/Fusion.hs → Data/Text/Utf8/Fusion.hsrenamed

The content is the same.

Text/Utf8/Internal.hs → Data/Text/Utf8/Internal.hsrenamed

The content is the same.