HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Moduleyesod-core-1.7.0.0Haskell2010

Yesod.Routes.TH.Types

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

Contents
  1. Data types
  2. Route datatype type arguments
  3. Helper functions
Synopsis

Data types

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

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
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