Commit 83d5ba10 authored by Isaac Dupree's avatar Isaac Dupree
Browse files

Add tests for -fwarn-implicit-prelude (and -fwarn-unused-imports along with it) (trac #1317)

parent cf265a3c
......@@ -62,6 +62,9 @@ test('rn053', normal, multimod_compile, ['rn053', '-v0'])
clean(['Rn053_A.hi', 'Rn053_A.o', 'Rn053_B.hi', 'Rn053_B.o'])
test('rn054', normal, compile, [''])
test('rn055', normal, compile, [''])
test('rn056', normal, compile, [''])
test('rn057', normal, compile, [''])
test('timing001', normal, compile, [''])
test('timing002', normal, compile, [''])
{-# OPTIONS_GHC -fwarn-implicit-prelude -fwarn-unused-imports #-}
module ShouldCompile where
-- !!! should produce warnings about implicitly imported Prelude
-- (but not about the implicit import being unused)
rn055.hs:1:0: Warning: Module `Prelude' implicitly imported
{-# OPTIONS_GHC -fwarn-implicit-prelude -fwarn-unused-imports #-}
module ShouldCompile where
import Prelude ()
-- !!! should produce no warnings
-- (the other use of importing nothing is
-- to nullify the implicit import of the Prelude)
{-# OPTIONS_GHC -fwarn-implicit-prelude #-}
{-# LANGUAGE NoImplicitPrelude #-}
module ShouldCompile where
-- !!! should produce no warning
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment