Skip to content

Instantly share code, notes, and snippets.

@pepeiborra
Created November 1, 2009 23:41
Show Gist options
  • Save pepeiborra/223802 to your computer and use it in GitHub Desktop.
Save pepeiborra/223802 to your computer and use it in GitHub Desktop.
-- | 'withLocTH' is a convenient TH macro which expands to 'withLoc' @\<source location\>@
-- It should only be used when the MonadLoc preprocessor is not available.
-- Usage:
--
-- > f x = $withLocTH $ do
-- > $withLocTH $ something
-- > x < -$withLocTH $ something-else
-- > ...
--
-- NOTE: unfortunately type signatures are necessary when using withLocTH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment