[MLton] mlb annotations
Matthew Fluet
fluet@cs.cornell.edu
Tue, 2 Nov 2004 09:15:22 -0500 (EST)
When I added support for quoted (") filenames in mlbs, it occured to me
that it might be useful to make annotations be quoted as well.
Some pros:
+ unify "parsing" of annotations from command line and from .mlbs
+ simpler grammar; it's a bit ad hoc what the grammar currently checks.
it enforces annotations as "comma delimited lists of (whitespace
delimited lists of identifiers)", but does nothing to check the
validity of the annotations until elaboration. This was a deliberate
decision on my part, as I wanted it to be clear that annotations
were an open ended feature. It also meant that we could parse
some other system's annotations. Choosing string constants
as the representation of annotations keeps these design decisions.
Some cons:
+ cumbersome to write multi-line annotations:
ann
sequenceUnit false,
warnMatch true,
warnUnused true, forceUsed
in
...
end
would be written either
ann
"sequenceUnit false, warnMatch true, warnUnused true, forceUsed"
in
...
end
or
ann
"sequenceUnit false, \
warnMatch true, \
warnUnused true, forceUsed"
in
...
end