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

Moduleyesod-core-1.7.0.0Haskell2010

Yesod.Routes.TH.Types

Warning! This module is considered internal and may have breaking changes

  • 8 types
  • 11 values

Data types

7 declarations
datadata Resource typ
#
Instances5Functor, Foldable, Traversable, Lift, Show
datadata ResourceTree typ
#
Instances5Functor, Foldable, Traversable, Lift, Show
datadata Piece typ
#

Constructors

Instances5Functor, Foldable, Traversable, Lift, Show
  • Functor PieceDefined in yesod-core-1.7.0.0 · Yesod.Routes.TH.Types
  • Foldable PieceDefined in yesod-core-1.7.0.0 · Yesod.Routes.TH.Types
  • Traversable PieceDefined in yesod-core-1.7.0.0 · Yesod.Routes.TH.Types
  • Lift typ => Lift (Piece typ)Defined in yesod-core-1.7.0.0 · Yesod.Routes.TH.Types
  • Show typ => Show (Piece typ)Defined in yesod-core-1.7.0.0 · Yesod.Routes.TH.Types
datadata Dispatch typ
#

Constructors

Instances5Functor, Foldable, Traversable, Lift, Show

Route datatype type arguments

8 declarations
datadata TyArgs
#

The type arguments of a route datatype, paired with the source Name each was derived from. A monomorphic site like App has NoTyArgs; a parameterized one like MySub subsite has SomeTyArgs.

Carrying the (non-)emptiness in the type — rather than as a bare list with a separate null check — keeps "are there type args?" and "what are they?" a single fact, so the populated branch hands you the NonEmpty directly.

Instances2Eq, Show
  • Eq TyArgsDefined in yesod-core-1.7.0.0 · Yesod.Routes.TH.Types
  • Show TyArgsDefined in yesod-core-1.7.0.0 · Yesod.Routes.TH.Types
valuehasTyArgs :: TyArgs -> Bool
#

Whether there are any type arguments (i.e. the site is parameterized).

valueapplyTyArgs :: Type -> TyArgs -> Type
#

Apply the type arguments to a head type (e.g. a route/subroute type constructor), left to right. This replaces the ad-hoc foldl' AppT con (fst <$> tyargs) that recurred across the generators.

Helper functions