On Thu, Oct 28, 2010 at 3:09 AM, Dupont Corentin <corentin.dup...@gmail.com> wrote: > EAp :: Exp ref (a -> b) -> Exp ref a -> Exp ref b > It's from which DSL? It is accessible on the net?
It's my own, just written off the top of my head as an example. Accessible "on the net": yes, it's in your email. there's nothing more. > But in the suggestions from Ryan and Brandon I don't understand why I should > add an extra type parameter and what it is! I don't know in Brandon's case, but in my case it's for two reasons: (1) It allows you to write multiple interpreters for the language by changing the type of variables passed around. But, that's not important if you are only planning to have a single interpreter. (2) By parametricity, any CExp can't inspect the "insides" of a reference; all ELam can do with its argument is pass it to EVar. If you have a concrete variable type, you can do weird things like ELam (\(V x) -> EVar (V (x+1))) which doesn't quite make sense. (how are you returning a variable containing a different value than the one you passed in? -- ryan _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe