Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
havm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tiger
havm
Commits
17e8235b
Commit
17e8235b
authored
Feb 19, 2020
by
Bruno BELANYI
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bb/fix-fail-monad' into 'master'
Resolve "Cannot compile on GHC 8.8+" See merge request
!3
parents
eae0f88e
e3c722a6
Pipeline
#16953
passed with stage
in 49 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
src/VMMonad.hs
src/VMMonad.hs
+6
-0
No files found.
src/VMMonad.hs
View file @
17e8235b
{-# LANGUAGE CPP #-}
module
VMMonad
(
Mnd
,
module
VMMonad
(
Mnd
,
run
,
lift
,
run
,
lift
,
rfetch
,
rstore
,
rpush
,
rpop
,
rfetch
,
rstore
,
rpush
,
rpop
,
...
@@ -24,6 +26,7 @@ import Memory (Memory)
...
@@ -24,6 +26,7 @@ import Memory (Memory)
import
Annotation
(
Ann
)
import
Annotation
(
Ann
)
import
Opt
(
OptVal
)
import
Opt
(
OptVal
)
import
Control.Monad
(
ap
,
liftM
)
import
Control.Monad
(
ap
,
liftM
)
-- Control.Monad.Fail import has become redundant in GHC 8.8+
import
qualified
Control.Monad.Fail
as
Fail
import
qualified
Control.Monad.Fail
as
Fail
import
qualified
Cpu
(
initialize
,
rfetch
,
rstore
,
rpush
,
rpop
)
import
qualified
Cpu
(
initialize
,
rfetch
,
rstore
,
rpush
,
rpop
)
import
qualified
Code
(
initialize
,
cload
,
cfind
,
cstore
,
cfetch
)
import
qualified
Code
(
initialize
,
cload
,
cfind
,
cstore
,
cfetch
)
...
@@ -62,7 +65,10 @@ instance Monad Mnd where
...
@@ -62,7 +65,10 @@ instance Monad Mnd where
do
x
<-
c
r
do
x
<-
c
r
case
f
x
of
(
Mnd
c'
)
->
c'
r
case
f
x
of
(
Mnd
c'
)
->
c'
r
#
if
!
(
MIN_VERSION_base
(
4
,
13
,
0
))
-- Monad(fail) is removed in GHC 8.8+
fail
=
Fail
.
fail
fail
=
Fail
.
fail
#
endif
instance
Fail
.
MonadFail
Mnd
where
instance
Fail
.
MonadFail
Mnd
where
fail
=
error
"fail: invalid pattern matching"
fail
=
error
"fail: invalid pattern matching"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment