]> gitweb @ CieloNegro.org - hs-rrdtool.git/blobdiff - Data/HList/Graph.hs
type-level maps and maybes
[hs-rrdtool.git] / Data / HList / Graph.hs
index 7a833ea4ec2e10eadbf9345f1ff575825610a750..c3fcf87eb750f229c85951d185a25c4814ab2038 100644 (file)
@@ -1,25 +1,37 @@
 {-# LANGUAGE
   EmptyDataDecls,
-  FlexibleContexts,
-  FlexibleInstances,
-  MultiParamTypeClasses,
   TypeFamilies
   #-}
 module Data.HList.Graph
-    ( Graph(..)
-    , NodeSet
-    , NodeIDSet
-    , Node(..)
-    , LPath(..)
+    ( Context
+    , Graph
 
+    , Empty
     , IsEmpty
-
-    , NodeIDA
+--    , Match
     )
     where
 
 import Data.HList.Prelude
+import Types.Data.Bool
+
+-- Graph is a map from node ID to context
+data Context preNodes node sucNodes
+data Graph nodeMap
+
+-- Empty
+type Empty = Graph Nil
+
+-- IsEmpty
+type family   IsEmpty g
+type instance IsEmpty (Graph Nil)         = True
+type instance IsEmpty (Graph (Cons x xs)) = False
+
+-- Match
+--type Match n g
+--    = 
 
+{-
 -- NodeSet
 class    NodeSet ns
 instance NodeSet Nil
@@ -57,3 +69,4 @@ class ( NodeSet (Nodes g)
 
 -- IsEmpty
 type family IsEmpty g
+-}
\ No newline at end of file