repo.or.cz
/
hollow-plutonium.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Refactored world runner.
[hollow-plutonium.git]
/
TwoIntSet.hs
blob
26310c49ea7f62f303940891fc263ff53b04a952
1
module
TwoIntSet
where
2
3
import
Data
.
Set
4
5
newtype
Two a
=
Two
(
a
,
a
)
deriving
(
Show
,
Ord
)
6
type
TwoIntSet
=
Set
(
Two
Int
)
7
instance
(
Eq a
) =>
Eq
(
Two a
)
where
8
(
Two x
) == (
Two y
) =
x
==
y || swap x
==
y
where
9
swap
(
n
,
m
) = (
m
,
n
)
10