Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require bytestring <= 0.11 #119

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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