Opened 7 years ago

Closed 2 years ago

#2216 closed feature request (wontfix)

Better error message for unboxed types with no -fglasgow-exts flag

Reported by: tim Owned by:
Priority: normal Milestone:
Component: Compiler (Parser) Version: 6.8.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

If I compile:

module Foo where

import GHC.Exts

foo = I# 42#

with ghc -c, I get:

Overloaded.hs:6:0: parse error (possibly incorrect indentation)

A better message would suggest using -fglasgow-exts (or something.)

Change History (6)

comment:1 Changed 7 years ago by SamB

  • Component changed from Compiler (Type checker) to Compiler (Parser)
  • Summary changed from Bad error message for unboxed types with no -fglasgow-exts flag to Better error message for unboxed types with no -fglasgow-exts flag
  • Type changed from bug to feature request

How is GHC supposed to know you didn't mean an operator called #? This *is* a parse error, after all -- scope checking isn't done until later.

comment:2 Changed 7 years ago by igloo

  • difficulty set to Unknown
  • Milestone set to _|_

Yes, this is hard, because we really want to know whether there was a space before the #, but we don't know that at the point we want to give the error.

comment:3 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:4 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple

comment:5 Changed 2 years ago by morabbin

  • Type of failure set to None/Unknown

Given that -fglasgow-exts is deprecated, and given that the problems pointed in the comments still hold, is this worth keeping open?

comment:6 Changed 2 years ago by simonpj

  • Resolution set to wontfix
  • Status changed from new to closed

Agreed, let's close.

Note: See TracTickets for help on using tickets.