~ubuntu-branches/ubuntu/utopic/haskell-uulib/utopic

« back to all changes in this revision

Viewing changes to src/UU/Scanner/GenTokenOrd.hs

  • Committer: Bazaar Package Importer
  • Author(s): Arjan Oosting
  • Date: 2006-11-18 16:24:30 UTC
  • Revision ID: james.westby@ubuntu.com-20061118162430-24ddyj27kj0uk17v
Tags: upstream-0.9.2
ImportĀ upstreamĀ versionĀ 0.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
module UU.Scanner.GenTokenOrd() where
 
2
 
 
3
import UU.Scanner.GenToken(GenToken(..))
 
4
 
 
5
instance (Eq key, Eq tp) => Eq (GenToken key tp val) where
 
6
   Reserved x    _ == Reserved y    _ = x == y
 
7
   ValToken tx _ _ == ValToken ty _ _ = tx == ty
 
8
   _               == _               = False
 
9
   
 
10
instance (Ord key, Ord tp) => Ord (GenToken key tp val) where
 
11
  compare (Reserved x    _) (Reserved y    _) = compare x y
 
12
  compare (Reserved _    _) _                 = LT
 
13
  compare (ValToken tx _ _) (ValToken ty _ _) = compare tx ty
 
14
  compare _              _                    = GT
 
 
b'\\ No newline at end of file'