view interps/rhotor/Uniqs.hs @ 1599:d4535cf1d640

<c00kiemon5ter> printf \'%s\\n\' \'#!/bin/sh\' \'ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vs="^..:..:..: <$1>" \'\\\'\'$0 ~ s{x=$0} END{if(!x) exit 1; print x}\'\\\'\' "$file" && break; done\' >bin/seen
author HackBot
date Tue, 22 Jan 2013 01:01:10 +0000
parents 859f9b4339e6
children
line wrap: on
line source

module Uniqs (
	Uniqs(Root, A, B, C)
)
where
	
data Uniqs = A Uniqs | B Uniqs | C Uniqs | Root

instance Eq Uniqs where
	(==) Root Root 		= True
	(==) (A a) (A b) 	= a == b
	(==) (B a) (B b) 	= a == b
	(==) (C a) (C b) 	= a == b
	(==) _ _			= False
	(/=) a b			= not (a == b)

instance Show Uniqs where
	show Root			= "R"
	show (A b)			= 'A':show b
	show (B b)			= 'B':show b
	show (C b)			= 'C':show b