Copyright | Dennis Gosnell 2017 |
---|---|
License | BSD3 |
Maintainer | Dennis Gosnell (cdep.illabout@gmail.com) |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
This module exports functions and datatypes for using many different mime types.
- data MimeTypeInfo = MimeTypeInfo {}
- byteStringToExp :: ByteString -> Q Exp
- htmlToExp :: ByteString -> Q Exp
- extensionMimeTypeMap :: Map String MimeTypeInfo
- extensionToMimeTypeInfoEx :: FilePath -> Q MimeTypeInfo
- extensionToMimeTypeInfo :: FilePath -> Maybe MimeTypeInfo
- data CSS
- data GIF
- data JPEG
- data JS
- data PNG
- data SVG
- data TXT
Documentation
data MimeTypeInfo Source #
Hold Type
s and functions work working with a given file type, like
html
or js
.
You can find examples of MimeTypeInfo
in the function
extensionMimeTypeMap
.
MimeTypeInfo | |
|
byteStringToExp :: ByteString -> Q Exp Source #
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.