Skip to content

DataKinds pretty-printing: Better to have spaces #471

Open
@nomeata

Description

@nomeata

This file:

{-# LANGUAGE DataKinds #-}

type PromotedList = '[ 'True ]

is pretty-printed as such:

ghci> parseFile "/tmp/Test.hs" >>= putStrLn . prettyPrint . fromParseResult
{-# LANGUAGE DataKinds #-}

type PromotedList = '['True]

but that’s not legal:

/tmp/Test.hs:3:21: error: parse error on input ‘'’
  |
3 | type PromotedList = '['True]
  |                     ^

My suggestion to is to always add a space after '[ in the pretty printer.

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