úÎ!P@Nj     Safe,-.>HUVXkêNone ,-.>HUVXkM¦  type-errorsLike  &, but uses the explicit meta-variable   to mark substitution points.(:kind! SubstVar (Either VAR Bool) [Char]...= Either [Char] Bool+:kind! SubstVar (VAR Int Bool :: Type) (->)... = Int -> Bool  type-errors 2 is a meta-varaible which marks a substitution in  . The result of   expr val is  expr[val/ ]. 3 is polykinded and can be used in several settings.See   for examples.  type-errors  expr a b substitutes all instances of a for b in expr.&:kind! Subst (Either Int Int) Int Bool...= Either Bool Bool):kind! Subst (Either Int Bool) Int [Char]...= Either [Char] Bool*:kind! Subst (Either Int Bool) Either (->)... = Int -> Bool  type-errorsLike  A, but implemented as a first-class family. As such, this allows   to be chained after . to only be run if an expression isn't stuck.lThis can be used to avoid emitting false error messages when a type variable isn't phantom, just ambiguous.:{ observe_phantom :: UnlessStuck f (UnlessPhantomFcf (f PHANTOM)' ('Text "It's not phantom!")) => f p -> ()observe_phantom _ = ():}observe_phantom Proxy()observe_phantom (Just 5)...... It's not phantom!...In the next example, we leave observe_phantom unsaturated, and therefore f' isn't yet known. Without guarding the   behind A, this would incorrectly produce the message "It's not phantom!"observe_phantom...... No instance for (Show ......  type-errors  expr err% determines if the type described by expr) is phantom in the variables marked via .. If it's not, it produces the error message err.%For example, consider the definition::{data Qux a b = Qux b:}which is phantom in a:8:eval_error UnlessPhantom (Qux PHANTOM Int) ('Text "Ok")() but not in b:::eval_error UnlessPhantom (Qux Int PHANTOM) ('Text "Bad!")...... Bad!...NUnfortunately there is no known way to emit an error message if the variable is a phantom. type-errorsRA meta-variable for marking which argument should be a phantom when working with   and  .3 is polykinded and can be used in several settings.See   for examples. type-errorsLike ), but leaves no residual constraint when expr5 is stuck. This can be used to ensure an expression isn't$ stuck before analyzing it further.See the example under  ! for an example of this use-case. type-errorsLike E, but specialized to the case when you don't want to do anything if expr isn't stuck.:{observe_no_rep :: WhenStuck (Rep t)K (DelayError ('Text "No Rep instance for " ':<>: ShowTypeQuoted t)) => t -> ()observe_no_rep _ = ():}observe_no_rep HasNoRep..."... No Rep instance for 'HasNoRep'...observe_no_rep True() type-errors expr b c leaves b' in the residual constraints whenever expr is stuck, otherwise it uates c.Often you want to leave a  in b# in order to report an error when expr is stuck.The cz parameter is a first-class family, which allows you to perform arbitrarily-complicated type-level computations whenever exprB isn't stuck. For example, you might want to produce a typeclass  - here. Alternatively, you can nest calls to ' in order to do subsequent processing.This is a generalization of  https://kcsongor.github.io/kcsongor's Break machinery described in  1https://kcsongor.github.io/report-stuck-families/detecting the undetectable. type-errorsLike ,, but implemented as a first-class family. . is useful when used as the last argument to  and . type-errorsA helper definition that doesn'tY emit a type error. This is occassionally useful to leave as the residual constraint in 1 when you only want to observe if an expression isn't stuck. type-errorsLike ,, but implemented as a first-class family. - is useful when used as the last argument to  and . type-errorsError messages produced via  are often  too strictF, and will be emitted sooner than you'd like. The solution is to use A, which will switch the error messages to being consumed lazily.:{@foo :: TypeError ('Text "Too eager; prevents compilation") => ()foo = ():}...#... Too eager; prevents compilation...:{6foo :: DelayError ('Text "Lazy; emitted on use") => ()foo = ():}foo...... Lazy; emitted on use... type-errorsLike #, but quotes the type if necessary.:show_error ShowTypeQuoted Int... ... 'Int'...2:show_error ShowTypeQuoted "symbols aren't quoted"...... "symbols aren't quoted"... type-errorsPretty print a list.#:show_error PrettyPrintList '[Bool]... ... 'Bool'...#:show_error PrettyPrintList '[1, 2]...... '1', and '2'...7:show_error PrettyPrintList '["hello", "world", "cool"]... ... "hello", "world", and "cool"...  !     !"#$%&'()*+*type-errors-0.1.0.0-5kja1V5aGuxEZaBIunXB9J Type.ErrorsPaths_type_errorsbase GHC.TypeLits TypeErrorText:<>::$$:ShowType ErrorMessage3first-class-families-0.5.0.0-KzVSrPbLOlGD0jvruQdyZ5Fcf.CombinatorsPureFcf.CoreExpEvalSubstVarVARSubstUnlessPhantomFcf UnlessPhantomPHANTOM UnlessStuck WhenStuckIfStuck NoErrorFcfNoError DelayErrorFcf DelayErrorShowTypeQuotedPrettyPrintListversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNameghc-prim GHC.Types Constraint