shikensu-0.3.5: Run a sequence of functions on in-memory representations of files

Safe HaskellNone
LanguageHaskell2010

Shikensu.Utilities

Synopsis

Documentation

(!~>) :: (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.

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

Get stuff out of the metadata. Returns a Maybe.

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

IO Sequence helpers

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

One way to deal with multiple dictionaries.

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

From multiple IO monads to a single IO monad.