diff --git a/GraphRewriting/Graph.hs b/GraphRewriting/Graph.hs
--- a/GraphRewriting/Graph.hs
+++ b/GraphRewriting/Graph.hs
@@ -1,3 +1,4 @@
+{-# 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
 
diff --git a/GraphRewriting/Graph/Write.hs b/GraphRewriting/Graph/Write.hs
--- a/GraphRewriting/Graph/Write.hs
+++ b/GraphRewriting/Graph/Write.hs
@@ -1,3 +1,4 @@
+{-# 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:
diff --git a/GraphRewriting/Graph/Write/Unsafe.hs b/GraphRewriting/Graph/Write/Unsafe.hs
--- a/GraphRewriting/Graph/Write/Unsafe.hs
+++ b/GraphRewriting/Graph/Write/Unsafe.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE UnicodeSyntax, FlexibleContexts #-}
 -- | This modules provides variants of the functions in "GraphRewriting.Graph.Write" for transforming the graph, but without checking for changed port assignments, which could lead to an inconsistent state. Therefore these should only be used (for increased efficiency) if the modifications do not change the graph structure (such as in layouting), or you really know what you are doing. Note that the functions provided by this library never change the length of the port list
 
 -- (TODO: use Functor/Traversable/Foldable instead of lists?)
diff --git a/GraphRewriting/Pattern.hs b/GraphRewriting/Pattern.hs
--- a/GraphRewriting/Pattern.hs
+++ b/GraphRewriting/Pattern.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE UnicodeSyntax, FlexibleContexts #-}
 -- | Patterns allow monadic scrutinisation of the graph (modifications are not possible) while keeping track of matched nodes (history). A 'Pattern' is interpreted by 'runPattern' that returns a result for each position in the graph where the pattern matches. It is allowed to 'fail' inside the 'Pattern' monad, indicating that the pattern does not match, which corresponds to conditional rewriting.
 module GraphRewriting.Pattern (module GraphRewriting.Pattern, Pattern, Match) where
 
@@ -135,11 +136,11 @@
 
 -- | only match nodes in the next pattern that have not been matched before
 nextFresh ∷ Pattern n a → Pattern n a
-nextFresh = restrictOverlap $ \hist (n:ns) → not (n ∈ hist)
+nextFresh = restrictOverlap $ \past future → null future ∨ not (head future ∈ past)
 
 -- | only accept the given node in the next match
 nextIs ∷ Node → Pattern n a → Pattern n a
-nextIs next = restrictOverlap $ \hist (n:ns) → n ≡ next
+nextIs next = restrictOverlap $ \past future → not (null future) ∧ head future ≡ next
 
 -- | First match is the history with the most recently matched node in head position. Second match is the future with the next matched node in head position.
 restrictOverlap ∷ (Match → Match → Bool) → Pattern n a → Pattern n a
diff --git a/GraphRewriting/Rule/Internal.hs b/GraphRewriting/Rule/Internal.hs
--- a/GraphRewriting/Rule/Internal.hs
+++ b/GraphRewriting/Rule/Internal.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE UnicodeSyntax #-}
 module GraphRewriting.Rule.Internal where
 
 import GraphRewriting.Graph.Internal
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.2
+Version:        0.5.3
 Copyright:      (c) 2010, Jan Rochel
 License:        BSD3
 License-File:   LICENSE
@@ -16,7 +16,7 @@
 
 Library
   Build-Depends:
-    base >= 4 && < 4.4,
+    base >= 4 && < 4.5,
     base-unicode-symbols >= 0.2 && < 0.3,
     mtl >= 1.1 && < 1.2,
     containers >= 0.3 && < 0.5
