-{-# LANGUAGE
- EmptyDataDecls,
- TypeFamilies
- #-}
-module Data.HList.Graph
- ( Context
- , Graph
-
- , Empty
- , IsEmpty
--- , 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
-instance NodeSet ns => NodeSet (Cons n ns)
-
--- NodeIDSet
-class NoDuplicates ids => NodeIDSet ids
-instance NodeIDSet Nil
-instance (OccursNot id ids, NodeIDSet ids) => NodeIDSet (Cons id ids)
-
--- LPath (list of labeled node IDs)
-class LPath p
-instance LPath Nil
-instance LPath p => LPath (Cons (Cons l id) p)
-
--- Node
-class NodeIDSet (LinksFrom n) => Node n
- where
- type NodeID n
- type LinksFrom n
-
--- NodeIDA
-data NodeIDA
-instance ApplyT NodeIDA n where
- type Apply NodeIDA n = NodeID n
-
--- Graph
-class ( NodeSet (Nodes g)
- , NoDuplicates (Map NodeIDA g)
- )
- => Graph g
- where
- type Empty g
- type Nodes g
-
--- IsEmpty
-type family IsEmpty g
--}
\ No newline at end of file