ema-0.10.0.0: Static site generator library with hot reload
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ema.Route.Lib.Multi

Description

Merging multiple Ema sites into one.

This is implemented in using `sop-core`'s NS and NP types. Use as `MultiRoute '[MySite1, MySite2, ...]`.

Synopsis

Documentation

type MultiRoute (rs :: [Type]) = NS I rs Source #

The merged site's route is represented as a n-ary sum (NS) of the sub-routes.

type family MultiModel (rs :: [Type]) :: [Type] where ... Source #

Equations

MultiModel '[] = '[] 
MultiModel (r ': rs) = RouteModel r ': MultiModel rs 

Orphan instances

(IsRoute r, IsRoute (MultiRoute rs), RouteModel (MultiRoute rs) ~ NP I (MultiModel rs)) => IsRoute (MultiRoute (r ': rs)) Source # 
Instance details

Associated Types

type RouteModel (MultiRoute (r ': rs)) Source #

Methods

routePrism :: RouteModel (MultiRoute (r ': rs)) -> Prism_ FilePath (MultiRoute (r ': rs)) Source #

routeUniverse :: RouteModel (MultiRoute (r ': rs)) -> [MultiRoute (r ': rs)] Source #

IsRoute (MultiRoute ('[] :: [Type])) Source # 
Instance details

Associated Types

type RouteModel (MultiRoute '[]) Source #

(EmaStaticSite r, EmaStaticSite (MultiRoute rs), SiteArg (MultiRoute rs) ~ NP I (MultiSiteArg rs), RouteModel (MultiRoute rs) ~ NP I (MultiModel rs)) => EmaSite (MultiRoute (r ': rs)) Source # 
Instance details

Associated Types

type SiteArg (MultiRoute (r ': rs)) Source #

type SiteOutput (MultiRoute (r ': rs)) Source #

Methods

siteInput :: (MonadIO m, MonadUnliftIO m, MonadLoggerIO m) => Some Action -> SiteArg (MultiRoute (r ': rs)) -> m (Dynamic m (RouteModel (MultiRoute (r ': rs)))) Source #

siteOutput :: (MonadIO m, MonadLoggerIO m) => Prism' FilePath (MultiRoute (r ': rs)) -> RouteModel (MultiRoute (r ': rs)) -> MultiRoute (r ': rs) -> m (SiteOutput (MultiRoute (r ': rs))) Source #

EmaSite (MultiRoute ('[] :: [Type])) Source # 
Instance details

Associated Types

type SiteArg (MultiRoute '[]) Source #

type SiteOutput (MultiRoute '[]) Source #