marvin-interpolate-1.1: Compile time string interpolation a la Scala and CoffeeScript

Copyright(c) Justus Adam 2016
LicenseBSD3
Maintainerdev@justus.science
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Marvin.Interpolate.Text

Contents

Description

Please refer to the documentation at https://marvin.readthedocs.io/en/latest/interpolation.html for examples and explanations on how to use this library.

Synopsis

Documentation

isT :: String -> Q Exp Source #

interpolate splice to Text

Template Haskell splice function, used like $(isT "my str #{expr}")

converts all expressions to Text by calling showT on the result.

iqT :: QuasiQuoter Source #

interpolate quoter to Text

QuasiQuoter, used like [iqT|my str #{expr}|]

converts all expressions to Text by calling showT on the result.

Conversion class

class ShowT a where Source #

A type class for converting things to Text

Leaves string likes (String, Text and Text) unchanged, tries Show (overlappable) on all others.

Minimal complete definition

showT

Methods

showT :: a -> Text Source #

Instances

ShowT Char Source # 

Methods

showT :: Char -> Text Source #

showListT :: [Char] -> Text

Show a => ShowT a Source # 

Methods

showT :: a -> Text Source #

showListT :: [a] -> Text

ShowT Text Source # 

Methods

showT :: Text -> Text Source #

showListT :: [Text] -> Text

ShowT Text Source # 

Methods

showT :: Text -> Text Source #

showListT :: [Text] -> Text

ShowT a => ShowT [a] Source # 

Methods

showT :: [a] -> Text Source #

showListT :: [[a]] -> Text