servant-static-th-0.2.0.1: Embed a directory of static files in 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 #

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 #

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

extensionToMimeTypeInfoEx :: FilePath -> Q MimeTypeInfo #

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

extensionToMimeTypeInfo :: FilePath -> Maybe MimeTypeInfo #

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 GIF #

data ICO #

Since: 0.2.0.0

data JS #

Instances

Accept * JS #
application/javascript
MimeRender * JS ByteString # 

data PNG #

data SVG #

data TXT #

data EOT #

Since: 0.2.0.0

data TTF #

Since: 0.2.0.0

data WOFF #

Since: 0.2.0.0

data WOFF2 #

Since: 0.2.0.0