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-core-1.6.26.0Haskell2010

Yesod.Core.Content

  • 8 types
  • 4 classes
  • 21 values

Content

4 declarations
datadata Content
#
Instances4IsString, ToContent, ToTypedContent
classclass ToContent a where
#

Anything which can be converted into Content. Most of the time, you will want to use the ContentBuilder constructor. An easier approach will be to use a pre-defined toContent function, such as converting your data into a lazy bytestring and then calling toContent on that.

Please note that the built-in instances for lazy data structures (String, lazy ByteString, lazy Text and Html) will not automatically include the content length for the ContentBuilder constructor.

Methods

Instances24ToContent, …
classclass ToFlushBuilder a where
#

A class for all data which can be sent in a streaming response. Note that for textual data, instances must use UTF-8 encoding.

Since 1.2.0

Instances14ToFlushBuilder, …

Mime types

0 declarations

Data type

Utilities

2 declarations

Removes "extra" information at the end of a content type string. In particular, removes everything after the semicolon, if present.

For example, "text/html; charset=utf-8" is commonly used to specify the character encoding for HTML data. This function would return "text/html".

Evaluation strategy

1 declaration
newtypenewtype DontFullyEvaluate a
#

Prevents a response body from being fully evaluated before sending the request.

Since 1.1.0

Instances3HasContentType, ToContent, ToTypedContent

Representations

3 declarations
classclass ToContent a => ToTypedContent a where
#

Any type which can be converted to TypedContent.

Since 1.2.0

Instances17ToTypedContent, …
classclass ToTypedContent a => HasContentType a where
#

Methods

Instances12HasContentType, …

Specific content types

typetype RepHtml = Html
#

Deprecated. Please use Html instead

Smart constructors