[Haskell-cafe] Idea for Haddock: Specifying a syntax field when using template splicing

Mathew de Detrich deteego at gmail.com
Tue May 3 09:23:46 CEST 2011


I just had an idea while I was working on a webserver in Haskell, where I
not only enter Haskell code (obviously) but I also enter Javascript and CSS
code in functions that use QuasiQuoting (i.e. TemplateHaskell).

The idea is basically that with standard Haddock comments you can specify a
'tag' for function argument that has a QuasiQuoter as a type, the 'tag'
specifying the syntax of the code inside of what is being spliced (for that
specific function). The generated haddock documentation would then display
the syntax tag for that specific function.

The purpose for this would be that IDE's and Editors would pick up that the
code going through the QuasiQuoter has a certain syntax, and the IDE/Editors
can then apply syntax coloring (and indenting rules and whatnot) to that
piece of code

I guess this tag concept can be applied generally to any type of function
(and any type of tag, not just tags for syntax) but there should be some
standardization, (tag types especially should be static, tag values don't
have to)

Thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110503/b60b3313/attachment.htm>


More information about the Haskell-Cafe mailing list