servant-static-th-0.1.0.1: Embed a directory of static files in your application and serve them from your Servant server

CopyrightDennis Gosnell 2017
LicenseBSD3
MaintainerDennis Gosnell (cdep.illabout@gmail.com)
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Servant.Static.TH.Internal.Mime

Description

This module exports functions and datatypes for using many different mime types.

Synopsis

Documentation

data MimeTypeInfo Source #

Hold Types and functions work working with a given file type, like html or js.

You can find examples of MimeTypeInfo in the function extensionMimeTypeMap.

Constructors

MimeTypeInfo 

Fields

extensionMimeTypeMap :: Map String MimeTypeInfo Source #

A mapping from an extension like html or js to a MimeTypeInfo for that extension.

extensionToMimeTypeInfoEx :: FilePath -> Q MimeTypeInfo Source #

Just like extensionToMimeTypeInfo, but throw an error using fail if the extension for the given FilePath is not found.

extensionToMimeTypeInfo :: FilePath -> Maybe MimeTypeInfo Source #

Lookup the MimeTypeInfo for a given FilePath (that has an extension like .html or .js). Returns Nothing if the MimeTypeInfo for the given extension is not found.

data JS Source #

Instances