Skip to content

Parse error on `COLUMN` pragma before first token

Summary

When I use a COLUMN pragma before the first token I get a parse error.

Steps to reproduce

{-# LANGUAGE OverloadedStrings #-}
-- module Main where

{-# LINE 8 "Foo.hs" #-}
{-# COLUMN 17 #-}import qualified {-# COLUMN 17 #-}Data.Text

main :: IO ()
main =  print $ Data.Text.length "foo"
$ runhaskell Main.hs

Foo.hs:10:1: error: [GHC-58481] parse error on input ‘main’

If I uncomment the module header then the program is accepted.

Expected behavior

The program should be accepted.

Environment

  • GHC version used: 9.6.1
Edited by Simon Hengel
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information