Hoogle Search

Within LTS Haskell 24.67 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. readPandoc :: Item String -> Compiler (Item Pandoc)

    hakyll Hakyll.Web.Pandoc

    Read a string using pandoc, with the default options

  2. readPandocWith :: ReaderOptions -> Item String -> Compiler (Item Pandoc)

    hakyll Hakyll.Web.Pandoc

    Read a string using pandoc, with the supplied options

  3. readPandocBiblio :: ReaderOptions -> Item CSL -> Item Biblio -> Item String -> Compiler (Item Pandoc)

    hakyll Hakyll.Web.Pandoc.Biblio

    No documentation available.

  4. readPandocBiblios :: ReaderOptions -> Item CSL -> [Item Biblio] -> Item String -> Compiler (Item Pandoc)

    hakyll Hakyll.Web.Pandoc.Biblio

    No documentation available.

  5. readTemplate :: String -> Template

    hakyll Hakyll.Web.Template

    Deprecated: Use templateCompiler instead

  6. readTemplate :: String -> Template

    hakyll Hakyll.Web.Template.Internal

    Deprecated: Use templateCompiler instead

  7. readPosts :: FilePath -> IO (Maybe [FullPost])

    hakyll-convert Hakyll.Convert.Blogger

    Returns only published posts

  8. readPosts :: FilePath -> IO (Maybe [RSSItem])

    hakyll-convert Hakyll.Convert.Wordpress

    Returns only public posts

  9. readerTRuntime :: (FromJSON event, ToJSON result) => (event -> ReaderT LambdaContext IO result) -> IO ()

    hal AWS.Lambda.Runtime

    For functions that can read the lambda context and use IO within the same monad. Use this for handlers that need any form of side-effect such as reading environment variables or making network requests, and prefer to access the AWS Lambda Context in the same monad. However, do not use this runtime if you need stateful (caching) behaviors.

    {-# LANGUAGE NamedFieldPuns, DeriveGeneric #-}
    
    module Main where
    
    import AWS.Lambda.Context (LambdaContext(..))
    import AWS.Lambda.Runtime (readerTRuntime)
    import Control.Monad.Reader (ReaderT, ask)
    import Control.Monad.Trans (liftIO)
    import Data.Aeson (FromJSON)
    import Data.Text (unpack)
    import System.Environment (getEnv)
    import GHC.Generics (Generic)
    
    data Named = Named {
    name :: String
    } deriving Generic
    instance FromJSON Named
    
    myHandler :: Named -> ReaderT LambdaContext IO String
    myHandler Named { name } = do
    LambdaContext { functionName } <- ask
    greeting <- liftIO $ getEnv "GREETING"
    return $ greeting ++ name ++ " from " ++ unpack functionName ++ "!"
    
    main :: IO ()
    main = readerTRuntime myHandler
    

  10. readerTRuntime :: ToJSON result => (Value -> ReaderT LambdaContext IO result) -> IO ()

    hal AWS.Lambda.Runtime.Value

    For functions that can read the lambda context and use IO within the same monad. Use this for handlers that need any form of side-effect such as reading environment variables or making network requests, and prefer to access the AWS Lambda Context in the same monad. However, do not use this runtime if you need stateful (caching) behaviors.

    {-# LANGUAGE NamedFieldPuns, DeriveGeneric #-}
    
    module Main where
    
    import AWS.Lambda.Context (LambdaContext(..))
    import AWS.Lambda.Runtime (readerTRuntime)
    import Control.Monad.Reader (ReaderT, ask)
    import Control.Monad.Trans (liftIO)
    import Data.Aeson (Value, FromJSON, parseJSON)
    import Data.Aeson.Types (parseMaybe)
    import Data.Text (unpack)
    import System.Environment (getEnv)
    import GHC.Generics (Generic)
    
    data Named = Named {
    name :: String
    } deriving Generic
    instance FromJSON Named
    
    myHandler :: Value -> ReaderT LambdaContext IO String
    myHandler jsonAst =
    case parseMaybe parseJSON jsonAst of
    Nothing -> return $ "My name is HAL, what's yours?"
    Just Named { name } -> do
    LambdaContext { functionName } <- ask
    greeting <- liftIO $ getEnv "GREETING"
    return $ greeting ++ name ++ " from " ++ unpack functionName ++ "!"
    
    main :: IO ()
    main = readerTRuntime myHandler
    

Page 312 of many | Previous | Next