Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
binary
Commits
f797e935
Commit
f797e935
authored
Oct 26, 2020
by
Daniel Rogozin
Committed by
Vladislav Zavialov
Feb 05, 2021
Browse files
the char kind related update (#11342)
parent
b2244101
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Data/Binary/Class.hs
View file @
f797e935
...
...
@@ -9,6 +9,10 @@
{-# LANGUAGE PolyKinds #-}
#
endif
#
if
MIN_VERSION_base
(
4
,
16
,
0
)
#
define
HAS_TYPELITS_CHAR
#
endif
#
if
MIN_VERSION_base
(
4
,
8
,
0
)
#
define
HAS_NATURAL
#
define
HAS_VOID
...
...
@@ -960,11 +964,17 @@ instance Binary KindRep where
instance
Binary
TypeLitSort
where
put
TypeLitSymbol
=
putWord8
0
put
TypeLitNat
=
putWord8
1
#
ifdef
HAS_TYPELITS_CHAR
put
TypeLitChar
=
putWord8
2
#
endif
get
=
do
tag
<-
getWord8
case
tag
of
0
->
pure
TypeLitSymbol
1
->
pure
TypeLitNat
#
ifdef
HAS_TYPELITS_CHAR
2
->
pure
TypeLitChar
#
endif
_
->
fail
"GHCi.TH.Binary.putTypeLitSort: invalid tag"
putTypeRep
::
TypeRep
a
->
Put
...
...
@@ -1044,4 +1054,3 @@ instance Binary SomeTypeRep where
put
(
SomeTypeRep
rep
)
=
putTypeRep
rep
get
=
getSomeTypeRep
#
endif
Write
Preview
Supports
Markdown
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