File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 99{-# LANGUAGE PolyKinds #-}
1010#endif
1111
12+ #if MIN_VERSION_base(4,16,0)
13+ #define HAS_TYPELITS_CHAR
14+ #endif
15+
1216#if MIN_VERSION_base(4,8,0)
1317#define HAS_NATURAL
1418#define HAS_VOID
@@ -962,11 +966,17 @@ instance Binary KindRep where
962966instance Binary TypeLitSort where
963967 put TypeLitSymbol = putWord8 0
964968 put TypeLitNat = putWord8 1
969+ #ifdef HAS_TYPELITS_CHAR
970+ put TypeLitChar = putWord8 2
971+ #endif
965972 get = do
966973 tag <- getWord8
967974 case tag of
968975 0 -> pure TypeLitSymbol
969976 1 -> pure TypeLitNat
977+ #ifdef HAS_TYPELITS_CHAR
978+ 2 -> pure TypeLitChar
979+ #endif
970980 _ -> fail " GHCi.TH.Binary.putTypeLitSort: invalid tag"
971981
972982putTypeRep :: TypeRep a -> Put
@@ -1046,4 +1056,3 @@ instance Binary SomeTypeRep where
10461056 put (SomeTypeRep rep) = putTypeRep rep
10471057 get = getSomeTypeRep
10481058#endif
1049-
You can’t perform that action at this time.
0 commit comments