Skip to content

unhelpful error message about enabling TypeApplications

% cat bug.hs
{-# LANGUAGE TypeApplications #-}
main = return (id@() ())
% ghc bug.hs
[1 of 1] Compiling Main             ( bug.hs, bug.o )

bug.hs:2:16: error:
    Pattern syntax in expression context: id@()
    Did you mean to enable TypeApplications?

This error message makes no sense because TypeApplications is already enabled.

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