Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
binary
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Rinat Striungis
binary
Commits
94855814
Unverified
Commit
94855814
authored
6 years ago
by
Lennart Kolmodin
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #161 from hvr/pr/base413
Compatibility with future ghc-8.8/base-4.13
parents
775b4561
0f752eca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Data/Binary/Class.hs
+1
-1
1 addition, 1 deletion
src/Data/Binary/Class.hs
src/Data/Binary/Get/Internal.hs
+11
-3
11 additions, 3 deletions
src/Data/Binary/Get/Internal.hs
with
12 additions
and
4 deletions
src/Data/Binary/Class.hs
+
1
−
1
View file @
94855814
...
...
@@ -974,7 +974,7 @@ putTypeRep (Fun arg res) = do
put
(
3
::
Word8
)
putTypeRep
arg
putTypeRep
res
putTypeRep
_
=
fail
"GHCi.TH.Binary.putTypeRep: Impossible"
putTypeRep
_
=
error
"GHCi.TH.Binary.putTypeRep: Impossible"
getSomeTypeRep
::
Get
SomeTypeRep
getSomeTypeRep
=
do
...
...
This diff is collapsed.
Click to expand it.
src/Data/Binary/Get/Internal.hs
+
11
−
3
View file @
94855814
...
...
@@ -91,12 +91,20 @@ type Success a r = B.ByteString -> a -> Decoder r
instance
Monad
Get
where
return
=
pure
(
>>=
)
=
bindG
#
if
MIN_VERSION_base
(
4
,
9
,
0
)
fail
=
Fail
.
fail
#
if
!
(
MIN_VERSION_base
(
4
,
9
,
0
))
fail
=
failG
-- base < 4.9
#
elif
!
(
MIN_VERSION_base
(
4
,
13
,
0
))
fail
=
Fail
.
fail
-- base < 4.13
#
endif
-- NB: Starting with base-4.13, the `fail` method
-- has been removed from the `Monad`-class
-- according to the MonadFail proposal (MFP) schedule
-- which completes the process that started with base-4.9.
#
if
MIN_VERSION_base
(
4
,
9
,
0
)
instance
Fail
.
MonadFail
Get
where
#
endif
fail
=
failG
#
endif
bindG
::
Get
a
->
(
a
->
Get
b
)
->
Get
b
bindG
(
C
c
)
f
=
C
$
\
i
ks
->
c
i
(
\
i'
a
->
(
runCont
(
f
a
))
i'
ks
)
...
...
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