RE: Qualified names in TH?

2015-03-17 Thread Simon Peyton Jones
ral tutorials there as well. Simon From: Glasgow-haskell-users [mailto:glasgow-haskell-users-boun...@haskell.org] On Behalf Of Edward Kmett Sent: 17 March 2015 05:01 To: J. Garrett Morris Cc: GHC users Subject: Re: Qualified names in TH? Using {-# LANGUAGE TemplateHaskell #-} you can use 'foo a

Re: Qualified names in TH?

2015-03-16 Thread Edward Kmett
Using {-# LANGUAGE TemplateHaskell #-} you can use 'foo and ''Foo to get access to the names in scope in the module that is building the splice, rather than worrying about what names are in scope in the module the code gets spliced into. -Edward On Mon, Mar 16, 2015 at 10:54 PM, J. Garrett Morris

Qualified names in TH?

2015-03-16 Thread J. Garrett Morris
I'm trying to write some Template Haskell code that (among other things) manipulates IntSets. So, for example, I'd like a splice to generate a call to Data.IntSet.fromList. However, I'm not sure how IntSet will be imported in the target module. Is there a way to resolve the fully qualified name