Skip to content

Commit be478e8

Browse files
committed
Stop using * as alias for Type
1 parent 82b59b2 commit be478e8

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Data/Functor/Misc.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ import Data.GADT.Compare
5050
import Data.GADT.Show
5151
import Data.IntMap (IntMap)
5252
import qualified Data.IntMap as IntMap
53+
import Data.Kind (Type)
5354
import Data.Map (Map)
5455
import qualified Data.Map as Map
5556
import Data.Some (Some, mkSome)
@@ -63,7 +64,7 @@ import Data.Typeable hiding (Refl)
6364

6465
-- | 'Const2' stores a value of a given type 'k' and ensures that a particular
6566
-- type 'v' is always given for the last type parameter
66-
data Const2 :: * -> x -> x -> * where
67+
data Const2 :: Type -> x -> x -> Type where
6768
Const2 :: k -> Const2 k v v
6869
deriving (Typeable)
6970

@@ -130,7 +131,7 @@ weakenDMapWith f = Map.fromDistinctAscList . map (\(k :=> v) -> (mkSome k, f v))
130131
-- | 'WrapArg' can be used to tag a value in one functor with a type
131132
-- representing another functor. This was primarily used with dependent-map <
132133
-- 0.2, in which the value type was not wrapped in a separate functor.
133-
data WrapArg :: (k -> *) -> (k -> *) -> * -> * where
134+
data WrapArg :: (k -> Type) -> (k -> Type) -> Type -> Type where
134135
WrapArg :: f a -> WrapArg g f (g a)
135136

136137
deriving instance Eq (f a) => Eq (WrapArg g f (g' a))

src/Data/Patch/DMapWithMove.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import Data.Functor.Misc
3333
import Data.Functor.Product
3434
import Data.GADT.Compare (GEq (..), GCompare (..))
3535
import Data.GADT.Show (GShow, gshow)
36+
import Data.Kind (Type)
3637
import qualified Data.Map as Map
3738
import Data.Maybe
3839
import Data.Monoid.DecidablyEmpty
@@ -67,7 +68,7 @@ data NodeInfo k v a = NodeInfo
6768

6869
-- |Structure describing a particular change to a key, be it inserting a new key (@From_Insert@), updating an existing key (@From_Insert@ again), deleting a
6970
-- key (@From_Delete@), or moving a key (@From_Move@).
70-
data From (k :: a -> *) (v :: a -> *) :: a -> * where
71+
data From (k :: a -> Type) (v :: a -> Type) :: a -> Type where
7172
-- |Insert a new or update an existing key with the given value @v a@
7273
From_Insert :: v a -> From k v a
7374
-- |Delete the existing key

0 commit comments

Comments
 (0)