Created
September 19, 2014 22:57
-
-
Save ion1/aee28007c0cef961d0fc to your computer and use it in GitHub Desktop.
-fdefer-type-errors
This file contains hidden or 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
| (a,b) = ("foo", "bar" + 42) |
This file contains hidden or 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
| % ghci -fdefer-type-errors Foo.hs | |
| [1 of 1] Compiling Main ( Foo.hs, interpreted ) | |
| Foo.hs:1:1: Warning: | |
| Top-level binding with no type signature: a :: [Char] | |
| Foo.hs:1:1: Warning: | |
| Top-level binding with no type signature: b :: [Char] | |
| Foo.hs:1:23: Warning: | |
| No instance for (Num [Char]) arising from a use of ‘+’ | |
| In the expression: "bar" + 42 | |
| In the expression: ("foo", "bar" + 42) | |
| In a pattern binding: (a, b) = ("foo", "bar" + 42) | |
| Ok, modules loaded: Main. | |
| λ> a | |
| "foo" | |
| λ> b | |
| "*** Exception: Foo.hs:1:23: | |
| No instance for (Num [Char]) arising from a use of ‘+’ | |
| In the expression: "bar" + 42 | |
| In the expression: ("foo", "bar" + 42) | |
| In a pattern binding: (a, b) = ("foo", "bar" + 42) | |
| (deferred type error) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment