Ticket #5948 (closed bug: fixed)

Opened 14 months ago

Last modified 14 months ago

Parentheses needed when declaring a type synonym with ':

Reported by: goldfire Owned by: pcapriotti
Priority: normal Milestone: 7.6.1
Component: Compiler (Parser) Version: 7.5
Keywords: DataKinds Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: GHC rejects valid program Difficulty: Unknown
Test Case: polykinds/T5948 Blocked By:
Blocking: Related Tickets:

Description

Consider the following code:

{-# LANGUAGE DataKinds, TypeOperators #-}

type Foo = (Int ': '[])

type Bar = Int ': '[]

The declaration for Foo compiles, while the declaration for Bar fails with a parse error on :.

This is clearly easy to work around, but I thought it was enough of an infelicity to be reported.

Change History

Changed 14 months ago by pcapriotti

  • owner set to pcapriotti
  • difficulty set to Unknown

Changed 14 months ago by p.capriotti@…

commit f0d10e348d29c19a439d921dfbfb0c66a02f6b75

Author: Paolo Capriotti <p.capriotti@gmail.com>
Date:   Fri Apr 6 15:01:01 2012 +0100

    Allow promoted constructors in the typedoc production (#5948)

 compiler/parser/Parser.y.pp |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Changed 14 months ago by pcapriotti

  • status changed from new to closed
  • testcase set to polykinds/T5948
  • resolution set to fixed
  • milestone set to 7.6.1

Thanks for the report.

Note: See TracTickets for help on using tickets.