Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Status
- data ModelT encF = Model {
- _modelStatus :: Status
- _modelLayers :: Set Loc
- _modelEmaCLIAction :: Some Action
- _modelRoutePrism :: encF (Prism' FilePath SiteRoute)
- _modelPandocRenderers :: EmanotePandocRenderers Model LMLRoute
- _modelCompileTailwind :: Bool
- _modelInstanceID :: UUID
- _modelNotes :: IxNote
- _modelRels :: IxRel
- _modelSData :: IxSData
- _modelStaticFiles :: IxStaticFile
- _modelTasks :: IxTask
- _modelNav :: [Tree Slug]
- _modelHeistTemplate :: TemplateState
- _modelStorkIndex :: IndexVar
- type Model = ModelT Identity
- type ModelEma = ModelT (Const ())
- modelTasks :: forall encF. Lens' (ModelT encF) IxTask
- modelStorkIndex :: forall encF. Lens' (ModelT encF) IndexVar
- modelStatus :: forall encF. Lens' (ModelT encF) Status
- modelStaticFiles :: forall encF. Lens' (ModelT encF) IxStaticFile
- modelSData :: forall encF. Lens' (ModelT encF) IxSData
- modelRoutePrism :: forall encF encF. Lens (ModelT encF) (ModelT encF) (encF (Prism' FilePath SiteRoute)) (encF (Prism' FilePath SiteRoute))
- modelRels :: forall encF. Lens' (ModelT encF) IxRel
- modelPandocRenderers :: forall encF. Lens' (ModelT encF) (EmanotePandocRenderers Model LMLRoute)
- modelNotes :: forall encF. Lens' (ModelT encF) IxNote
- modelNav :: forall encF. Lens' (ModelT encF) [Tree Slug]
- modelLayers :: forall encF. Lens' (ModelT encF) (Set Loc)
- modelInstanceID :: forall encF. Lens' (ModelT encF) UUID
- modelHeistTemplate :: forall encF. Lens' (ModelT encF) TemplateState
- modelEmaCLIAction :: forall encF. Lens' (ModelT encF) (Some Action)
- modelCompileTailwind :: forall encF. Lens' (ModelT encF) Bool
- withoutRoutePrism :: Model -> (Prism' FilePath SiteRoute, ModelEma)
- withRoutePrism :: Prism' FilePath SiteRoute -> ModelEma -> Model
- emptyModel :: Set Loc -> Some Action -> EmanotePandocRenderers Model LMLRoute -> Bool -> UUID -> IndexVar -> ModelEma
- modelReadyForView :: ModelT f -> ModelT f
- inLiveServer :: Model -> Bool
- modelInsertNote :: Note -> ModelT f -> ModelT f
- dropRedundantAncestor :: LMLRoute -> IxNote -> IxNote
- injectAncestors :: [RAncestor] -> IxNote -> IxNote
- restoreAncestor :: Maybe RAncestor -> IxNote -> IxNote
- injectRoot :: IxNote -> IxNote
- injectAncestor :: RAncestor -> IxNote -> IxNote
- modelDeleteNote :: LMLRoute -> ModelT f -> ModelT f
- updateIxMulti :: (IsIndexOf ix ixs, Indexable ixs a) => ix -> IxSet ixs a -> IxSet ixs a -> IxSet ixs a
- deleteIxMulti :: (Indexable ixs a, IsIndexOf ix ixs) => ix -> IxSet ixs a -> IxSet ixs a
- modelLookupStaticFile :: FilePath -> ModelT f -> Maybe StaticFile
- modelInsertStaticFile :: UTCTime -> R 'AnyExt -> FilePath -> ModelT f -> ModelT f
- modelDeleteStaticFile :: R 'AnyExt -> ModelT f -> ModelT f
- modelInsertData :: SData -> ModelT f -> ModelT f
- modelDeleteData :: R 'Yaml -> ModelT f -> ModelT f
- modelLookupNoteByRoute :: LMLRoute -> ModelT f -> Maybe Note
- modelLookupNoteByHtmlRoute :: R 'Html -> ModelT f -> ResolvedRelTarget Note
- modelLookupTitle :: LMLRoute -> ModelT f -> Title
- modelWikiLinkTargets :: WikiLink -> Model -> [Either Note StaticFile]
- modelLookupStaticFileByRoute :: R 'AnyExt -> ModelT f -> Maybe StaticFile
- modelTags :: ModelT f -> [(Tag, [Note])]
- modelNoteRels :: Model -> [Rel]
- modelNoteMetas :: Model -> Map LMLRoute (Title, LMLRoute, Value)
- modelNoteErrors :: Model -> Map LMLRoute [Text]
- modelIndexRoute :: ModelT f -> LMLRoute
- resolveLmlRoute :: forall lmlType f. ModelT f -> R ('LMLType lmlType) -> LMLRoute
- resolveLmlRouteIfExists :: forall ext. IxNote -> R ext -> Maybe LMLRoute
Documentation
Model | |
|
Instances
type ModelEma = ModelT (Const ()) Source #
A bare version of ModelT
that is managed by the Ema app.
The only difference is that this one has no RouteEncoder
.
modelStaticFiles :: forall encF. Lens' (ModelT encF) IxStaticFile Source #
modelRoutePrism :: forall encF encF. Lens (ModelT encF) (ModelT encF) (encF (Prism' FilePath SiteRoute)) (encF (Prism' FilePath SiteRoute)) Source #
modelPandocRenderers :: forall encF. Lens' (ModelT encF) (EmanotePandocRenderers Model LMLRoute) Source #
modelHeistTemplate :: forall encF. Lens' (ModelT encF) TemplateState Source #
emptyModel :: Set Loc -> Some Action -> EmanotePandocRenderers Model LMLRoute -> Bool -> UUID -> IndexVar -> ModelEma Source #
modelReadyForView :: ModelT f -> ModelT f Source #
inLiveServer :: Model -> Bool Source #
Are we running in live server, or statically generated website?
dropRedundantAncestor :: LMLRoute -> IxNote -> IxNote Source #
If a placeholder route was added already, but the newly added note is a non-Markdown, removce that markdown placeholder route.
injectRoot :: IxNote -> IxNote Source #
updateIxMulti :: (IsIndexOf ix ixs, Indexable ixs a) => ix -> IxSet ixs a -> IxSet ixs a -> IxSet ixs a Source #
Like updateIx
, but works for multiple items.
deleteIxMulti :: (Indexable ixs a, IsIndexOf ix ixs) => ix -> IxSet ixs a -> IxSet ixs a Source #
Like deleteIx
, but works for multiple items
modelLookupStaticFile :: FilePath -> ModelT f -> Maybe StaticFile Source #
modelLookupNoteByHtmlRoute :: R 'Html -> ModelT f -> ResolvedRelTarget Note Source #
modelWikiLinkTargets :: WikiLink -> Model -> [Either Note StaticFile] Source #
modelLookupStaticFileByRoute :: R 'AnyExt -> ModelT f -> Maybe StaticFile Source #
modelNoteRels :: Model -> [Rel] Source #
modelIndexRoute :: ModelT f -> LMLRoute Source #
Return the most suitable index LML route
If index.org exist, use that. Otherwise, fallback to index.md.