diff options
author | David Luposchainsky <dluposchainsky@gmail.com> | 2017-08-11 10:38:24 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-08-17 16:42:55 -0400 |
commit | 36d1b08308fdc90e2abaf36cc95ad1a97c0fa8bb (patch) | |
tree | 8c408f7dd2eb6139043e0e3098665cbca8549390 /libraries | |
parent | 03327bf049acb595c3ba034d16ee5bd0afabe7c4 (diff) | |
download | haskell-36d1b08308fdc90e2abaf36cc95ad1a97c0fa8bb.tar.gz |
Doctest for Void.absurd
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/base/Data/Void.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libraries/base/Data/Void.hs b/libraries/base/Data/Void.hs index fd4c0b5b21..d7fa1799b3 100644 --- a/libraries/base/Data/Void.hs +++ b/libraries/base/Data/Void.hs @@ -67,6 +67,14 @@ instance Exception Void -- | Since 'Void' values logically don't exist, this witnesses the -- logical reasoning tool of \"ex falso quodlibet\". -- +-- >>> let x :: Either Void Int; x = Right 5 +-- >>> :{ +-- case x of +-- Right r -> r +-- Left l -> absurd l +-- :} +-- 5 +-- -- @since 4.8.0.0 absurd :: Void -> a absurd a = case a of {} |