Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype R (ext :: FileType a) = R {}
- mkRouteFromFilePath :: forall a (ext :: FileType a). HasExt ext => FilePath -> Maybe (R ext)
- mkRouteFromSlugs :: NonEmpty Slug -> R ext
- routeSlug :: R ext -> Maybe Slug
- routeSlugWithPrefix :: NonEmpty Slug -> R ext -> Maybe Slug
- routeBaseName :: R ext -> Text
- routeParent :: R ext -> Maybe (R 'Folder)
- routeInits :: R ext -> NonEmpty (R ext)
- indexRoute :: R ext
- encodeRoute :: forall a (ft :: FileType a). HasExt ft => R ft -> FilePath
- decodeHtmlRoute :: FilePath -> R 'Html
- decodeAnyRoute :: FilePath -> Maybe (R 'AnyExt)
Documentation
newtype R (ext :: FileType a) Source #
Represents the relative path to some file (or its isomporphic URL represetation).
Instances
Indexable NoteIxs Note Source # | |
Indexable SDataIxs SData Source # | |
Indexable StaticFileIxs StaticFile Source # | |
Defined in Emanote.Model.StaticFile | |
HasExt ext => ToJSON (R ext) Source # | |
Defined in Emanote.Route.R | |
(Typeable a, Typeable ext) => Data (R ext) Source # | |
Defined in Emanote.Route.R gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> R ext -> c (R ext) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (R ext) # dataTypeOf :: R ext -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (R ext)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (R ext)) # gmapT :: (forall b. Data b => b -> b) -> R ext -> R ext # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> R ext -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> R ext -> r # gmapQ :: (forall d. Data d => d -> u) -> R ext -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> R ext -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> R ext -> m (R ext) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> R ext -> m (R ext) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> R ext -> m (R ext) # | |
HasExt ext => Show (R ext) Source # | |
Eq (R ext) Source # | |
Ord (R ext) Source # | |
mkRouteFromFilePath :: forall a (ext :: FileType a). HasExt ext => FilePath -> Maybe (R ext) Source #
Convert foo/bar.ext to a R
routeSlugWithPrefix :: NonEmpty Slug -> R ext -> Maybe Slug Source #
Like routeSlug
but skips the given prefixes, returning the (only) pending slug.
routeBaseName :: R ext -> Text Source #
The base name of the route without its parent path.
indexRoute :: R ext Source #