repo.or.cz
/
rootstock.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No longer require largeword < 1.2 to compile on GHC 7.4.1
[rootstock.git]
/
Util
/
Either.hs
blob
dff0305d82d0268f075d6ada200e6c5153ac90f7
1
module
Util
.
Either
where
2
3
isLeft
::
Either
a b
->
Bool
4
isLeft
(
Left _
) =
True
5
isLeft _
=
False
6
7
isRight
::
Either
a b
->
Bool
8
isRight
=
not
.
isLeft
9
10
doLeft
::
Monad m
=> (
a
->
m
()) ->
Either
a b
->
m
()
11
doLeft f
(
Left x
) =
f x
12
doLeft _ _
=
return
()
13