Re: [Felix-language] Handling null pointers

2012-02-19 Thread john skaller
On 20/02/2012, at 12:11 PM, john skaller wrote: > > sthe_name : = "@" sthe_name =># "(Prefix)"; small white lie: you would need syntax fred { sthe_name : = "@" sthe_name =># "(Prefix)"; } open syntax fred; in user code. Now more magic: typedef ptrs = typesetof ( &

Re: [Felix-language] Handling null pointers (and a bug in flx)

2012-02-19 Thread john skaller
Warning: currently there's a serious bug in flx: it does not rebuild if the *.flx file is changed. It is supposed to do that! You will need to use --force until I fix it! Now: here is the beauty of Felix! sthe_name : = "@" sthe_name =># "(Prefix)"; typedef fun n"@"

[Felix-language] Handling null pointers

2012-02-19 Thread john skaller
I wrote: > So now, the BIG one. First, understand that a union like: > > union list = | Empty | Cons of int * list > > is represented by a packed pointer: > > 0 --> Empty > 1 + pointer --> Cons No longer, now it is: > But now, we want a new representation: > > 0 --> N