Re: [Haskell-cafe] Re: Tiger compiler in Haskell: annotating abstract

2010-07-21 Thread José Pedro Magalhães
Hi Oleg, On Wed, Jul 21, 2010 at 09:36, wrote: > > Jose Pedro Magalhaes wrote: > > From what I understand, you are using a list of integers to encode a path > to > > a subterm. This is a practical and lightweight implementation, but less > > type-safe: it is easy to encode annotations that do no

Re: [Haskell-cafe] Re: Tiger compiler in Haskell: annotating abstract

2010-07-21 Thread oleg
Jose Pedro Magalhaes wrote: > From what I understand, you are using a list of integers to encode a path to > a subterm. This is a practical and lightweight implementation, but less > type-safe: it is easy to encode annotations that do not correspond to any > value. Also, it cannot guarantee, with

Re: [Haskell-cafe] Re: Tiger compiler in Haskell: annotating abstract syntax tree

2010-07-20 Thread José Pedro Magalhães
Hi Oleg, >From what I understand, you are using a list of integers to encode a path to a subterm. This is a practical and lightweight implementation, but less type-safe: it is easy to encode annotations that do not correspond to any value. Also, it cannot guarantee, with types alone, that every su

[Haskell-cafe] Re: Tiger compiler in Haskell: annotating abstract syntax tree

2010-07-20 Thread oleg
Jose' Romildo Malaquias wrote: > 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. There is also a general way of annotating AST post factum, described in http://okmij.org/ftp/Al