The theories a reflected type uses: the effects named by its Member
and Members constraints, unqualified, in the order written and without
repeats. An effect keeps its arguments ("Error NixLabError"), and a
type variable is kept as written. Members over a synonym or a variable
rather than a list names that ("Row"), since the reflected text does
not say what it stands for. A type with no context, or with no such
constraint, uses none.
Modulevortex-shell-0.4.1GHC2024
Vortex.Shell.Reflect
Reading a type hint reflects from a scope: the type as a wisp writes it, and the theories it uses. Both work on the text GHC prints, which qualifies names, spans lines and puts several constraints in a tuple.
- 2 values
- Packagevortex-shell-0.4.1
- Exports2
- LanguageGHC2024
- LicenceBSD-3-Clause
- SourceReflect.hs
Present a reflected type the way a wisp writes it: drop the class
context (Member Dice r =>) and any leading forall, drop module
qualifiers, and rewrite the polymorphic effect row Sem r to the
concrete monad, so roll reads Int -> Spell Int rather than
Polysemy.Internal.Union.Member Dice r => Int -> Polysemy.Internal.Sem r Int.
A row that is not a variable (Sem '[Dice] Int) is not the shell's, so
it stays.