File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 3
3
{-# LANGUAGE Safe #-}
4
4
{-# OPTIONS_GHC -fno-warn-orphans #-}
5
5
6
+ #if __GLASGOW_HASKELL__ >= 800
7
+ #define HAS_DATA_KIND
8
+ #endif
9
+
6
10
-----------------------------------------------------------------------------
7
11
-- |
8
12
-- Module : Data.Binary.Generic
@@ -27,6 +31,9 @@ import Data.Binary.Put
27
31
import Data.Bits
28
32
import Data.Word
29
33
import Data.Monoid ((<>) )
34
+ #ifdef HAS_DATA_KIND
35
+ import Data.Kind
36
+ #endif
30
37
import GHC.Generics
31
38
import Prelude -- Silence AMP warning.
32
39
@@ -136,7 +143,11 @@ instance GBinaryPut a => GSumPut (C1 c a) where
136
143
class SumSize f where
137
144
sumSize :: Tagged f Word64
138
145
139
- newtype Tagged (s :: * -> * ) b = Tagged { unTagged :: b }
146
+ #ifdef HAS_DATA_KIND
147
+ newtype Tagged (s :: Type -> Type ) b = Tagged { unTagged :: b }
148
+ #else
149
+ newtype Tagged (s :: * -> * ) b = Tagged { unTagged :: b }
150
+ #endif
140
151
141
152
instance (SumSize a , SumSize b ) => SumSize (a :+: b ) where
142
153
sumSize = Tagged $ unTagged (sumSize :: Tagged a Word64 ) +
You can’t perform that action at this time.
0 commit comments