Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
binary
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
Packages
binary
Commits
d0912c8d
Commit
d0912c8d
authored
7 years ago
by
Vladislav Zavialov
Browse files
Options
Downloads
Patches
Plain Diff
Don't use * as Type in the presence of TypeOperators
parent
b660e3d2
No related branches found
Tags
ghc-7.10.2-rc2
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Data/Binary/Generic.hs
+12
-1
12 additions, 1 deletion
src/Data/Binary/Generic.hs
with
12 additions
and
1 deletion
src/Data/Binary/Generic.hs
+
12
−
1
View file @
d0912c8d
...
@@ -3,6 +3,10 @@
...
@@ -3,6 +3,10 @@
{-# LANGUAGE Safe #-}
{-# LANGUAGE Safe #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
#
if
__GLASGOW_HASKELL__
>=
800
#
define
HAS_DATA_KIND
#
endif
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-- |
-- |
-- Module : Data.Binary.Generic
-- Module : Data.Binary.Generic
...
@@ -27,6 +31,9 @@ import Data.Binary.Put
...
@@ -27,6 +31,9 @@ import Data.Binary.Put
import
Data.Bits
import
Data.Bits
import
Data.Word
import
Data.Word
import
Data.Monoid
((
<>
))
import
Data.Monoid
((
<>
))
#
ifdef
HAS_DATA_KIND
import
Data.Kind
#
endif
import
GHC.Generics
import
GHC.Generics
import
Prelude
-- Silence AMP warning.
import
Prelude
-- Silence AMP warning.
...
@@ -136,7 +143,11 @@ instance GBinaryPut a => GSumPut (C1 c a) where
...
@@ -136,7 +143,11 @@ instance GBinaryPut a => GSumPut (C1 c a) where
class
SumSize
f
where
class
SumSize
f
where
sumSize
::
Tagged
f
Word64
sumSize
::
Tagged
f
Word64
newtype
Tagged
(
s
::
*
->
*
)
b
=
Tagged
{
unTagged
::
b
}
#
ifdef
HAS_DATA_KIND
newtype
Tagged
(
s
::
Type
->
Type
)
b
=
Tagged
{
unTagged
::
b
}
#
else
newtype
Tagged
(
s
::
*
->
*
)
b
=
Tagged
{
unTagged
::
b
}
#
endif
instance
(
SumSize
a
,
SumSize
b
)
=>
SumSize
(
a
:+:
b
)
where
instance
(
SumSize
a
,
SumSize
b
)
=>
SumSize
(
a
:+:
b
)
where
sumSize
=
Tagged
$
unTagged
(
sumSize
::
Tagged
a
Word64
)
+
sumSize
=
Tagged
$
unTagged
(
sumSize
::
Tagged
a
Word64
)
+
...
...
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