Skip to content

Commit 2b47992

Browse files
authored
Clarify Unit representation in FFI code (#223)
1 parent 95ef4e9 commit 2b47992

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: src/Data/Unit.purs

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import Data.Show (class Show)
77
-- |
88
-- | `Unit` is often used, wrapped in a monadic type constructor, as the
99
-- | return type of a computation where only the _effects_ are important.
10+
-- |
11+
-- | When returning a value of type `Unit` from an FFI function, it is
12+
-- | recommended to use `undefined`, or not return a value at all.
1013
foreign import data Unit :: Type
1114

1215
-- | `unit` is the sole inhabitant of the `Unit` type.

0 commit comments

Comments
 (0)