No title

Anonymous Coward 2018-02-12 07:10:27.865991 UTC

1{-# LANGUAGE TypeInType #-}
2module Type.Data.Map where
3
4import Prelude
5import Data.Kind
6
7
8type family ValueKind (obj :: k) :: Type
9
10type family Get (key :: k) (obj :: a) :: ValueKind a
11
12data Map k v = Map [(k,v)]
13
14type instance Get (k :: kk) (('Map ('((k::kk), (v::kv)) ': _)) :: Map kk kv) = (v :: kv)
15
16type instance ValueKind (Map k v) = v