bytestring-plain 0.1.0.0 → 0.1.0.1
raw patch · 3 files changed
+30/−12 lines, 3 filesdep ~base
Dependency ranges changed: base
Files
- Data/ByteString/Plain.hs +2/−4
- bytestring-plain.cabal +21/−8
- changelog +7/−0
Data/ByteString/Plain.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE MagicHash, DeriveDataTypeable #-}+{-# LANGUAGE MagicHash, DeriveDataTypeable, UnliftedFFITypes #-} -- | -- Stability : experimental@@ -103,12 +103,10 @@ fromStrict :: B.ByteString -> ByteString fromStrict (B.PS _ _ 0) = empty-fromStrict (B.PS (ForeignPtr addr (PlainPtr mbarr#)) 0 l)- | neAddr# addr' addr = error "internal error" -- sanity check+fromStrict (B.PS (ForeignPtr _ (PlainPtr mbarr#)) 0 l) | l' == l = PBS mbarr# where l' = I# (sizeofMutableByteArray# mbarr#)- addr' = byteArrayContents# (unsafeCoerce# mbarr#) fromStrict bs = fromStrict (B.copy bs) -- this assumes -- ByteString internals return a trimmed -- ForeignPtr/PlainPtr string; otherwise there's
bytestring-plain.cabal view
@@ -1,5 +1,5 @@ name: bytestring-plain-version: 0.1.0.0+version: 0.1.0.1 synopsis: Plain byte strings ('ForeignPtr'-less 'ByteString's) homepage: https://github.com/hvr/bytestring-plain bug-reports: https://github.com/hvr/bytestring-plain/issues@@ -10,8 +10,8 @@ copyright: (c) 2013 Herbert Valerio Riedel category: Data build-type: Simple-tested-with: GHC ==7.6.3-cabal-version: >=1.14+tested-with: GHC ==7.6.3, GHC ==7.6.2, GHC ==7.6.1+cabal-version: >=1.10 description: More compact representation for strict 'ByteString's avoiding the overhead and indirection caused by 'ForeignPtr'.@@ -22,18 +22,31 @@ . See documentation in "Data.ByteString.Plain" for more details about this representation.+ .+ As an alternative, recent `bytestring` versions provide+ "Data.ByteString.Short" which has a similiar overhead but uses unpinned+ memory instead (and thus requires an additional string data copy in+ contrast to "Data.ByteString.Plain" which allows to share the string data+ with the associated "Data.ByteString" value). +extra-source-files: changelog+ library default-language: Haskell2010 exposed-modules: Data.ByteString.Plain- other-extensions: MagicHash- build-depends: base >= 4.6 && <4.7,+ other-extensions: DeriveDataTypeable, MagicHash, UnliftedFFITypes+ build-depends: base >= 4.6 && <4.8, bytestring >= 0.10 && <0.11, ghc-prim >= 0.3 && <0.4, deepseq >= 1.2 && <1.4, hashable >= 1.1.1 && <1.3 ghc-options: -Wall -Source-Repository head- Type: git- Location: https://github.com/hvr/bytestring-plain.git+source-repository head+ type: git+ location: https://github.com/hvr/bytestring-plain.git++source-repository this+ type: git+ location: https://github.com/hvr/bytestring-plain.git+ tag: v0.1.0.1
+ changelog view
@@ -0,0 +1,7 @@+0.1.0.1 Nov 2013++ * Add support for GHC 7.7++0.1.0.0 Aug 2013++ * Initial release