2008/10/15 David Waern <[EMAIL PROTECTED]>:
> 2008/10/14 Ian Lynagh <[EMAIL PROTECTED]>:
>> On Mon, Oct 13, 2008 at 06:06:03PM +0100, Max Bolingbroke wrote:
>>>
>>> (http://hackage.haskell.org/trac/ghc/wiki/Annotations).
>>
>> When you say
>>    {-# ANN f id 1 #-}
>> this means you are attaching (id 1) to f, right?
>>
>> I think that that syntax is very confusing. I'm not sure what I'd prefer
>> though. Maybe parentheses, analogous to those in
>>    instance C (Maybe a)
>
> While we're on syntax, do you really need to refer to f? Can't it work
> like Haddock comments, where the comment applies to the next
> declaration?

It certainly can: I don't know what the arguments were in favour of or
against positional documentation during the design of Haddock, so I
can't say which syntax would be a better idea for this particular use
case. One significant thing that positional (as opposed to named)
syntax has going for it is that it's already the standard in a number
of other programming languages.

I'm happy to implement whatever syntax people want, but I need someone
with more taste me to come to a definitive decision on what that
syntax should be :-)

In other news, my implementation of the updated annotation system is
pretty much complete. Outstanding issues:
1) Syntax
2) How to get serialization. I'm currently using Data/Typeable alone,
but it turns out that Template Haskell Names are abstract types and
hence not deserializable (gunfold = undefined), and those are
something we /really/ want to put in annotations. Argh!

All best,
Max

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to