Skip to content

MultiWayIf: Expects different indentation than GHC #468

Open
@nomeata

Description

@nomeata

Consider this file:

{-# LANGUAGE MultiWayIf #-}

foo b = if | b
           , b
           -> 1
           | otherwise
           -> 2

It loads in ghc, but haskell-src-exts say

ghci> Language.Haskell.Exts.parseFile "/tmp/Test.hs"
ParseFailed (SrcLoc "/tmp/Test.hs" 4 12) "Parse error: ;"

It works if I indent the lines starting with , and -> by at least one space.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions