Skip to content

Commit f573415

Browse files
authored
Add short motivation of Void type
1 parent 756ef60 commit f573415

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Data/Void.purs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ module Data.Void (Void, absurd) where
22

33
import Data.Show (class Show)
44

5+
-- | An uninhabited data type.
6+
-- |
7+
-- | `Void` is useful to eliminate the possibility of a value being created.
8+
-- | For example, a value of type `Either Void Boolean` can never have
9+
-- | a Left value created in PureScript.
510
newtype Void = Void Void
611

712
instance showVoid :: Show Void where

0 commit comments

Comments
 (0)