Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hsc2hs
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
hsc2hs
Commits
63241844
Verified
Commit
63241844
authored
6 years ago
by
Herbert Valerio Riedel
Browse files
Options
Downloads
Patches
Plain Diff
MonadFail forward-compat
It turns out that the `fail` method was unused to begin with.
parent
212451d7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
HSCParser.hs
+4
-2
4 additions, 2 deletions
HSCParser.hs
with
4 additions
and
2 deletions
HSCParser.hs
+
4
−
2
View file @
63241844
...
...
@@ -38,14 +38,16 @@ instance Monad Parser where
Success
pos''
(
out1
++
out2
)
imp''
b
Failure
pos''
msg
->
Failure
pos''
msg
Failure
pos'
msg
->
Failure
pos'
msg
fail
msg
=
Parser
$
\
pos
_
->
Failure
pos
msg
failp
::
String
->
Parser
a
failp
msg
=
Parser
$
\
pos
_
->
Failure
pos
msg
instance
Alternative
Parser
where
empty
=
mzero
(
<|>
)
=
mplus
instance
MonadPlus
Parser
where
mzero
=
fail
"mzero"
mzero
=
fail
p
"mzero"
Parser
m
`
mplus
`
Parser
n
=
Parser
$
\
pos
s
->
case
m
pos
s
of
success
@
(
Success
_
_
_
_
)
->
success
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment