Nested arrow do notation doesn't cause errors in GHCi
The offending line is considered an empty do block in the arrow command. This happens due to indentation: the do block is at the same level of indentation as the enclosing do block.
This is incorrect syntax which doesn't lead to complaints when loading this module with GHCi; but it does when building the module.
Steps to reproduce
- Create a module similar to the one in the gist
- Load the module in GHCi (in my case,
- Build the module (
The compilation errors listed in https://gist.github.com/asheshambasta/64496f5f2c55f9b78293ff2eba72f884#file-errors-txt must also be emitted when loading the module with ghci.
- GHC version used: 8.4.4
- Operating System: NixOS
- System Architecture:
Linux quasar-nixos-tp 5.1.21 #1-NixOS SMP Sun Jul 28 06:28:39 UTC 2019 x86_64 GNU/Linux