Re: ATS Dynamic Loading

2016-09-23 Thread gmhwxi
Here is my suggestion: You can define a datatype as follows: datatype expr(a: type) = ... extern fun eval_expr{a:type} (e0: expr(a)) -> a Your compiler needs to have two modes: for compiling to ATS and for compilng to a value of the type expr(T) for some T. I used to call expr a guarded

Re: ATS Dynamic Loading

2016-09-23 Thread aditya siram
I'm working on a toy Lisp implementation that outputs ATS as a compilation target. It would be convenient if ATS had an `eval`, for instance, `eval("1 + 2")` that compiled and loaded on-the-fly. -deech On Thursday, September 22, 2016 at 6:05:08 PM UTC-5, gmhwxi wrote: > > > Dynload is for the

Re: ATS Dynamic Loading

2016-09-22 Thread Hongwei Xi
Dynload is for the purpose of initializing toplevel name/values bindings. I am not completely clear about what you really need here. An example? A use case? On Thu, Sep 22, 2016 at 4:31 PM, aditya siram wrote: > Hi, > I was wondering if ATS supports something like an

ATS Dynamic Loading

2016-09-22 Thread aditya siram
Hi, I was wondering if ATS supports something like an `eval` function. I realize there's a `dynload` for loading a DATS file at runtime but I was wondering if this can be extended to arbitrary code. Thanks! -deech -- You received this message because you are subscribed to the Google Groups