diff --git a/hoogle.cabal b/hoogle.cabal index c5f4c39d..c2943bee 100644 --- a/hoogle.cabal +++ b/hoogle.cabal @@ -59,7 +59,6 @@ library directory, extra >= 1.6.6, filepath, - foundation >= 0.0.13, old-locale, hashable, haskell-src-exts >= 1.22 && < 1.24, @@ -74,7 +73,7 @@ library storable-tuple, tar, template-haskell, - text, + text >= 2, time >= 1.5, transformers, uniplate, diff --git a/src/General/Str.hs b/src/General/Str.hs index e53ae272..d6fa46e7 100644 --- a/src/General/Str.hs +++ b/src/General/Str.hs @@ -8,12 +8,11 @@ module General.Str( BStr0, bstr0Join, bstr0Split ) where -import qualified Foundation as Fdn -import qualified Foundation.Collection as Fdn import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.UTF8 as US import qualified Data.ByteString.Lazy.Char8 as LBS import qualified Data.ByteString.Lazy.UTF8 as LUS +import qualified Data.Text as T import Control.DeepSeq import Data.Char import Data.Data @@ -23,8 +22,8 @@ import Data.String import Prelude -newtype Str = Str {fromStr :: Fdn.String} - deriving (Data,Typeable,Eq,Ord,Semigroup,Monoid) +newtype Str = Str { fromStr :: T.Text } + deriving (Data, Typeable, Eq, Ord, Semigroup, Monoid) instance Show Str where show = strUnpack instance NFData Str where rnf x = x `seq` () @@ -36,19 +35,19 @@ type LBStr = LBS.ByteString strPack :: String -> Str -strPack = Str . fromString +strPack = Str . T.pack strUnpack :: Str -> String -strUnpack = Fdn.toList . fromStr +strUnpack = T.unpack . fromStr strCons :: Char -> Str -> Str -strCons c = Str . Fdn.cons c . fromStr +strCons c = Str . T.cons c . fromStr strCopy :: Str -> Str -strCopy = Str . Fdn.copy . fromStr +strCopy = Str . T.copy . fromStr strNull :: Str -> Bool -strNull = Fdn.null . fromStr +strNull = T.null . fromStr bstrPack :: String -> BStr bstrPack = US.fromString