From 2bbcd4ec9a90c298cc38dbc47972bbc7d8f230b3 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Tue, 19 Feb 2008 09:36:41 +0000 Subject: [PATCH] Added Eq and Ord instances for the Pass_ data structure (going solely by pass name) --- common/Pass.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/common/Pass.hs b/common/Pass.hs index 3964b8e..bc9183f 100644 --- a/common/Pass.hs +++ b/common/Pass.hs @@ -59,7 +59,14 @@ data Monad m => Pass_ m = Pass { ,passPost :: Set.Set Property ,passEnabled :: CompState -> Bool } - + +instance Monad m => Eq (Pass_ m) where + x == y = passName x == passName y + +instance Monad m => Ord (Pass_ m) where + compare x y = compare (passName x) (passName y) + + type Pass = Pass_ PassM type PassR = Pass_ PassMR