-
Notifications
You must be signed in to change notification settings - Fork 158
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
Error when calling Text.take with a negative 'n' value. #227
Comments
indeed take n0 (Stream next0 s0 len) =
- Stream next (n0 :*: s0) (smaller len (fromIntegral (max 0 n0)))
+ Stream next (n0 :*: s0) (smaller len (codePointsSize $ fromIntegral n0)) codePointsSize :: Int -> Size
codePointsSize n = Between n (2*n) |
@bgamari does #227 (comment) ring any bells? |
bgamari
added a commit
to bgamari/text
that referenced
this issue
Aug 22, 2018
bgamari
added a commit
to bgamari/text
that referenced
this issue
Aug 22, 2018
bgamari
added a commit
to bgamari/text
that referenced
this issue
Aug 22, 2018
kuk0
pushed a commit
to kuk0/text
that referenced
this issue
Sep 19, 2018
kuk0
pushed a commit
to kuk0/text
that referenced
this issue
Sep 19, 2018
kuk0
pushed a commit
to kuk0/text
that referenced
this issue
Sep 26, 2018
kuk0
pushed a commit
to kuk0/text
that referenced
this issue
Sep 26, 2018
kuk0
pushed a commit
to kuk0/text
that referenced
this issue
Sep 26, 2018
kuk0
pushed a commit
to kuk0/text
that referenced
this issue
Sep 26, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example:
throws the following error:
The problem only seems to happen with O1 or higher, so it is likely related to the fusion case.
Also, the problem seems to have be introduced somewhere after text-1.2.2.2.
The text was updated successfully, but these errors were encountered: