06-16-2015, 05:08 AM
(This post was last modified: 06-16-2015, 05:10 AM by SamJBarney.)
At runtime (UPE is a JIT engine), we query UPE for function foo. Foo is defined as a template, so we generate a specialized function for the arguments requested, and pass back a reference to that function. So Haskell doesn't need to know that it is a template, it just needs to know that it is calling a function called foo.
Hmm... that does make it a bit difficult since we cannot determine what the return type of f is, unless all Haskell types have a base type.
Hmm... that does make it a bit difficult since we cannot determine what the return type of f is, unless all Haskell types have a base type.