Mercurial > repo
annotate interps/rhotor/Uniqs.hs @ 5138:1eb6c53a03d4
<shachaf> revert 5134
author | HackBot |
---|---|
date | Sun, 16 Nov 2014 19:44:12 +0000 |
parents | 859f9b4339e6 |
children |
rev | line source |
---|---|
996 | 1 module Uniqs ( |
2 Uniqs(Root, A, B, C) | |
3 ) | |
4 where | |
5 | |
6 data Uniqs = A Uniqs | B Uniqs | C Uniqs | Root | |
7 | |
8 instance Eq Uniqs where | |
9 (==) Root Root = True | |
10 (==) (A a) (A b) = a == b | |
11 (==) (B a) (B b) = a == b | |
12 (==) (C a) (C b) = a == b | |
13 (==) _ _ = False | |
14 (/=) a b = not (a == b) | |
15 | |
16 instance Show Uniqs where | |
17 show Root = "R" | |
18 show (A b) = 'A':show b | |
19 show (B b) = 'B':show b | |
20 show (C b) = 'C':show b | |
21 |