fay-base 0.19.3 → 0.19.4
raw patch · 3 files changed
+14/−7 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Data.Text: instance IsString Text
- Data.Text: pack :: Text -> String
+ Data.Text: pack :: String -> Text
Files
- CHANGELOG.md +5/−0
- fay-base.cabal +1/−1
- src/Data/Text.hs +8/−6
CHANGELOG.md view
@@ -1,5 +1,10 @@ ## Changelog +#### 0.19.4 (2014-10-21)++* Fix type signature of `Data.Text.pack`.+* Add IsString instance for `Text` for using the ffi with `RebindableSyntax` enabled.+ ### 0.19.3 (2014-10-21) * Lots of additions adding the following modules:
fay-base.cabal view
@@ -1,5 +1,5 @@ name: fay-base-version: 0.19.3+version: 0.19.4 synopsis: The base package for Fay. description: The base package for Fay. This package amongst others exports Prelude and FFI which you probably want to use with Fay.
src/Data/Text.hs view
@@ -1,8 +1,9 @@-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE EmptyDataDecls #-}+{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE NoRebindableSyntax #-}+{-# LANGUAGE PackageImports #-}+{-# LANGUAGE StandaloneDeriving #-} -- | Compatible API with the `text' package. @@ -56,19 +57,20 @@ -- * Breaking into lines and words , unlines , lines- , ) where import Data.Data import FFI import Data.Nullable (fromNullable)-import Prelude (Eq,String,Int,Bool,Char,Maybe,Double)+import Prelude (Eq,String,Int,Bool,Char,Maybe,Double,error)+import qualified "base" Data.String as B (IsString (..)) -- | A space efficient, packed, unboxed Unicode text type. data Text deriving instance Eq Text deriving instance Data Text deriving instance Typeable Text+instance B.IsString Text where fromString = error "the method fromString can never be called" -- | O(n) The intercalate function takes a Text and a list of Texts and -- concatenates the list after interspersing the first argument@@ -95,7 +97,7 @@ -- | O(n) Convert a String into a Text. Subject to fusion. Performs -- replacement on invalid scalar values.-pack :: Text -> String+pack :: String -> Text pack = ffi "%1" -- | O(n) Convert a Text into a String. Subject to fusion.