static-text-0.2.0.4: Lists, Texts, ByteStrings and Vectors of statically known length

Safe HaskellNone
LanguageHaskell2010

Data.StaticText.TH

Description

Template Haskell helpers for StaticText.

Synopsis

Documentation

st :: LitS -> Q Exp Source #

Type-safe Static constructor macro for string literals.

Example:

$(st "Foobar")

compiles to

unsafeCreate "Foobar" :: forall a. (IsString a, IsStaticText a) => Static a 6

where 6 is the string length obtained at compile time.