edison
edison copied to clipboard
Supported GHC 8.8.1
GHC 8.8.1-rc1 was announced. In this PR I fixed the compilation with this version of GHC.
Blocking https://github.com/agda/agda/issues/3725.
I think turning fail
into error
isn't the right fix in the majority of these cases. We probably actually want to turn most of the functions with a Moand
constraint into an Alternative
constraint instead and use empty
instead of fail
. I think this more accurately captures the original intent of the API.
In particular, in the (common, I suspect) case that the container type is Maybe
it would continue to return Nothing
in cases where elements are not found instead of going to error
.
What do you think?
Another option would be to use MonadFail
.
Another option would be to use
MonadFail
.
This was my first try but I had some problems. Now, I could fix the problems based on the new module Agda/Utils/Fail.hs (thanks @UlfNorell). Note that I updated (force-pushed) the PR.
This looks like a better fix to me. I'll work on finding some time soon (this weekend probably) to merge this and put up a new release.