Prim.TypeError
The Prim.TypeError module is embedded in the PureScript compiler. Unlike Prim
, it is not imported implicitly. It contains type classes that provide custom type error and warning functionality.
#Warn
class Warn (message :: Doc)
The Warn type class allows a custom compiler warning to be displayed.
For more information, see the Custom Type Errors guide.
#Fail
class Fail (message :: Doc)
The Fail type class is part of the custom type errors feature. To provide a custom type error when someone tries to use a particular instance, write that instance out with a Fail constraint.
For more information, see the Custom Type Errors guide.
#Doc
kind Doc
Doc
is the kind of type-level documents.
This kind is used with the Fail
and Warn
type clases.
Build up a Doc
with Text
, Quote
, Beside
, and Above
.
#Text
data Text :: Symbol -> Doc
The Text type constructor makes a Doc from a Symbol to be used in a custom type error.
For more information, see the Custom Type Errors guide.
#Quote
data Quote :: Type -> Doc
The Quote type constructor renders any concrete type as a Doc to be used in a custom type error.
For more information, see the Custom Type Errors guide.
Modules
- Control.Applicative
- Control.Apply
- Control.Bind
- Control.Category
- Control.Monad
- Control.Semigroupoid
- Data.Boolean
- Data.BooleanAlgebra
- Data.Bounded
- Data.CommutativeRing
- Data.DivisionRing
- Data.Eq
- Data.EuclideanRing
- Data.Field
- Data.Function
- Data.Functor
- Data.HeytingAlgebra
- Data.Monoid
- Data.Monoid.Additive
- Data.Monoid.Conj
- Data.Monoid.Disj
- Data.Monoid.Dual
- Data.Monoid.Endo
- Data.Monoid.Multiplicative
- Data.NaturalTransformation
- Data.Ord
- Data.Ord.Unsafe
- Data.Ordering
- Data.Ring
- Data.Semigroup
- Data.Semigroup.First
- Data.Semigroup.Last
- Data.Semiring
- Data.Show
- Data.Symbol
- Data.Unit
- Data.Void
- Effect
- Effect.Class
- Effect.Class.Console
- Effect.Console
- Effect.Uncurried
- Effect.Unsafe
- Main
- PSCI.Support
- Prelude
- Prim
- Prim.Ordering
- Prim.Row
- Prim.RowList
- Prim.Symbol
- Prim.TypeError
- Record.Unsafe
- Type.Data.Boolean
- Type.Data.Ordering
- Type.Data.Row
- Type.Data.RowList
- Type.Data.Symbol
- Type.Equality
- Type.Prelude
- Type.Proxy
- Type.Row
- Type.Row.Homogeneous