Skip to content

unified and extensible annotations

We have several annotations in current Haskell: deriving, pragmas {-# #-}, ! ! (DrIFT), haddock... These are ad-hoc, and not extensible by the programmer.

There are better ways:

For me the important features are

  • An annotation is allowed basically at any declaration,
  • and 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, where compile time is for tools/preprocessors, and visibility at run time is helpful for reflection. (Would need some support from Data.Generics or thereabouts.)

I have brought this proposal up on the mailing list and there was one response.

Edited by ijones
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information