mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-11-27 10:41:08 +03:00
Add Show for Either
This commit is contained in:
parent
a302be38f4
commit
1acbf1b67e
@ -1404,6 +1404,11 @@ Show a => Show (Maybe a) where
|
|||||||
showPrec d Nothing = "Nothing"
|
showPrec d Nothing = "Nothing"
|
||||||
showPrec d (Just x) = showCon d "Just" (showArg x)
|
showPrec d (Just x) = showCon d "Just" (showArg x)
|
||||||
|
|
||||||
|
export
|
||||||
|
(Show a, Show b) => Show (Either a b) where
|
||||||
|
showPrec d (Left x) = showCon d "Left" $ showArg x
|
||||||
|
showPrec d (Right x) = showCon d "Right" $ showArg x
|
||||||
|
|
||||||
--------
|
--------
|
||||||
-- IO --
|
-- IO --
|
||||||
--------
|
--------
|
||||||
|
Loading…
Reference in New Issue
Block a user