say-my-name-0.1.0.0: Require explicit type application for some type variables.
Safe HaskellNone
LanguageHaskell2010

Types.MustName

Synopsis

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.

Equations

MustName _ "" _ = TypeError ('Text "Please provide a non-empty name for the type variable in MustName.") 
MustName a name t = (a ~ SayMyName_ t, Break (MustName_ name) t) 

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)