shikensu-0.2.0: A small toolset for building static websites

Safe HaskellNone
LanguageHaskell2010

Shikensu.Utilities

Synopsis

Documentation

io :: ([Definition] -> [IO Definition]) -> Dictionary -> IO Dictionary Source #

IO Sequence helpers

lsequence :: Monad m => [(String, m a)] -> m [(String, a)] Source #

One way to deal with multiple dictionaries.

lsequence
    [ ( "pages", Shikensu.list rootDir ["src/pages/**/*.html"]    )
    , ( "js",    Shikensu.list rootDir ["src/javascript/**/*.js"] )
    ]

From multiple IO monads to a single IO monad.

(⚡) :: (FromJSON a, ToJSON a) => Metadata -> Text -> Maybe a Source #

Get stuff out of the metadata. Return a Maybe.

(⚡⚡) :: (FromJSON a, ToJSON a) => Metadata -> Text -> a Source #

Get stuff out of the metadata. Does NOT return a Maybe, but gives an error if it isn't found.