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.Lazy

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

isL :: String -> Q Exp Source #

interpolate splice to Lazy Text

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

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

iqL :: QuasiQuoter Source #

interpolate quoter to Lazy Text

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

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

Conversion class

class ShowL 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

showL

Methods

showL :: a -> Text Source #

Instances

ShowL Char Source # 

Methods

showL :: Char -> Text Source #

showListL :: [Char] -> Text

Show a => ShowL a Source # 

Methods

showL :: a -> Text Source #

showListL :: [a] -> Text

ShowL Text Source # 

Methods

showL :: Text -> Text Source #

showListL :: [Text] -> Text

ShowL Text Source # 

Methods

showL :: Text -> Text Source #

showListL :: [Text] -> Text

ShowL a => ShowL [a] Source # 

Methods

showL :: [a] -> Text Source #

showListL :: [[a]] -> Text