File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ library
100
100
-- GHC bundled libs
101
101
build-depends :
102
102
base >= 4.7.0.0 && < 5 ,
103
- bytestring >= 0.10.4.0 && < 0.11 ,
103
+ bytestring >= 0.10.4.0 && < 0.12 ,
104
104
containers >= 0.5.5.1 && < 0.7 ,
105
105
deepseq >= 1.3.0.0 && < 1.5 ,
106
106
ghc-prim >= 0.2 && < 0.8 ,
Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ packages: .
3
3
packages : attoparsec-iso8601
4
4
packages : examples
5
5
tests : true
6
+ -- constraints: aeson +cffi
Original file line number Diff line number Diff line change
1
+ {-# LANGUAGE CPP #-}
1
2
{-# LANGUAGE ForeignFunctionInterface #-}
2
3
{-# LANGUAGE MagicHash #-}
3
4
{-# LANGUAGE UnliftedFFITypes #-}
@@ -29,7 +30,12 @@ foreign import ccall unsafe "_js_decode_string" c_js_decode
29
30
-> Ptr Word8 -> Ptr Word8 -> IO CInt
30
31
31
32
unescapeText' :: ByteString -> Text
33
+ #if MIN_VERSION_bytestring(0,11,0)
34
+ unescapeText' (BS fp len) = runText $ \ done -> do
35
+ let off = 0
36
+ #else
32
37
unescapeText' (PS fp off len) = runText $ \ done -> do
38
+ #endif
33
39
let go dest = withForeignPtr fp $ \ ptr ->
34
40
with (0 :: CSize ) $ \ destOffPtr -> do
35
41
let end = ptr `plusPtr` (off + len)
You can’t perform that action at this time.
0 commit comments