Skip to content

Instantly share code, notes, and snippets.

@tsloughter
Created April 13, 2014 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsloughter/10585717 to your computer and use it in GitHub Desktop.
Save tsloughter/10585717 to your computer and use it in GitHub Desktop.
-- Function:
(<=>) :: (Show a) => B.ByteString -> a -> (B.ByteString, B.ByteString)
(<=>) x y = (x, showBS y)
-- Example usage:
infoLog ["handler" <=> "indexHandler", "handler" <=> 1]
-- Warnings:
src/Site.hs:43:22: Warning:
Defaulting the following constraint(s) to type `String'
(Show a0) arising from a use of `<=>' at src/Site.hs:43:22-24
(Data.String.IsString a0)
arising from the literal `"indexHandler"' at src/Site.hs:43:26-39
In the expression: "handler" <=> "indexHandler"
In the first argument of `infoLog', namely
`["handler" <=> "indexHandler", "handler" <=> 1]'
In a stmt of a 'do' block:
infoLog
["handler" <=> "indexHandler", "handler" <=> 1]
src/Site.hs:43:56: Warning:
Defaulting the following constraint(s) to type `Integer'
(Num a0) arising from the literal `1' at src/Site.hs:43:56
(Show a0) arising from a use of `<=>' at src/Site.hs:43:52-54
In the second argument of `(<=>)', namely `1'
In the expression: "handler" <=> 1
In the first argument of `infoLog', namely
`["handler" <=> "indexHandler", "handler" <=> 1]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment