id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
7476	-ddump-minimal-imports confused if first line is an import	dag	igloo	"On reddit, Chris Done posted this example:

{{{
chris@midnight:~$ cat > x.hs
import Control.Applicative
main = show <$> pure 1 >>= print
chris@midnight:~$ ghc x.hs -ddump-minimal-imports
[1 of 1] Compiling Main             ( x.hs, x.o )
Linking x ...
cachris@midnight:~$ cat Main.imports
import Control.Applicative
    ( print, (>>=), show, Applicative(pure), (<$>) )
}}}

I noted that this is wrong, for example {{{print}}} isn't exported from {{{Control.Applicative}}}:

{{{
>>> import Control.Applicative (print)

<interactive>:1:29:
    Module `Control.Applicative' does not export `print'
}}}

hvr explains: ''for some reason GHC gets confused if the very first string in the .hs file is import; try adding anything, such as a newline or module Main where and it works as expected...''

I couldn't find a relevant bug for this."	bug	closed	normal		Compiler		fixed			Unknown/Multiple	Unknown/Multiple	None/Unknown	Unknown	parser/should_compile/T7476			
