ema-0.8.0.0: Static site generator library with hot reload
Safe HaskellNone
LanguageHaskell2010

Ema.Route.Generic.SubRoute

Synopsis

Documentation

class HasSubRoutes r Source #

HasSubRoutes is a class of routes with an underlying MultiRoute (and MultiModel) representation.

The idea is that by deriving HasSubRoutes (and HasSubModels), we get IsRoute for free (based on MultiRoute).

TODO: Rename this class, or change the API.

Associated Types

type SubRoutes r :: [Type] Source #

The sub-routes in the r (for each constructor).

Instances

Instances details
HasSubRoutes PandocRoute Source # 
Instance details

Defined in Ema.Route.Lib.Extra.PandocRoute

Associated Types

type SubRoutes PandocRoute :: [Type] Source #

(GenericRouteOpts r opts, RGeneric r, ValidSubRoutes r (OptSubRoutes r opts)) => HasSubRoutes (GenericRoute r opts :: Type) Source # 
Instance details

Defined in Ema.Route.Generic

Associated Types

type SubRoutes (GenericRoute r opts) :: [Type] Source #

type family GSubRoutes (name :: DatatypeName) (constrs :: [ConstructorName]) (xs :: [Type]) :: [Type] where ... Source #

Equations

GSubRoutes _ _ _ = TypeError ('Text "GHC 9.2 is required for anyclass deriving of HasSubRoutes") 

gtoSubRoutes :: forall r subRoutes. (RGeneric r, ValidSubRoutes r subRoutes) => NS I (RCode r) -> MultiRoute subRoutes Source #

gfromSubRoutes :: forall r subRoutes. (RGeneric r, ValidSubRoutes r subRoutes) => MultiRoute subRoutes -> NS I (RCode r) Source #

type ValidSubRoutes r subRoutes = (SameShapeAs (RCode r) subRoutes, SameShapeAs subRoutes (RCode r), All Top (RCode r), All Top subRoutes, AllZipF Coercible (RCode r) subRoutes, AllZipF Coercible subRoutes (RCode r)) Source #

subRoutes are valid sub-routes of r