HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

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
valueeffectsOf :: String -> [String]
#

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.

valuenormaliseType :: String -> String -> String
#

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.