Some guessing involved since you don’t provide the complete code, but this error could indicate that your line iLength = ...
is not properly indented; actually, that the iLength
starts to the right of the length =
on the line before.
Does your original file use tabs instead of spaces for indentation? If so, be aware that Haskell always interprets a tab as spanning 8 columns. So, e.g.,
<TAB>where length = ...
<TAB><TAB><SPACE><SPACE>iLength = ...
would be interpreted as
where length = ...
iLength = ...
thus causing the error, even though your editor might show the lines properly aligned if it uses 4-column tabs.