marvin-interpolate-1.1.2: 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.String

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

isS :: String -> Q Exp #

interpolate splice to String

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

converts all expressions to String by calling showStr on the result.

iqS :: QuasiQuoter #

interpolate quoter to String

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

converts all expressions to String by calling showStr on the result.

Conversion class

class ShowStr a where #

A type class for converting things to String

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

Minimal complete definition

showStr

Methods

showStr :: a -> String #

Instances

ShowStr Char # 

Methods

showStr :: Char -> String #

showListStr :: [Char] -> String

Show a => ShowStr a # 

Methods

showStr :: a -> String #

showListStr :: [a] -> String

ShowStr Text # 

Methods

showStr :: Text -> String #

showListStr :: [Text] -> String

ShowStr Text # 

Methods

showStr :: Text -> String #

showListStr :: [Text] -> String

ShowStr a => ShowStr [a] # 

Methods

showStr :: [a] -> String #

showListStr :: [[a]] -> String