-
Notifications
You must be signed in to change notification settings - Fork 23
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
MonadFail instance for GHC 8.6 #22
base: master
Are you sure you want to change the base?
Conversation
@mtolly, do you have an interest in maybe taking over maintainership of HPDF on hackage? |
won't compile for me with base-4.10.1.0
|
works with base-4.11.1.0 ST isn't monad fail until 4.11 suggestion here is also |
Thanks @dten, I've edited the commit with that. Though it looks like #23 would be a better change to use; the MonadFail instance is overkill since it was only used for one failing @nomeata Tbh I probably wouldn't be the best person - I could maybe keep up with basic compiler fixes and that sort of thing but I don't know much of anything about the PDF format internals. |
That pr has a lot more changes in it. Your change worked and I was easy to verify 👍 |
@@ -186,6 +189,11 @@ instance Monad Draw where | |||
unDraw (f a) env | |||
return x = Draw $ \_env -> return x | |||
|
|||
#if MIN_VERSION_base(4,11,0) | |||
instance Fail.MonadFail Draw where | |||
fail s = Draw $ \_ -> Fail.fail s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in my view this is the wrong way to go. the reason the original code was actually fine, was that the list is defined to be infinite, so that should be expressed by using, e.g., http://hackage.haskell.org/package/inflist-0.0.1/docs/src/Data-InfList.html#InfList
i've implemented that here: #27
Fixed in 1.5.0 |
Closes #21
CPP-limited to
base
4.9.0.0 and up based on the info here.