error-location-0.1.3: error functions that show file location information

ErrorLocation

Synopsis

Documentation

err :: String -> Q ExpSource

like Prelude.error, but gives the file location

 $(err "OH NO!)
 main:Main main.hs:4:10 OH NO!

undef :: Q ExpSource

like Prelude.undefined, but gives the file location use trace to output the location. this way we still use undefined instead of calling error

 $(undef)
 main:Main main.hs:4:10 undefined
 err: Prelude.undefined

debug :: Show a => a -> aSource

A version of Debug.Trace.trace that just prints a value. This should be included in Debug.Trace

trc :: String -> Q ExpSource

A TH version of Debug.Trace.trace that prints location information TODO: make a debug version of this