{-# LANGUAGE UnicodeSyntax #-}
module GraphRewriting.Pattern.Internal where

import GraphRewriting.Graph.Types
import Control.Monad.Reader

-- | A pattern represents a graph scrutinisation that memorises all the scrutinised nodes during matching.
newtype Pattern n a = Pattern {pattern  Match  ReaderT (Graph n) [] (Match, a)}

-- | Nodes matched in the evaluation of a pattern with the lastly matched node at the head
type Match = [Node]