On Tue, Jul 20, 2010 at 09:17:15AM +0200, José Pedro Magalhães wrote:
2010/7/19 José Romildo Malaquias j.romi...@gmail.com
I am writing here to ask suggestions on how to annotate an ast with
types (or any other information that would be relevant in a compiler
phase) in Haskell.
Hi Romildo,
2010/7/23 José Romildo Malaquias j.romi...@gmail.com
On Tue, Jul 20, 2010 at 09:17:15AM +0200, José Pedro Magalhães wrote:
2010/7/19 José Romildo Malaquias j.romi...@gmail.com
I am writing here to ask suggestions on how to annotate an ast with
types (or any other
Despite the interesting discussing which has followed this question I think
that in orde to approach this specific problem the use of a specific
compiler-writers toolset such as the uuagc
(http://hackage.haskell.org/package/uuagc-0.9.29)) system is to be preferred;
it provides aneffiicent and
G'day all.
Quoting José Romildo Malaquias j.romi...@gmail.com:
I am writing here to ask suggestions on how to annotate an ast with
types (or any other information that would be relevant in a compiler
phase) in Haskell.
This might help:
Hi José,
2010/7/19 José Romildo Malaquias j.romi...@gmail.com
I am writing here to ask suggestions on how to annotate an ast with
types (or any other information that would be relevant in a compiler
phase) in Haskell.
As an example, consider the simplified ast types:
data Exp
=
Hello.
In his book Modern Compilder Implementation in ML, Appel presents a
compiler project for the Tiger programming language where type checking
and intermediate code generation are intrinsically coupled.
There is a function
transExp :: Absyn.Exp - (Tree.Exp,Types.Type)
that do semantic
Martijn van Steenbergen has a good blog post that describes the method I
generally use:
http://martijn.van.steenbergen.nl/journal/2010/06/24/generically-adding-position-information-to-a-datatype/
In his example he annotates the expression tree with position information,
but you can use the same
I would be inclined to add type annotations as an extra constructor of
the expression representation type.
data Exp
= IntExp Integer
| VarExp Symbol
| AssignExp Symbol Exp
| IfExp Exp Exp (Maybe Exp)
| CallExp Symbol [Exp]
| LetExp [Dec] Exp
| Exp `HasType` Ty
This
Forgot the attachment.
Romildo
---BeginMessage---
On Mon, Jul 19, 2010 at 01:51:57PM -0400, Job Vranish wrote:
Martijn van Steenbergen has a good blog post that describes the method I
generally use:
Ah, I found the attachment on your other email.
I would recommend using the Fix and Ann types, instead of the AnnFix type.
I modified your code a bit (and fixed the Show instances etc...) and put it
here:
http://hpaste.org/fastcgi/hpaste.fcgi/view?id=27823#a27823
Let me know if you have
10 matches
Mail list logo