Grift
Grift copied to clipboard
Another case where type-based-casts and coercions are not equivalent
$ grift --type-based-casts p2.grift
$ ./a.out
Implicit cast in ascription on expression at p2.grift:3:3
$ grift --coercions p2.grift
$ ./a.out
Implicit cast in ascription on expression at p2.grift:1:1
The content of p2.grift
((ann
(ann
(ann
(ann
(ann
(lambda ([x : (Tuple Int Int)]) x)
((Tuple Int Int) -> (Tuple Int Int)))
((Tuple Int Int) -> (Tuple Dyn Int)))
((Tuple Int Int) -> (Tuple Bool Int)))
((Tuple Int Int) -> Dyn))
((Tuple Int Int) -> Bool))
(tuple 1 2))