HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleyesod-1.6.2.1Haskell2010

Yesod.Default.Util

Various utilities used in the scaffolded site.

  • 2 types
  • 8 values
  • Packageyesod-1.6.2.1
  • Exports10
  • LanguageHaskell2010
  • LicenceMIT
  • SourceUtil.hs
valueaddStaticContentExternal
  1. :: (ByteString -> Either a ByteString)

    javascript minifier

  2. -> (ByteString -> String)

    hash function to determine file name

  3. -> FilePath

    location of static directory. files will be placed within a "tmp" subfolder

  4. -> ([Text] -> Route master)

    route constructor, taking a list of pieces

  5. -> Text

    filename extension

  6. -> Text

    mime type

  7. -> ByteString

    file contents

  8. -> HandlerFor master (Maybe (Either Text (Route master, [(Text, Text)])))
#

An implementation of addStaticContent which stores the contents in an external file. Files are created in the given static folder with names based on a hash of their content. This allows expiration dates to be set far in the future without worry of users receiving stale content.