dump-0.2.8: Dumps the names and values of expressions to ease debugging.

Safe HaskellNone
LanguageHaskell2010

Debug.Dump

Description

d, dd, and dump are aliases of the same QuasiQuoter. you can choose to imort just one of them:

import Debug.Dump (dd)

Example usage:

{-# LANGUAGE QuasiQuotes #-}

import Debug.Dump

main = print [d|a, a+1, map (+a) [1..3]|]
  where a = 2

which prints:

(a) = 2   (a+1) = 3       (map (+a) [1..3]) = [3,4,5]

by turnint this String

"a, a+1, map (+a) [1..3]"

into this expression

( "(a) = " ++ show (a)            ++ "t  " ++
  "(a+1) = " ++ show (a + 1)      ++ "t  " ++
  "(map (+a) [1..3]) = " ++ show (map (+ a) [1 .. 3])
)

Synopsis

Documentation

d :: QuasiQuoter Source

Shorthand for dump.

dd :: QuasiQuoter Source

Shorthand for dump.

dump :: QuasiQuoter Source

This is the main QuasiQuoter.