Commit d16d063d authored by Simon Marlow's avatar Simon Marlow

Update all imports to use the Haskell 2010 hierarchical names

parent c89ad1cd
module Main(main) where
import Distributed
import System
import IO
import System.Environment
import System.IO
data Link a = Link (MVar a) (MVar ())
......@@ -71,4 +71,4 @@ main = do
*Tests MVar communication, and thread creation.
-}
\ No newline at end of file
-}
module Main(main) where
import Distributed
import System
import List
import IO
import Time
import System.Environment
import Data.List
import System.IO
import System.Time
import PrelNum
-- we are only interested in ms accuracy < 60 seconds
......@@ -90,4 +90,4 @@ main = do
* Tests remote host lookup and timing.
-}
\ No newline at end of file
-}
import Distributed
import System
import IO
import System.Environment
import System.IO
main = do
putStrLn "Place Test..."
......@@ -45,4 +45,4 @@ main = do
* Tests owningPE on MVars.
-}
\ No newline at end of file
-}
......@@ -30,10 +30,10 @@
-}
module Main ( main ) where
import Char
import List
import IO
import System
import Data.Char
import Data.List
import System.IO
import System.Environment
import Arch_x86
import Generics
......
......@@ -32,8 +32,8 @@ The Circuit Simulator example
David J. King & John O'Donnell
January, 1998
> import System
> import List
> import System.Environment
> import Data.List
> data BinTree a b = Cell a
> | Node b (BinTree a b) (BinTree a b)
......
......@@ -4,8 +4,8 @@
-}
import Prelude hiding (Maybe(Just,Nothing))
import List
import System
import Data.List
import System.Environment
-----------------------------
-- The main program
......
......@@ -51,8 +51,8 @@ first understand binomial queues. See, for example, David King's
> -- partain
>module Main (main) where
>import Array
>import System
>import Data.Array
>import System.Environment
>import Control.Monad.ST
>import Data.Array.ST
......
......@@ -23,10 +23,6 @@ import Matrix
import Types
import Interval
#if __HASKELL1__ < 5
#define realToFrac fromRealFrac
#endif
-- no is returned when there is "no" change to the csg.
no = error ("Evaluated dead csg.")
......
......@@ -31,7 +31,7 @@ import Kolor
import Matrix
import Patchlevel
import System
import System.Environment
import System.IO
main = do
......
......@@ -22,10 +22,6 @@ module Matrix where
import Types
import Interval -- not used.
#if __HASKELL1__ < 5
#define realToFrac fromRealFrac
#endif
mat4x1 :: (Fractional a) => Arr -> R3 a -> R3 a
mat4x1 (r1,r2,r3) xyz = (x,y,z)
where
......
......@@ -34,10 +34,10 @@ All the code below is understood to be in the public domain.
> strspace, maybestr
> ) where
> import Char (isAlphaNum)
> import List
> import Ix ( Ix(..) )
> import Array ( Array, listArray, array, (!) )
> import Data.Char (isAlphaNum)
> import Data.List
> import Data.Ix ( Ix(..) )
> import Data.Array ( Array, listArray, array, (!) )
%------------------------------------------------------------------------------
......
......@@ -24,10 +24,10 @@ Here is our mid-section datatype
> import AttrGrammar
> import AttrGrammarParser
> import Array
> import Char
> import List
> import Maybe (fromMaybe)
> import Data.Array
> import Data.Char
> import Data.List
> import Data.Maybe (fromMaybe)
#ifdef DEBUG
......
......@@ -13,8 +13,8 @@ Generating info files.
> import qualified Set hiding ( Set )
> import Grammar
> import Array
> import List (nub)
> import Data.Array
> import Data.List (nub)
> import Data.Version ( showVersion )
Produce a file of parser information, useful for debugging the parser.
......
......@@ -11,7 +11,7 @@ The lexer.
> import ParseMonad
> import Char ( isSpace, isAlphaNum, isDigit, digitToInt )
> import Data.Char ( isSpace, isAlphaNum, isDigit, digitToInt )
> data Token
> = TokenInfo String TokenId
......
......@@ -14,12 +14,12 @@ The code generator.
> interleave, interleave', maybestr,
> brack, brack' )
> import Maybe ( isJust, isNothing )
> import Char
> import List
> import Data.Maybe ( isJust, isNothing )
> import Data.Char
> import Data.List
> import Control.Monad.ST
> import Array ( Array )
> import Data.Array ( Array )
> import Data.Array.ST ( STUArray )
> import Data.Array.Unboxed ( UArray )
> import Data.Array.MArray
......
......@@ -23,12 +23,12 @@ Path settings auto-generated by Cabal:
> import Info (genInfoFile)
> import Target (Target(..))
> import System.Console.GetOpt
> import Monad ( liftM )
> import System
> import Char
> import IO
> import Array( assocs, elems, (!) )
> import List( nub, isSuffixOf )
> import Control.Monad ( liftM )
> import System.Environment
> import Data.Char
> import System.IO
> import Data.Array( assocs, elems, (!) )
> import Data.List( nub, isSuffixOf )
> import Data.Version ( showVersion )
> sCC _ x = x
......
......@@ -13,7 +13,7 @@ optimisation here.
module Main (main) where
import System
import System.Environment
algb :: (Eq a) => [a] -> [a] -> [Int]
algb xs ys
......
......@@ -46,7 +46,7 @@ module Densematrix(Matrix,Vector,
minverse,
veclist, matlist ) where
import List (transpose)
import Data.List (transpose)
import Utils
type Matrix = [[Float]]
......
......@@ -34,7 +34,7 @@ module Input
mksparse,a_easy,a_hard,x1) where
import List (transpose)
import Data.List (transpose)
import Matrix
import AbsDensematrix
import Utils
......
......@@ -24,7 +24,7 @@ Notes:
\begin{code}
module Matlib (scale, precond, uncondition) where
import List (genericLength)
import Data.List (genericLength)
import Matrix
import AbsDensematrix
......
......@@ -72,7 +72,7 @@
import Matrix -- matrix implementation
import Input -- read gcomp data files
import Misc -- for timing function and takeuntil
import System
import System.Environment
\end{code}
AbsCg imports the actual linear system solver which uses a
......
......@@ -5,8 +5,8 @@
module Main where
import IO
import Ratio
import System.IO
import Data.Ratio
import System.Environment (getArgs)
infixl 7 .*
......
......@@ -4,8 +4,8 @@
ordered, but not necessarily balanced.
-}
import System
import Char(isSpace,isDigit,isAlpha)
import System.Environment
import Data.Char(isSpace,isDigit,isAlpha)
data Tree e = Node Key (Tree e) (Tree e) | Leaf Key e | Empty deriving Show{-was:Text-}
type Key = Int
......
......@@ -5,7 +5,7 @@
-- It's not a very good test, I suspect, because it manipulates big integers,
-- and so probably spends most of its time in GMP.
import Ratio
import Data.Ratio
import System.Environment
-- powers = [[r^n | r<-[2..]] | n<-1..]
......
......@@ -2,7 +2,7 @@ Compute the digits of "e" using continued fractions.
Original program due to Dale Thurston, Aug 2001
> module Main where
> import System (getArgs)
> import System.Environment (getArgs)
> type ContFrac = [Integer]
......
......@@ -2,7 +2,7 @@ Compute digits of e
Due to John Hughes, Aug 2001
> module Main where
> import System
> import System.Environment
Here's a way to compute all the digits of e. We use the series
......
......@@ -16,7 +16,7 @@ Haskell and here is the result using hbc.
-}
----------------------------------------------------------
import System
import System.Environment
infix 8 ^^^
......
......@@ -8,7 +8,7 @@
module Main (main) where
import Char
import Data.Char
main = interact (("Enter a generator: " ++).show.numchars.expand.head.lines)
......
module Main (integrate1D, main) where
import System
import System.Environment
integrate1D :: Double -> Double -> (Double->Double) -> Double
integrate1D l u f =
......
......@@ -6,8 +6,8 @@
-}
module Main (main) where
import Array
import System
import Data.Array
import System.Environment
-- Generation of radicals
......
import System
import System.Environment
suCC :: Int -> Int
suCC x = x + 1
......
-- !!! count the number of solutions to the "n queens" problem.
-- (grabbed from LML dist)
import System
import System.Environment
main = do
......
-- !!! the ultra-notorious "nfib 30" does w/ Floats
--
module Main (main) where
import System
import System.Environment
main = do
[arg] <- getArgs
......
import System
import System.Environment
-- code of unknown provenance (partain 95/01/25)
......
......@@ -2,7 +2,7 @@
-- Colin Runciman (colin@cs.york.ac.uk); March 1996.
-- See article "Lazy wheel sieves and spirals of primes" (to appear, JFP).
import System
import System.Environment
data Wheel = Wheel Int [Int]
......
......@@ -2,7 +2,7 @@
-- Colin Runciman (colin@cs.york.ac.uk); March 1996.
-- See article "Lazy wheel sieves and spirals of primes" (to appear, JFP).
import System
import System.Environment
primes :: [Int]
primes = spiral wheels primes squares
......
......@@ -24,8 +24,8 @@ of all the other programs I thought I'd contribute at least one :-)
-}
module Main ( main ) where
import Complex
import System
import Data.Complex
import System.Environment
main = do
[arg] <- getArgs
......
......@@ -30,25 +30,13 @@
> fst3,
> snd3,
> thd3
#if __HASKELL1__ < 3 || ( defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ < 200 )
> ,Cmp(..), compare, lookup, isJust
#endif
> ) where
#if __HASKELL1__ >= 3 && ( !defined(__GLASGOW_HASKELL__) || __GLASGOW_HASKELL__ >= 200 )
> import Ix ( Ix(..) )
> import Array ( listArray, array, (!) )
> import Data.Ix ( Ix(..) )
> import Data.Array ( listArray, array, (!) )
#define Text Show
#define ASSOC(a,b) (a , b)
#else
#define ASSOC(a,b) (a := b)
#endif
%------------------------------------------------------------------------------
......@@ -203,26 +191,6 @@ Gofer-like stuff:
> combine (a:r) = a : combine r
>
#if __HASKELL1__ < 3 || ( defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ < 200 )
> lookup :: (Eq a) => a -> [(a,b)] -> Maybe b
> lookup k env = case [ val | (key,val) <- env, k == key] of
> [] -> Nothing
> (val:vs) -> Just val
>
> data Cmp = LT | EQ | GT
> compare a b | a < b = LT
> | a == b = EQ
> | otherwise = GT
> isJust :: Maybe a -> Bool
> isJust (Just _) = True
> isJust _ = False
#endif
> assocMaybeErr :: (Eq a) => [(a,b)] -> a -> MaybeErr b String
> assocMaybeErr env k = case [ val | (key,val) <- env, k == key] of
> [] -> Failed "assoc: "
......
Time-stamp: <Fri May 17 1996 00:24:35 Stardate: [-31]7514.87 hwloidl>
Time-stamp: <2010-10-13 10:22:35 simonmar>
An adaptive algorithm for numeric integration.
......@@ -16,7 +16,7 @@ This example code does adaptive integration of single variable functions.
import Strategies
#endif
import System -- for getArgs
import System.Environment -- for getArgs
\end{code}
% ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %
......
{-
Time-stamp: <Wed May 22 1996 20:46:49 Stardate: [-31]7544.12 hwloidl>
Time-stamp: <2010-10-13 10:22:48 simonmar>
Source file: /local/grasp/trinder/tests/strategies/
......@@ -29,7 +29,7 @@ import Strategies
#if defined(IO13)
import GranRandom
import System (getArgs)
import System.Environment (getArgs)
#else
import GlaExts
import ST
......
{-
Time-stamp: <Wed May 22 1996 21:13:34 Stardate: [-31]7544.21 hwloidl>
Time-stamp: <2010-10-13 10:22:41 simonmar>
Module expressing Dates Bill of Material Program
Phil Trinder 15/1/96
......@@ -26,7 +26,7 @@ import Strategies
#if defined(IO13)
import GranRandom
import System (getArgs)
import System.Environment (getArgs)
#else
import GlaExts
import ST
......
{-
Time-stamp: <Wed May 22 1996 22:36:55 Stardate: [-31]7544.50 hwloidl>
Time-stamp: <2010-10-13 10:22:45 simonmar>
Module expressing Dates Bill of Material Program
Phil Trinder 18/9/95
......@@ -22,7 +22,7 @@ import Strategies
#if defined(IO13)
import GranRandom
import System (getArgs)
import System.Environment (getArgs)
#else
import GlaExts
import ST
......
......@@ -13,8 +13,8 @@ This test program is courtesy of Andrew Partridge.
-}
module Main(main) where
import System
import Parallel
import System.Environment
import Control.Parallel
result x
= par sxs ((force xs) `seq` sxs)
......
......@@ -17,7 +17,7 @@ Message-ID: <swordfish.740931041@minster.york.ac.uk>
------------------------------------------------------------------
import Control.Parallel
import List(transpose)--1.3
import Data.List(transpose)--1.3
main = par (unigrid d) (par (unigrid dr) (par (unigrid ur) (
putStr (concat (parmap find hidden))
......
......@@ -15,8 +15,8 @@ module S_Array (
)
where
import List(partition)--1.3
import Ix--1.3
import Data.List(partition)
import Data.Ix
import Norm
import Parallel
......
......@@ -2,7 +2,7 @@ import DCBM
import Types