RE: Re: template-haskell names in 6.3

"Simon Peyton-Jones" <[email protected]>
Newsgroups gmane.comp.lang.haskell.template
Message-ID <036EAC76E7F5EC4996A3B3C3657D41160155873E@EUR-MSG-21.europe.corp.microsoft.com>
Dear Template Haskell folk

I've now arranged that 

	nameBase (mkName "Foo.baz")    == "baz"
	nameModule (MkName "Foo.baz") == "Foo"

as you might expect.

There is a difference between the result of calling mkName, and a quoted
name e.g 'map.  The former is dynamically bound and the latter is
lexically bound.

Because there's a difference, I've made them print differently in the
pretty printer

	Foo.baz		for the dynamically bound one
	Foo:baz		for the lexically scoped one

This might break someone's code.  Maybe they should both print as
"Foo.baz"?


There is no Haddock documentation to speak of in the TH libraries.
Would someone (Ian?) like to add some?

Simon


| -----Original Message-----
| From: Keean Schupke [mailto:[email protected]]
| Sent: 21 December 2004 15:31
| To: Simon Peyton-Jones
| Cc: [email protected]
| Subject: Re: [Template-haskell] Re: template-haskell names in 6.3
| 
| It won't make a difference right now, so you can leave it out for now,
| but I think it should work...
| 
| Keean.
| 
| Simon Peyton-Jones wrote:
| 
| >aha, that's a good question.
| >
| >Hmm.  It probably ought to work (though it won't today).  Would it
make
| >a difference?
| >
| >S
| >
| >| -----Original Message-----
| >| From: Keean Schupke [mailto:[email protected]]
| >| Sent: 21 December 2004 14:03
| >| To: Simon Peyton-Jones
| >| Cc: [email protected]
| >| Subject: Re: [Template-haskell] Re: template-haskell names in 6.3
| >|
| >| So does this work?
| >|
| >|     nameModule (mkName "Foo.Bar")
| >|
| >| Keean.
| >
| >
| >
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.