| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Types.MustName
Synopsis
- type family MustName a name t :: Constraint where ...
- type family MustNameEx a name t ex :: Constraint where ...
Documentation
type family MustName a name t :: Constraint where ... Source #
MustName a name a_ enforces that the type variable a must be specified by an
explicit type application for the variable a_. The name argument should be a string that
will show up as the name of a in error messages.
type family MustNameEx a name t ex :: Constraint where ... Source #
MustNameEx a name a_ ex enforces that the type variable a must be specified by an
explicit type application for the variable a_. The name argument should be a string that
will show up as the name of a in error messages. The ex argument is an additional
usage example that will show up in the error message.
Equations
| MustNameEx _ "" _ _ = TypeError ('Text "Please provide a non-empty name for the type variable in MustName.") | |
| MustNameEx _ _ _ "" = TypeError ('Text "Please provide a non-empty usage example in MustName.") | |
| MustNameEx a name t ex = (a ~ SayMyName_ t, Break (MustNameEx_ name ex) t) |