Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- (!~>) :: (FromJSON a, ToJSON a) => Metadata -> Text -> a
- (~>) :: (FromJSON a, ToJSON a) => Metadata -> Text -> Maybe a
- io :: ([Definition] -> [IO Definition]) -> Dictionary -> IO Dictionary
- lsequence :: Monad m => [(id, m a)] -> m [(id, a)]
- mapIO :: (Definition -> IO Definition) -> Dictionary -> IO Dictionary
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.
mapIO :: (Definition -> IO Definition) -> Dictionary -> IO Dictionary Source #