Skip to content

Unparseable output with ticked DataKinds and char literals #1000

@amesgen

Description

@amesgen

Describe the bug
Formatting this valid type family

type family Foo a where Foo '( 'x', a) = a

yields

<input>:2:12
  Parsing of formatted code failed:
  parse error on input `,'

Unsafe output:

type family Foo a where
  Foo '('x', a) = a

Expected behavior
This should be supported by inserting a space before the second ' as in the original input; we are already handling similar cases, see #631.

Environment

  • Version of the code: 0.5.3.0, or 13f11d0 (current master)

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