Skip to content
New issue

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-based-casts and coercions are not equivalent #81

Open
LuKuangChen opened this issue Sep 29, 2019 · 1 comment
Open

Type-based-casts and coercions are not equivalent #81

LuKuangChen opened this issue Sep 29, 2019 · 1 comment

Comments

@LuKuangChen
Copy link

The blame labels are different.

$ grift --type-based-casts p1.grift 
$ ./a.out 
Implicit cast in ascription on expression at p1.grift:2:2
$ grift --coercions p1.grift 
$ ./a.out 
Implicit cast in ascription on expression at p1.grift:1:1

Here is the content of p1.grift

((ann
  (ann
   (ann
    (lambda ([x : (Tuple Int Int)]) x)
    ((Tuple Int Int) -> (Tuple Dyn Dyn)))
   ((Tuple Int Int) -> (Tuple Dyn Bool)))
  ((Tuple Int Int) -> (Tuple Bool Bool)))
 (tuple 1 2))
@akuhlens
Copy link
Collaborator

This seems like a fundamental problem with the way tuple coercions are currently implemented. Good to know! We will need to talk about this on Tuesday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants