OCaml Forge
Patches
Search the entire project
This project's trackers
This project's forums
This project's tasks
This project's releases
This project's documents
This project's news
Project
People
Advanced search
Log In
New Account
Home
My Page
Projects
Code Snippets
HLVM
Summary
Activity
Forums
Tracker
Lists
Tasks
Docs
Surveys
News
SCM
Files
Detail: [#505] Camlp4 quotation for HLVM AST, and examples
Patches: Browse
|
Download .csv
|
Monitor
[#505] Camlp4 quotation for HLVM AST, and examples
Date:
2010-01-10 01:47
Priority:
3
State:
Open
Submitted by:
Gabriel Scherer (
bluestorm
)
Assigned to:
Jon Harrop (jdh302)
Component:
None
Version:
None
Resolution:
None
Summary:
Camlp4 quotation for HLVM AST, and examples
Detailed description
I had a look at HLVM progress recently, and the test.ml file is not so beautiful : lots of hand-crafted AST, not very classy for a supposedly benchmarkable language.
Here is a Camlp4 quotation providing a concrete syntax for the main HLVM constructs, and a port of (some parts of) test.ml that use it. It is loosely based on toplevel.ml and examples/compiler2 syntax, with arbitrary decisions when I didn't know wich syntax you'd want. The syntax is not there to stay, my idea was that you could hack it to your liking.
The quotations support only a fraction of HLVM (still in flux) syntax; all types are supported (I developped against the SVN trunk), but toplevel support is partial, and expressions support is _very_ partial : this is a proof of concept. Note however than thanks to the standard antiquotation mechanism, you are not limited when using the concrete syntax, as you can always revert to the bare constructors inside a quotation when there is no syntax available.
PS : in my opinion, the "The design documentation and good documentation is only to be found in my behind-the-paywall Ocaml Journal Article" really hurts HLVM openness. I understand the general idea behind your Ocaml Journal business model, but you really should make anything HLVM-related open-access. I don't think I would contribute anything serious to a project that doesn't release its documentation free of charge.
Followup
No Followups Have Been Posted
Attached Files:
Attachments:
pa_hlvm.ml
test2.ml
Changes:
Field
Old Value
Date
By
assigned_to
none
2010-01-16 10:51
jdh302
File Added
55: pa_hlvm.ml
2010-01-10 01:47
bluestorm
File Added
56: test2.ml
2010-01-10 01:47
bluestorm