[Felix-language] source tracking

2012-02-19 Thread john skaller
There are problems discovering where an error occurred. Suppose in procedure P you call Q which calls R and there's an error. If R gets called a lot, knowing the problem was detected in R doesn't help locate that it was called by Q which was called by P, and the real problem is in P near the calle

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

[Felix-language] multi-(thread/process) compilation

2012-02-19 Thread john skaller
At present, when one compiles Felix programs concurrently, it will work provided (a) there's no need to rebuild the cache (b) everything that needs to be built by each compile is distinct It may also work if: (c) two processes rebuild something to the same thing For example if two compiles of t

[Felix-language] unions

2012-02-19 Thread john skaller
Now I have unions appearing to work so that a union of one constructor is replaced by its argument. Eg union X = | R of int is replaced by int. This is still not fully efficient, since you still need to use a match to extract the value: let R ?r = x in ...l and the match still u