diff --git a/bench/Suite.hs b/bench/Suite.hs
--- a/bench/Suite.hs
+++ b/bench/Suite.hs
@@ -15,18 +15,18 @@
 import GHC.Generics (Generic)
 import Data.Int (Int64)
 
-import Patterns (Refs, hasRecursion)
+import qualified Ast
 import Json (JsonTree, decodeJSON)
 import Xml (decodeXML)
-import Parser (parseGrammar)
+import qualified Parser
 
 import qualified Relapse
 
 runBench :: BenchSuiteCase -> IO Int
 runBench (BenchSuiteCase _ g (XMLDatas inputs)) =
-    return $ length $ Relapse.filter (fromGrammar g) inputs
+    return $ length $ Relapse.filter (compileGrammar g) inputs
 runBench (BenchSuiteCase _ g (JsonDatas inputs)) =
-    return $ length $ Relapse.filter (fromGrammar g) inputs
+    return $ length $ Relapse.filter (compileGrammar g) inputs
 
 readBenches :: IO [BenchSuiteCase]
 readBenches = do {
@@ -39,7 +39,7 @@
         -- xmldirs <- ls $ path </> "xml";
         -- xmlBenches <- mapM readXMLBench xmldirs;
         jsonBenches <- mapM readJsonBench jsondirs;
-        return $ filter (\(BenchSuiteCase _ g _) -> not (hasRecursion $ fromGrammar g)) jsonBenches
+        return $ filter (\(BenchSuiteCase _ g _) -> not (hasRecursion g)) jsonBenches
     } else return []
 }
 
@@ -74,8 +74,13 @@
 filesWithExt :: String -> [FilePath] -> [FilePath]
 filesWithExt ext = filter (\fname -> takeExtension fname == ext && takeBaseName fname /= "relapse")
 
-fromGrammar :: String -> Refs
-fromGrammar s = case parseGrammar s of
+compileGrammar :: String -> Relapse.Grammar
+compileGrammar s = case Relapse.parse s of
+    (Left err) -> error $ "given input: <" ++ s ++ "> got compile error: " ++ show err
+    (Right r) -> r
+
+hasRecursion :: String -> Bool
+hasRecursion s = case Parser.parseGrammar s >>= Ast.hasRecursion of
     (Left err) -> error $ "given input: <" ++ s ++ "> got parse error: " ++ show err
     (Right r) -> r
 
diff --git a/katydid.cabal b/katydid.cabal
--- a/katydid.cabal
+++ b/katydid.cabal
@@ -1,5 +1,5 @@
 name:                katydid
-version:             0.3.0.0
+version:             0.3.0.1
 synopsis:            A haskell implementation of Katydid
 description:         
   A haskell implementation of Katydid
@@ -66,6 +66,7 @@
                      , either
                      , extra
                      , ilist
+                     , transformers-either
   default-language:    Haskell2010
 
 executable katydid-exe
diff --git a/src/Expr.hs b/src/Expr.hs
--- a/src/Expr.hs
+++ b/src/Expr.hs
@@ -272,10 +272,6 @@
 assertListOfBytes (AnyExpr desc (ListOfBytesFunc eval)) = Right $ Expr desc eval
 assertListOfBytes (AnyExpr desc _) = Left $ "expected <" ++ show desc ++ "> to be of type bytes"
 
-(<>) :: Ordering -> Ordering -> Ordering
-(<>) EQ c = c
-(<>) c _ = c
-
 -- cmp is an efficient comparison function for expressions.
 -- It is very important that cmp is efficient, 
 -- because it is a bottleneck for simplification and smart construction of large queries.
