On Thu, Feb 12, 2015 at 2:17 AM, Keean Schupke <[email protected]> wrote:

> You can have an uncurrying pass in the compiler. I would define the
> primitives with the native arity like this:
>
> primitive_add :: (Int, Int) -> Int.
>
> I would define + as a type class
>
> (+) :: a -> a -> a
>
> And I would let the uncurrying pass try and get both arguments for + by
> AST transformation.
>
> If you cannot get both arguments in the same place due to a module
> boundary, then you have to thunk it anyway.
>
Good. And given my previous statement that, in BitC, the compiler is
forbidden to make any transformation that changes a function from
non-allocating to allocating, it seems obvious that no correct
implementation of this exists.

In BitC, it really is our intention that calling a function with the wrong
number of arguments IS AN ERROR in the absence of some concrete syntactic
construct indicating that the user intended to perform an allocation.


shap
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to