static-text-0.2.0.4: Lists, Texts, ByteStrings and Vectors of statically known length
Data.StaticText.TH
Description
Template Haskell helpers for StaticText.
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.