File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
{-# LANGUAGE Rank2Types, MultiParamTypeClasses, FlexibleContexts,
2
2
TypeFamilies, ScopedTypeVariables, BangPatterns #-}
3
+ {-# LANGUAGE CPP #-}
4
+ #if __GLASGOW_HASKELL__ >= 800
5
+ {-# LANGUAGE TypeFamilyDependencies #-}
6
+ #endif
3
7
{-# OPTIONS_HADDOCK hide #-}
4
8
5
9
-- |
@@ -24,9 +28,13 @@ import qualified Data.Vector.Generic.Mutable.Base as M
24
28
import Control.Monad.Primitive
25
29
26
30
-- | @Mutable v s a@ is the mutable version of the pure vector type @v a@ with
27
- -- the state token @s@
31
+ -- the state token @s@. It is injective on GHC 8 and newer.
28
32
--
33
+ #if MIN_VERSION_base(4,9,0)
34
+ type family Mutable (v :: * -> * ) = (mv :: * -> * -> * ) | mv -> v
35
+ #else
29
36
type family Mutable (v :: * -> * ) :: * -> * -> *
37
+ #endif
30
38
31
39
-- | Class of immutable vectors. Every immutable vector is associated with its
32
40
-- mutable version through the 'Mutable' type family. Methods of this class
You can’t perform that action at this time.
0 commit comments