Created
June 2, 2014 12:14
-
-
Save reynir/b3d32f07d69366dd2bc3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x : Int | |
x = 1 | |
y : String | |
y = "2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ idris cast.idr | |
____ __ _ | |
/ _/___/ /____(_)____ | |
/ // __ / ___/ / ___/ Version 0.9.12-git:5621005 | |
_/ // /_/ / / / (__ ) http://www.idris-lang.org/ | |
/___/\__,_/_/ /_/____/ Type :? for help | |
*cast> x + cast(y) | |
3 : Int | |
*cast> cast(x) ++ y | |
"12" : String | |
*cast> cast(x) + cast(y) | |
When elaborating an application of constructor __infer: | |
Can't disambiguate name: Prelude.Classes.+, Prelude.Fin.+ | |
*cast> cast(x) ++ cast(y) | |
When elaborating an application of constructor __infer: | |
Can't disambiguate name: Prelude.List.++, | |
Prelude.Strings.++, | |
Prelude.Vect.++ | |
*cast> :q | |
Bye bye |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The operator + is overloaded twice, while ++ is overloaded three times: