links
links copied to clipboard
Confusing Names
links> sig ++ : (Int, Int) -> Int op x ++ y { x + y };
links> (++);
fun : (Int, Int) -> Int
links> [] ++ [];
[] : [_]
links> (++)(2, 2);
4 : Int
links> 2 ++ 2;
<stdin>:1: Type error: The infix operator
`++'
has type
`([a], [a]) -b-> [a]'
while the arguments passed to it have types
`Int'
and
`Int'
and the currently allowed effects are
`wild'
In expression: 2 ++ 2.
I hope you enjoyed this piece of poetry. I wish you a good weekend.
Here is another variation
links> op x > y { "test" };
> = fun : (_, _) -> String
links> 2 > 2;
***: Internal Error in instantiate.ml (Please report as a bug): Kind mismatch in type application: (_, _) -> String applied to type arguments: Int, { |wild }