]> gitweb @ CieloNegro.org - hs-rrdtool.git/blobdiff - Types/Data/Heap.hs
working on graphs...
[hs-rrdtool.git] / Types / Data / Heap.hs
similarity index 88%
rename from Data/HList/Heap.hs
rename to Types/Data/Heap.hs
index acd479fb962091308158adf6f2fd36987ce3bb2a..0db148984390f6cc6bb5965e80340ad273467fad 100644 (file)
@@ -4,7 +4,7 @@
   TypeOperators,
   UndecidableInstances
   #-}
   TypeOperators,
   UndecidableInstances
   #-}
-module Data.HList.Heap
+module Types.Data.Heap
     ( Heap
 
     , Empty
     ( Heap
 
     , Empty
@@ -19,7 +19,7 @@ module Data.HList.Heap
     )
     where
 
     )
     where
 
-import Data.HList
+import Types.Data.List
 import Types.Data.Bool
 import Types.Data.Ord
 
 import Types.Data.Bool
 import Types.Data.Ord
 
@@ -31,7 +31,7 @@ class Heap h
 instance Heap Empty
 instance Heap hs => Heap (Node k v hs)
 
 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
 
 type family   IsEmpty h
 type instance IsEmpty Empty         = True
@@ -48,8 +48,8 @@ type instance Merge (Node k1 v1 hs1) (Node k2 v2 hs2)
         (Node k2 v2 (Cons (Node k1 v1 hs1) hs2))
 
 type family   MergeAll hs
         (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)
 
 type instance MergeAll (Cons h (Cons h' hs))
     = Merge (Merge h h') (MergeAll hs)