Skip to content

Unable to format ":" chains containing do blocks #825

@tbagrel1

Description

@tbagrel1

Ormolu is currently unable to format this (Parsing of formatted code failed):

module A (a) where

b :: [Int]
b =
  1 :
    do
      2
     : do
        3
       : do
          [4]

With --unsafe, we get the following formatted output:

module A (a) where

b :: [Int]
b =
  1 :
  do
    2 :
  do
    3 :
    do
      [4]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions