Wanted: unified annotation syntax, was: Re: strict Haskell dialect

Dinko Tenev dinko.tenev at gmail.com
Fri Feb 3 08:12:31 EST 2006


I'll second that.

I'll just throw in that not all pragmas ({-# ... #-}) are really
annotations, because they do not necessarily pertain to one particular
entity each.  Some could be attached -- e.g. DEPRECATED, INLINE /
NOINLINE, SPECIALIZE.  Others, however, couldn't -- say, rewrite rules
-- and are bound to remain as pragmas, even if the rest are converted
to annotations.


Cheers,

DInko


On 2/2/06, Johannes Waldmann <waldmann at imn.htwk-leipzig.de> wrote:
> John Meacham wrote:
>
> > module $hat.Foo(..) where ...
>
> Before we invent more ad-hoc notation for annotations
> (we already have deriving, {-# .. #-}, {-! .. -!} (DrIFT) )
> can we replace all (or most) of this with a unified annotation syntax,
> e. g. Java uses "@" notation which is basically allowed
> at any declaration, and (important points) programmers can
> define their own annotations, and annotations can also have values.
> Also, they have a retention policy saying whether they should be visible
> at compile time or at run time. Compile time is for tools/preprocessors,
> and visibility at run time is helpful for reflection. see e. g. JLS 9.6f
> http://java.sun.com/docs/books/jls/third_edition/html/interfaces.html#9.6
> some example text is here:
> http://dfa.imn.htwk-leipzig.de/~waldmann/draft/meta-haskell/
>
> Best regards,
> --
> -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 --
> ---- http://www.imn.htwk-leipzig.de/~waldmann/ -------


More information about the Haskell-prime mailing list