Skip to content

Non-ideal error message for misplaced LANGUAGE pragma

Placing the LANGUAGE pragma anywhere besides the top results in it not being accepted - thus this should result in an error message.

Trivially:

import Data.Maybe

{-# LANGUAGE EmptyDataDecls #-}

data A

This would be minorly more annoying for TypeFamilies, who's error doesn't mention language extentions: "Data/Queue.hs:30:0: parse error (possibly incorrect indentation)"

Trac metadata
Trac field Value
Version 6.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Parser)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Multiple
Architecture Multiple
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information