Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
let rs = runParser p cs in if length rs == 1 then ...
Imagine a highly ambigious parser that finds millions or even infite parses. This expression will first count them all before seeing it is not length 1, which may take (very) long.
If you use a pattern match to check if the list is length 1, it will stop after finding a second parse.
Then Codewars must be serving you with an old version of the kata. I have had people on my other katas complain about tests with completely different values from what I see when I edit the kata. Not sure what to do in this case.
I still have that issue
Closing issue
Ok guys, I think I have managed to get this patched up. It seems the 500 limit is per language and not for entire kata! The TAB was sitting in the Complete Solution and in the Test and Example cases. Not sure what the author did there.
Same here
If I had a dollar everytime someone raised this exact same issue. Sorry mate, cant fix this, more than 500 people have completed the kata. Rule imposed by Codewars.
There's a tab character in the Test.hs for this problem.
To be more specific, the system will never allow a solution being submitted because a simple stderr:
STDERR:
/tmp/haskell117027-18-yv6ht6.z39lr3sor/Codewars/G/Persistence/Test.hs:4:17: Warning:
Tab character
This tab character is exist in both client side example test code and server side test code, and the system misinterpreted the meaning of GHC warning and considered it as a error from the player.
The tab character is right after the statement "import Data.Char" and should be removed in order to make the problem working again.