Skip to content

`OverloadedRecordDot` conflicts with common `ExplicitForAll`

Summary

The language extension OverloadedRecordDot causes a syntax error when ExplicitForAll is also enabled.

Steps to reproduce

{-# language OverloadedRecordDot, ExplicitForAll #-}

identity :: forall a. a -> a
identity a = a

Attempting to compile this gives an error:

src/Impl/TH.hs:13:15: error: parse error on input ‘.’
   |
13 | id :: forall a. a -> a
   |               ^

Expected behavior

I expect it to compile without giving a syntax error.

Environment

  • GHC version used:
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 9.2.0.20210422

Installed via ghcup.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information