Opened 4 years ago

Closed 4 years ago

#10810 closed bug (fixed)

Data constructor operators mis-printed in Template Haskell

Reported by: goldfire Owned by:
Priority: normal Milestone: 7.10.3
Component: Template Haskell Version: 7.10.2
Keywords: newcomer Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: th/T10810
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


When I say

{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -ddump-splices -dsuppress-uniques #-}

module Bug where

$([d| data Foo = (:!) |])

I get

Bug.hs:6:3-24: Splicing declarations
    [d| data Foo = :! |] ======> data Foo = :!

There are missing parentheses in that output.

Change History (5)

comment:1 Changed 4 years ago by thoughtpolice


Milestone renamed

comment:2 Changed 4 years ago by Richard Eisenberg <eir@…>

In 6a20920/ghc:

Small improvement in pretty-printing constructors.

This fixes #10810 by cleaning up pretty-printing of constructor
declarations. This change also removes a (in my opinion) deeply
bogus orphan instance OutputableBndr [Located name], making
HsDecls now a non-orphan module. Yay all around.

Test case: th/T10810

comment:3 Changed 4 years ago by goldfire

Status: newmerge
Test Case: th/T10810

Merge only if convenient. This is a tiny bug.

comment:4 Changed 4 years ago by bgamari

comment:5 Changed 4 years ago by bgamari

Resolution: fixed
Status: mergeclosed
Note: See TracTickets for help on using tickets.