Skip to content

Commit

Permalink
Require bytestring <= 0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
sol committed Aug 31, 2023
1 parent a8db594 commit d884776
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies:
- ansi-terminal
- directory
- http-client >= 0.5.0
- bytestring
- bytestring >= 0.11
- filepath
- unix
- async
Expand Down
10 changes: 5 additions & 5 deletions sensei.cabal

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions src/ReadHandle.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,7 @@ import qualified Data.ByteString.Char8 as B
import Data.IORef
import System.IO hiding (stdin, stdout, stderr, isEOF)

#if MIN_VERSION_bytestring(0,11,0)
import Data.ByteString (dropEnd)
#else
import qualified Data.ByteString.Internal as B
dropEnd :: Int -> ByteString -> ByteString
dropEnd n ps@(B.PS x offset len)
| n <= 0 = ps
| n >= len = B.empty
| otherwise = B.PS x offset (len - n)
#endif

-- | Truly random marker, used to separate expressions.
--
Expand Down

0 comments on commit d884776

Please sign in to comment.