Created
July 14, 2015 03:11
-
-
Save rrichardson/733766d7656fd37f2a69 to your computer and use it in GitHub Desktop.
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
## ERRORS in Chess/Util.elm #################################################### | |
-- INFINITE TYPE ------------------------------------------------ Chess/Util.elm | |
I am inferring weird self-referential type for `g` | |
30| let group1 = foldl (\x (g::gs) -> if (x == head g) then (x::g)::gs else [x]::g::gs) | |
^ | |
The bit of the type that is self-referential looks like this: | |
a = Maybe a | |
The cause is often that the usage of `g` is flipped around. | |
Maybe you are inserting a data structure into an element? Maybe you are giving | |
a function to an argument? Either way, something is probably backwards! | |
Try breaking the code related to `g` into smaller pieces. | |
Give each piece a name and try to write down its type. | |
Detected errors in 1 module. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment