We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type ExpAlg[E] = { lit : E }; type Exp = { accept : forall E. ExpAlg[E] -> E }; let merge[A, B] (x : ExpAlg[A]) (y : ExpAlg[B]) = { lit = x.lit ,, y.lit }; #let f1[A, B] (x : ExpAlg[A]) (y : ExpAlg[B]) (z : Exp) = z.accept[A & B](merge[A, B] x y); let f2[A, B, C] (x : ExpAlg[A]) (y : ExpAlg[B]) (z : ExpAlg[C]) (w : Exp) = w.accept[A & B & C](merge[A, B & C] x (merge[B, C] y z)); 1
When I implemented the merge algebra by hand in source language, f2j complained that:
BaseTransCFJava.trans: expected tuple type
Seems that it only happens when both "ExpAlg" and "Exp" are record types. Not sure though.
The text was updated successfully, but these errors were encountered:
dumpsimplecore of
dumpsimplecore
type ExpAlg[E] = { lit : E }; type Exp = { accept : forall E. ExpAlg[E] -> E }; let merge[A, B] (x : ExpAlg[A]) (y : ExpAlg[B]) = { lit = x.lit ,, y.lit }; 1
gives
... let merge = /\ A -> /\ B -> \ (x : A) -> \ (y : B) -> (_,_) in 1
What is that underscore? We really need to polish pretty printer, otherwise it's hard for me to debug in backend.
Sorry, something went wrong.
bixuanzju
No branches or pull requests
When I implemented the merge algebra by hand in source language, f2j complained that:
Seems that it only happens when both "ExpAlg" and "Exp" are record types. Not sure though.
The text was updated successfully, but these errors were encountered: