Ticket #8 (closed bug report: fixed)

Opened 6 years ago

Last modified 6 years ago

Type operators aren't printed infix

Reported by: nibro Owned by: nibro
Priority: major Milestone: Full code support
Component: prettyprinter Version:
Keywords: Cc:

Description (last modified by nibro) (diff)

Reported by stepcut:

If you have something like:

instance Foo Int where
   type Dependencies Int = (Account AccountData) :+: Int

It gets transformed to:

instance Foo Int where
       type Dependencies Int = ((:+:) Account AccountData Int)

However, with out the parens around (Account AccountData) GHC thinks you are passing three arguments to (:+:). And, in fact, the parens in the input source are normally not required either.

Change History

Changed 6 years ago by nibro

  • description modified (diff)

Changed 6 years ago by nibro

  • status changed from new to closed
  • resolution set to fixed

A simple matter of changing the pretty printing routine for the TyInfix? constructor.

Note: See TracTickets for help on using tickets.