
11 Feb
2008
11 Feb
'08
11:39 a.m.
"Dimitry Golubovsky"
Does Yhc currently recognize any pragmas in GHC format {-# PRAGMA-NAME parameters #-} or any other format?
The format {-# PRAGMA-NAME parameters #-} is defined by the Haskell'98 standard. There is a certain amount of basic support already in the parser: grep for "Pragma" in compiler/Parser/*.hs, and you will see that the parser knows what they look like, and can store them in a DeclAnnot constructor of the AST. However, no location in the grammar actually calls parsePragma at the moment. One needs to decide exactly where in the tree a pragma is valid (e.g. anywhere a Decl would be valid?). Then they need to be plumbed right through to where you need them. Regards, Malcolm