Opened 3 years ago

Closed 16 months ago

#11267 closed bug (duplicate)

Can't parse type with kind ascription with GHCi's :kind command

Reported by: RyanGlScott Owned by:
Priority: normal Milestone:
Component: GHCi Version: 7.10.3
Keywords: Cc: jstolarek
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: GHC rejects valid program Test Case:
Blocked By: Blocking:
Related Tickets: #8708 Differential Rev(s):
Wiki Page:

Description

I was playing around with GHCi's :kind command and noticed that trying to ascribe a type with a kind doesn't parse:

$ inplace/bin/ghc-stage2 --interactive
GHCi, version 7.11.20151219: http://www.haskell.org/ghc/  :? for help
λ> :set -XTypeInType 
λ> :kind 'True :: Bool

<interactive>:1:7: error: parse error on input ‘::’

This seems like something that should be able to parse, given that :type True :: Bool parses just fine. Is there a reason it couldn't?

Change History (5)

comment:1 Changed 3 years ago by goldfire

Kind ascriptions in types require parentheses (and have for some time). Not sure precisely why, but I'm sure that the parser would be made more complicated by relaxing this restriction.

comment:2 Changed 3 years ago by RyanGlScott

I was afraid of that. If it would be too much work to change, then we could close this ticket.

comment:3 Changed 3 years ago by simonpj

Not necessarily "too much work to change". It might just need someone to look into it.

Simon

comment:4 Changed 3 years ago by jstolarek

Cc: jstolarek added

comment:5 Changed 16 months ago by RyanGlScott

Resolution: duplicate
Status: newclosed

This is a duplicate of #8708.

Note: See TracTickets for help on using tickets.