Opened 9 years ago

Closed 4 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 Rev(s):
Wiki Page:

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 9 years ago by SamB

Component: Compiler (Type checker)Compiler (Parser)
Summary: Bad error message for unboxed types with no -fglasgow-exts flagBetter error message for unboxed types with no -fglasgow-exts flag
Type: bugfeature 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 9 years ago by igloo

difficulty: Unknown
Milestone: _|_

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 8 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:4 Changed 8 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:5 Changed 4 years ago by morabbin

Type of failure: 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 4 years ago by simonpj

Resolution: wontfix
Status: newclosed

Agreed, let's close.

Note: See TracTickets for help on using tickets.