command-qq-0.3.0.0: Quasiquoters for external commands

Safe HaskellSafe-Inferred

System.Command.QQ.Embed

Description

Haskell values embedding

Synopsis

Documentation

class Embed a whereSource

Embed haskell values into external commands

I recommend using -XExtendedDefaultRules for modules where you want to embed values, it would save for annoying type annotations for numeric literals

 embed . embed = embed

Methods

embed :: a -> StringSource

Instances

Embed Char
>>> embed 'c'
"c"
Embed Double 
Embed Float 
Embed Int 
Embed Int8 
Embed Int16 
Embed Int32 
Embed Int64 
Embed Integer 
Embed Word 
Embed Word8 
Embed Word16 
Embed Word32 
Embed Word64 
Embed String
>>> embed ("hi" :: String)
"hi"
Embed Text
>>> embed ("hi" :: Text.Text)
"hi"
Embed Text
>>> embed ("hi" :: Text.Lazy.Text)
"hi"
Embed CInt 
Embed CLong 
Embed CChar 
Embed CSize 
Embed CUShort 
Embed CULong 
Embed CULLong 
Embed CUInt 
Embed CUChar 
Embed CShort 
Embed CSChar 
Embed CLLong 
Embed CFloat 
Embed CDouble 
~ * a Integer => Embed (Ratio a)
>>> embed (3 % 5)
"0.6"