diff --git a/Data/View.hs b/Data/View.hs
--- a/Data/View.hs
+++ b/Data/View.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE UnicodeSyntax, MultiParamTypeClasses #-}
+{-# LANGUAGE UnicodeSyntax, MultiParamTypeClasses, FlexibleInstances #-}
 -- | The multi-parameter type-class 'View' provides an abstraction @View v n@ of a type @n@ that exposes a value of type @v@. It allows both to 'inspect' and 'update' the value, while hiding the internal structure of the value type (@n@).
 module Data.View where
 
@@ -10,6 +10,10 @@
 
 	update v = adjust (const v)
 	adjust f n = update (f $ inspect n) n
+
+instance View n n where
+	inspect = id
+	update = const
 
 -- | convenience function that can be used to access record fields of the exposed type
 examine ∷ View v n ⇒ (v → field) → n → field
diff --git a/GraphRewriting/Graph.hs b/GraphRewriting/Graph.hs
--- a/GraphRewriting/Graph.hs
+++ b/GraphRewriting/Graph.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE UnicodeSyntax #-}
 -- | Most of the functions for graph scrutinisation ('GraphRewriting.Graph.Read') and modification ('GraphRewriting.Graph.Write') are defined monadically. This module defines functions for extracting these monadic values and a few non-monadic graph scrutinisation/modification functions.
-module GraphRewriting.Graph (module GraphRewriting.Graph, module GraphRewriting.Graph.Types) where
+module GraphRewriting.Graph (module GraphRewriting.Graph, module GraphRewriting.Graph.Types, Graph (..)) where
 
 import GraphRewriting.Graph.Types
 import GraphRewriting.Graph.Internal
@@ -21,11 +21,13 @@
 edges g = map lookupNodes $ Map.assocs (edgeMap g) where
 	lookupNodes (e,ns) = (Edge e, map (\n → fromJust $ Map.lookup n $ nodeMap g) $ Set.elems ns)
 
--- | unsafe, as no check for changed edge references is performed
+-- | unsafe, since no checks are performed to ensure that the invariants from
+-- "GraphRewriting.Graph.Write" are preserved
 unsafeMapNodes ∷ (n → n') → Graph n → Graph n'
 unsafeMapNodes f g = g {nodeMap = Map.map f $ nodeMap g}
 
--- | unsafe map that supplies an additional unique key to the mapping function
+-- | map that supplies an additional unique key to the mapping function; unsafe
+-- in the same way as 'unsafeMapNodes'
 unsafeMapNodesUnique ∷ (Int → n → n') → Graph n → Graph n'
 unsafeMapNodesUnique f g = g {nodeMap = Map.mapWithKey f $ nodeMap g}
 
diff --git a/GraphRewriting/Graph/Write.hs b/GraphRewriting/Graph/Write.hs
--- a/GraphRewriting/Graph/Write.hs
+++ b/GraphRewriting/Graph/Write.hs
@@ -1,9 +1,12 @@
 {-# LANGUAGE UnicodeSyntax, FlexibleContexts #-}
 -- | Functions for modifying the graph. Although the graph structure is entirely expressed by the graph's node collection, for convenience and efficiency the graph representation also comprises a complementary collection of edges, that has to be synchronised with the node collection. Therefore each of the functions below involves a test for whether the graph structure has been changed, and if so, measures are taken to ensure the graph remains consistent.
-
+--
 -- Invariants for graph consistency:
--- - ∀n∊N ∀e∊E: n→e ⇔ e→n
--- - ∀e∊E ∃n∊N: e→n
+--
+--    * Every edge attached to some node points back to that node: ∀n∊N ∀e∊E: n→e ⇔ e→n
+--
+--    * There are no orphaned edges: ∀e∊E ∃n∊N: e→n
+
 module GraphRewriting.Graph.Write
 	(module GraphRewriting.Graph.Write, module GraphRewriting.Graph.Types, module Data.View)
 where
diff --git a/GraphRewriting/Pattern.hs b/GraphRewriting/Pattern.hs
--- a/GraphRewriting/Pattern.hs
+++ b/GraphRewriting/Pattern.hs
@@ -10,11 +10,13 @@
 import Data.Set as Set (empty, insert, member)
 
 
+--instance Functor (Pattern n) where
+
 instance Monad (Pattern n) where
 	return x = Pattern $ \m → return ([],x)
 	p >>= f = Pattern $ \m → do
 		(m1,x) ← pattern p m
-		(m2,y) ← pattern (f x) (m1 ⧺ m)
+		(m2,y) ← pattern (f x) (reverse m1 ⧺ m)
 		return (m1 ⧺ m2, y)
 	fail str = Pattern $ \m → lift []
 
@@ -56,10 +58,13 @@
 
 -- | probe a pattern returning the matches it has on the graph. You might want to combine this with 'amnesia'.
 matches ∷ Pattern n a → Pattern n [Match]
-matches p = Pattern $ \m → do
+matches p = map fst `liftM` match p
+
+-- | probe a pattern returning the matches it has on the graph. You might want to combine this with 'amnesia'.
+match ∷ Pattern n a → Pattern n [(Match, a)]
+match p = Pattern $ \m → do
 	lma ← liftM (runReaderT $ pattern p m) ask
-	let matches = map fst lma
-	return (nub $ concat matches, matches)
+	return (nub $ concat $ map fst lma, lma)
 
 -- | choice
 (<|>) ∷ Pattern n a → Pattern n a → Pattern n a
@@ -76,7 +81,7 @@
 
 -- | 'fail' if given pattern succeeds, succeed if it fails.
 requireFailure ∷ Pattern n a → Pattern n ()
-requireFailure p = do require . not =<< probe p
+requireFailure p = require . not =<< probe p
 
 -- | 'fail' when monadic predicate is not met
 requireM ∷ Monad m ⇒ m Bool → m ()
diff --git a/graph-rewriting.cabal b/graph-rewriting.cabal
--- a/graph-rewriting.cabal
+++ b/graph-rewriting.cabal
@@ -1,5 +1,5 @@
 Name:           graph-rewriting
-Version:        0.5.3
+Version:        0.6.0
 Copyright:      (c) 2010, Jan Rochel
 License:        BSD3
 License-File:   LICENSE
@@ -10,13 +10,13 @@
 Build-Type:     Simple
 Synopsis:       Monadic graph rewriting of hypergraphs with ports and multiedges
 Description:
-  This library provides a monadic EDSL to define your own graph rewrite system in Haskell. Once you have specified the signature of your graph and a set of rewrite rules, you can apply these rules on a graph to effect a graph transformation. The aim of this library is to make it as convenient as possible to define such a system and experiment with it and is not designed as a backend for high-performance computation.
+  This library provides a monadic EDSL to define your own port graph rewrite system in Haskell. Once you have specified the signature of your nodes and a set of rewrite rules, you can apply these rules on a graph to effect a graph transformation. The aim of this library is to make it as convenient as possible to define such a system and experiment with it and is not designed as a backend for high-performance computation.
 Category:       Graphs, Data
 Cabal-Version:  >= 1.6
 
 Library
   Build-Depends:
-    base >= 4 && < 4.5,
+    base >= 4 && < 4.6,
     base-unicode-symbols >= 0.2 && < 0.3,
     mtl >= 1.1 && < 1.2,
     containers >= 0.3 && < 0.5
@@ -31,7 +31,7 @@
     GraphRewriting.Pattern
     GraphRewriting.Pattern.InteractionNet
     GraphRewriting.Rule
-  Other-Modules:
+--  Other-Modules:
     GraphRewriting.Graph.Internal
     GraphRewriting.Pattern.Internal
     GraphRewriting.Rule.Internal
@@ -41,4 +41,5 @@
     FlexibleInstances
     TypeSynonymInstances
     MultiParamTypeClasses
+    OverlappingInstances
   GHC-Options:    -fno-warn-duplicate-exports
