Commit aa184f0d authored by Ian Lynagh's avatar Ian Lynagh

Update some renamer tests to not use the haskell98 package

parent 68c06ebb
module Silly (
Array.accum
Data.Array.accum
) where
import qualified Array
import qualified Data.Array
-- !!! Re-exporting a module whose contents is partially hidden.
module ShouldCompile ( module List ) where
module ShouldCompile ( module Data.List ) where
import List hiding ( sort )
import Data.List hiding ( sort )
......@@ -2,8 +2,8 @@
-- !!! local alias.
module ShouldCompile where
import qualified List as X
import qualified Maybe as X
import qualified Data.List as X
import qualified Data.Maybe as X
x :: Ord a => [a] -> [a]
x = X.sort
......
......@@ -2,8 +2,8 @@
-- !!! a local alias without having used 'qualified'.
module ShouldCompile where
import List as X
import Maybe as X
import Data.List as X
import Data.Maybe as X
x :: Ord a => [a] -> [a]
x = X.sort
......
......@@ -3,7 +3,7 @@
-- !!! entities.
module ShouldCompile where
import List ( sort )
import Data.List ( sort )
x :: Int
x = 2
......@@ -15,4 +15,4 @@ z :: Int
z = ShouldCompile.x
sortOf :: Ord a=> [a] -> [a]
sortOf = List.sort
sortOf = Data.List.sort
-- !!! Checking that lazy name clashing works.
module ShouldCompile where
import List ( reverse, sort )
import Data.List ( reverse, sort )
sort :: Int -- Clashes with List.sort,
sort :: Int -- Clashes with Data.List.sort,
sort = 4 -- but never used, so OK
reverse :: Int -- Clashes with List.reverse,
reverse :: Int -- Clashes with Data.List.reverse,
reverse = 3 -- but the only uses are qualified
x = ShouldCompile.reverse
y = List.reverse
y = Data.List.reverse
......@@ -2,8 +2,8 @@
-- !!! a local alias without having used 'qualified'.
module ShouldCompile where
import List as X
import Maybe as X
import Data.List as X
import Data.Maybe as X
x :: Ord a => [a] -> [a]
x = X.sort
......
......@@ -3,7 +3,7 @@
-- !!! entities.
module ShouldCompile where
import List ( sort )
import Data.List ( sort )
x :: Int
x = 2
......@@ -15,4 +15,4 @@ z :: Int
z = ShouldCompile.x
sortOf :: Ord a=> [a] -> [a]
sortOf = List.sort
sortOf = Data.List.sort
-- !!! Checking that lazy name clashing works
module ShouldCompile where
import List ( sort )
import Data.List ( sort )
sort :: Int
sort = 3
......@@ -10,5 +10,5 @@ foo :: Int
foo = ShouldCompile.sort
baz :: (Ord a) => [a] -> [a]
baz = List.sort
baz = Data.List.sort
{-# OPTIONS -fwarn-unused-imports #-}
-- !!! test unused import warning
import Time
import Data.List
main = return () :: IO ()
rn037.hs:3:1:
Warning: The import of `Time' is redundant
except perhaps to import instances from `Time'
To import instances alone, use: import Time()
Warning: The import of `Data.List' is redundant
except perhaps to import instances from `Data.List'
To import instances alone, use: import Data.List()
module ShouldCompile where
import List (nub) -- all unused
import Char (ord, chr) -- some unused
import Data.List (nub) -- all unused
import Data.Char (ord, chr) -- some unused
x = chr 42
rn046.hs:2:1:
Warning: The import of `List' is redundant
except perhaps to import instances from `List'
To import instances alone, use: import List()
Warning: The import of `Data.List' is redundant
except perhaps to import instances from `Data.List'
To import instances alone, use: import Data.List()
rn046.hs:3:1:
Warning: The import of `ord' from module `Char' is redundant
Warning: The import of `ord' from module `Data.Char' is redundant
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