indentation error on 'case...of...'
jiajunhuang opened this issue · 2 comments
jiajunhuang commented
hi, I'm reading Real World Haskell, and I'm using this script to help me handle the indent.
But I've got an issue at line 8 :
splitLines [] = []
splitLines cs =
let (pre, suf) = break isTerminator cs
in pre: case suf of
('\r': '\n': rest) -> splitLines rest
('\r': rest) -> splitLines rest
('\n': rest) -> splitLines rest
_ -> []
isTerminator c = c == '\r' || c == '\n'_ -> [] is in a bad indent level.
Thanks!
raichoo commented
I tried to indent the alternatives, which might be a dumb idea. I removed this. It hopefully works as expected now.
jiajunhuang commented
👍 thank you very much.