HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

ModuleAgda-2.7.0.1Haskell2010

Agda.Utils.TypeLevel

  • 9 types
  • 2 classes
  • 2 values
  • PackageAgda-2.7.0.1
  • Exports25
  • LanguageHaskell2010
  • LicenceMIT
  • SourceTypeLevel.hs
familytype family All (p :: k -> Constraint) (as :: [k]) :: Constraint where
#

All p as ensures that the constraint p is satisfied by all the types in as. (Types is between scare-quotes here because the code is actually kind polymorphic)

Equations

  • All p '[] = ()
  • All p (a ': as) = (p a, All p as)
familytype family If (b :: Bool) (l :: k) (r :: k) :: k where
#

On Booleans

Equations

familytype family Foldr (c :: k -> l -> l) (n :: l) (as :: [k]) :: l where
#

On Lists

Equations

typetype Arrows (as :: [Type]) r = Foldr (->) r as
#

Arrows [a1,..,an] r corresponds to a1 -> .. -> an -> r | Products [a1,..,an] corresponds to (a1, (..,( an, ())..))

familytype family Domains t :: [Type] where
#

Using IsBase we can define notions of Domains and CoDomains which *reduce* under positive information IsBase t ~ 'True even though the shape of t is not formally exposed

Equations

classclass Currying (as :: [Type]) b where
#

Currying as b witnesses the isomorphism between Arrows as b and Products as -> b. It is defined as a type class rather than by recursion on a singleton for as so all of that these conversions are inlined at compile time for concrete arguments.

Methods

Instances2Currying
  • Currying '[] bDefined in Agda-2.7.0.1 · Agda.Utils.TypeLevel
  • Currying as b => Currying (a ': as) bDefined in Agda-2.7.0.1 · Agda.Utils.TypeLevel