TypeOperators,
UndecidableInstances
#-}
-module Data.HList.Heap
+module Types.Data.Heap
( Heap
, Empty
)
where
-import Data.HList
+import Types.Data.List
import Types.Data.Bool
import Types.Data.Ord
instance Heap Empty
instance Heap hs => Heap (Node k v hs)
-type Unit k v = Node k v Nil
+type Unit k v = Node k v Null
type family IsEmpty h
type instance IsEmpty Empty = True
(Node k2 v2 (Cons (Node k1 v1 hs1) hs2))
type family MergeAll hs
-type instance MergeAll Nil = Empty
-type instance MergeAll (Cons h Nil) = h
+type instance MergeAll Null = Empty
+type instance MergeAll (Cons h Null) = h
type instance MergeAll (Cons h (Cons h' hs))
= Merge (Merge h h') (MergeAll hs)