Type variables within type quasiquotes

View: New views
2 Messages — Rating Filter:   Alert me  

Type variables within type quasiquotes

by Alfonso Acosta :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Contrary to what's stated in GHC's 6.6 user's guide
(http://www.haskell.org/ghc/docs/6.6/html/users_guide/template-haskell.html
) type quasiquotes seem to work just fine when type variables are not
used (i.e. things such as [t| Bool |]).

But unfortunately GHC complains when I make use of type variables

[t| Maybe a |] leads to "Not in scope: type variable `a' "

Am I doing something wrong or did I run into one of the reasons why
the guide says that type quasi-quotes are not implemented?

Thanks in advance,

Alfonso Acosta
_______________________________________________
template-haskell mailing list
template-haskell@...
http://www.haskell.org/mailman/listinfo/template-haskell

RE: Type variables within type quasiquotes

by Simon Peyton-Jones :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It's the latter I'm afraid.  Type quasi-quotes just aren't fully implemented.  You'll need to use the lower-level machinery.

Like other bits of the not-implemented-yet stuff, this is quite do-able, but there hasn't been a strong enough demand (yet!).

Simon

| -----Original Message-----
| From: template-haskell-bounces@... [mailto:template-haskell-bounces@...] On Behalf Of
| Alfonso Acosta
| Sent: 21 February 2007 01:15
| To: template-haskell@...
| Subject: [Template-haskell] Type variables within type quasiquotes
|
| Hi,
|
| Contrary to what's stated in GHC's 6.6 user's guide
| (http://www.haskell.org/ghc/docs/6.6/html/users_guide/template-haskell.html
| ) type quasiquotes seem to work just fine when type variables are not
| used (i.e. things such as [t| Bool |]).
|
| But unfortunately GHC complains when I make use of type variables
|
| [t| Maybe a |] leads to "Not in scope: type variable `a' "
|
| Am I doing something wrong or did I run into one of the reasons why
| the guide says that type quasi-quotes are not implemented?
|
| Thanks in advance,
|
| Alfonso Acosta
| _______________________________________________
| template-haskell mailing list
| template-haskell@...
| http://www.haskell.org/mailman/listinfo/template-haskell
_______________________________________________
template-haskell mailing list
template-haskell@...
http://www.haskell.org/mailman/listinfo/template-haskell