module Happiness exposing (happy, toString)
-- Type `Happiness` is private because it's not been exposed
type Happiness
= Happy
-- Private type `Happiness` used by exposed function `toString`
toString : Happiness -> String
toString happiness =
"Happy"
-- Private type `Happiness` used by exposed function `happy`
happy : Happiness
happy =
Happy
Forbids exposed functions that use or return a private type.
If a used type is not exposed then it is impossible to annotate functions or values that use them outside of the module.
Fail
## Success