txt 0.0.0.0 → 0.0.0.1
raw patch · 2 files changed
+13/−10 lines, 2 filesdep +deepseqdep ~bytestringdep ~smallcheck
Dependencies added: deepseq
Dependency ranges changed: bytestring, smallcheck
Files
- Data/Text.hs +8/−7
- txt.cabal +5/−3
Data/Text.hs view
@@ -1,12 +1,13 @@-module Data.Text where+module Data.Text (Text) where -import Data.Bytestring-import Data.Bytestring.UTF8+import Data.ByteString+import Data.ByteString.UTF8 import qualified Data.String as S+import Text.Read (Read (..)) -newtype Text = Text ByteString+newtype Text = Text { unText :: ByteString } deriving (Eq, Ord, Semigroup, Monoid) -instance S.IsString Text where fromString = fromString-instance Read Text where readPrec = fromString <$> readPrec-instance Show Text where showsPrec n = showsPrec n . toString+instance S.IsString Text where fromString = Text . fromString+instance Read Text where readPrec = S.fromString <$> readPrec+instance Show Text where showsPrec n = showsPrec n . toString . unText
txt.cabal view
@@ -1,5 +1,5 @@ name: txt-version: 0.0.0.0+version: 0.0.0.1 synopsis: Text -- description: license: BSD3@@ -16,7 +16,8 @@ hs-source-dirs: . exposed-modules: Data.Text build-depends: base >= 4.7 && < 5- , bytestring >=0.10.8 && <0.11+ , bytestring >=0.10 && <0.11+ , deepseq >=1.1 && <1.5 , utf8-string >=1.0 && <1.1 default-language: Haskell2010 default-extensions: UnicodeSyntax@@ -28,6 +29,7 @@ , FlexibleContexts , FlexibleInstances , StandaloneDeriving+ , GeneralizedNewtypeDeriving , DeriveFunctor , DeriveFoldable , DeriveTraversable@@ -40,7 +42,7 @@ hs-source-dirs: test main-is: Main.hs build-depends: base >=4.11 && <5- , smallcheck >=1.1.3+ , smallcheck >=1.1 , tasty >=1.0 , tasty-smallcheck >=0.8 , txt