Skip to content

Commit

Permalink
Make Data.ByteString.Short work on several ghc versions
Browse files Browse the repository at this point in the history
Older GHC do not keep the length of the ByteArray# in a useful way so
we have to store it separately.

Adjust the implementations to use primop wrappers with ST or IO rather
than direct primops and State#.

Check core for the important functions and made a few adjustments.
  • Loading branch information
dcoutts committed Oct 2, 2013
1 parent 4720784 commit eaa31e0
Show file tree
Hide file tree
Showing 3 changed files with 318 additions and 151 deletions.
6 changes: 3 additions & 3 deletions Data/ByteString/Short.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# LANGUAGE DeriveDataTypeable, CPP, BangPatterns, RankNTypes,
ForeignFunctionInterface, MagicHash, UnboxedTuples #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 701
{-# LANGUAGE Trustworthy #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
#endif

-- |
-- Module : Data.ByteString.Short
Expand Down
Loading

0 comments on commit eaa31e0

Please sign in to comment.