[Pkg-haskell-commits] darcs: helium: Fix building with GHC 7.4.1 (Closes: #665079)
Joachim Breitner
mail at joachim-breitner.de
Sat Mar 24 21:05:53 UTC 2012
Sat Mar 24 21:02:10 UTC 2012 Joachim Breitner <mail at joachim-breitner.de>
* Fix building with GHC 7.4.1 (Closes: #665079)
Ignore-this: 5532e7d5d57889a9a0be66a9b60c672a
M ./changelog +6
A ./clean
A ./patches/ghc-7.4-compat
M ./patches/series +1
Sat Mar 24 21:02:10 UTC 2012 Joachim Breitner <mail at joachim-breitner.de>
* Fix building with GHC 7.4.1 (Closes: #665079)
Ignore-this: 5532e7d5d57889a9a0be66a9b60c672a
diff -rN -u old-helium//changelog new-helium//changelog
--- old-helium//changelog 2012-03-24 21:05:51.887247893 +0000
+++ new-helium//changelog 2012-03-24 21:05:51.911249146 +0000
@@ -1,3 +1,9 @@
+helium (1.7~pre20090428-3) UNRELEASED; urgency=low
+
+ * Fix building with GHC 7.4.1 (Closes: #665079)
+
+ -- Joachim Breitner <nomeata at debian.org> Sat, 24 Mar 2012 21:15:21 +0100
+
helium (1.7~pre20090428-2) unstable; urgency=low
* Depend on network
diff -rN -u old-helium//clean new-helium//clean
--- old-helium//clean 1970-01-01 00:00:00.000000000 +0000
+++ new-helium//clean 2012-03-24 21:05:51.919247976 +0000
@@ -0,0 +1,7 @@
+helium/src/parser/ResolveOperators.hs
+helium/src/staticanalysis/directives/TS_Analyse.hs
+helium/src/staticanalysis/directives/TS_Apply.hs
+helium/src/staticanalysis/directives/TS_ToCore.hs
+helium/src/staticanalysis/inferencers/KindInferencing.hs
+helium/src/staticanalysis/staticchecks/StaticChecks.hs
+helium/src/codegeneration/CodeGeneration.hs
diff -rN -u old-helium//patches/ghc-7.4-compat new-helium//patches/ghc-7.4-compat
--- old-helium//patches/ghc-7.4-compat 1970-01-01 00:00:00.000000000 +0000
+++ new-helium//patches/ghc-7.4-compat 2012-03-24 21:05:52.107248005 +0000
@@ -0,0 +1,909 @@
+Description: GHC 7.4 compat patch
+ GHC does not support using both base and haskell98, hence adjust all imports.
+Author: Joachim Breitner <nomeata at debian.org>
+Bug-Debian: http://bugs.debian.org/665079
+
+--- helium-1.7~pre20090428.orig/lvm/test/compare.hs
++++ helium-1.7~pre20090428/lvm/test/compare.hs
+@@ -1,6 +1,6 @@
+ module Main where
+
+-import Char (isSpace)
++import Data.Char (isSpace)
+ import System (exitWith,getArgs,ExitCode(..))
+
+ main
+--- helium-1.7~pre20090428.orig/lvm/src/lib/asm/AsmToLvm.hs
++++ helium-1.7~pre20090428/lvm/src/lib/asm/AsmToLvm.hs
+@@ -12,7 +12,7 @@
+ module AsmToLvm( asmToLvm ) where
+
+ import Standard ( assert )
+-import List ( partition)
++import Data.List ( partition)
+ import Id ( idFromString )
+ import IdMap ( IdMap, lookupMap, mapFromList )
+ import Asm
+--- helium-1.7~pre20090428.orig/lvm/src/lib/lvm/Instr.hs
++++ helium-1.7~pre20090428/lvm/src/lib/lvm/Instr.hs
+@@ -24,7 +24,7 @@ module Instr( Instr(..)
+ , instrHasStrictResult
+ ) where
+
+-import Char ( toUpper )
++import Data.Char ( toUpper )
+ import Standard ( strict )
+ import Id ( Id, dummyId )
+ import Byte ( Bytes, nil )
+--- helium-1.7~pre20090428.orig/lvm/src/lib/lvm/LvmImport.hs
++++ helium-1.7~pre20090428/lvm/src/lib/lvm/LvmImport.hs
+@@ -12,7 +12,7 @@
+ module LvmImport( lvmImport, lvmImportDecls ) where
+
+
+-import Monad ( foldM )
++import Control.Monad ( foldM )
+ import Standard ( foldlStrict )
+ import Id ( Id, stringFromId, idFromString )
+ import IdMap ( IdMap, emptyMap, insertMap, elemMap, updateMap, listFromMap, lookupMap, findMap, mapMap )
+--- helium-1.7~pre20090428.orig/lvm/src/lib/lvm/ModulePretty.hs
++++ helium-1.7~pre20090428/lvm/src/lib/lvm/ModulePretty.hs
+@@ -11,7 +11,7 @@
+
+ module ModulePretty ( modulePretty, ppId, ppVarId, ppConId, ppString ) where
+
+-import Char ( isAlphaNum, isAlpha, isLower, isUpper )
++import Data.Char ( isAlphaNum, isAlpha, isLower, isUpper )
+ import PPrint
+ import Byte ( stringFromBytes )
+ import Id ( Id, stringFromId, idFromString )
+--- helium-1.7~pre20090428.orig/lvm/src/lib/lvm/LvmRead.hs
++++ helium-1.7~pre20090428/lvm/src/lib/lvm/LvmRead.hs
+@@ -12,7 +12,7 @@
+ module LvmRead( lvmReadFile, lvmRead ) where
+
+ import Prelude hiding (Read)
+-import Array
++import Data.Array
+ import Id ( Id, stringFromId, idFromString, newNameSupply, freshId )
+ import IdMap
+
+--- helium-1.7~pre20090428.orig/lvm/src/lib/lvm/LvmWrite.hs
++++ helium-1.7~pre20090428/lvm/src/lib/lvm/LvmWrite.hs
+@@ -14,7 +14,7 @@ module LvmWrite( lvmWriteFile, lvmToByte
+ import Standard ( assert, strict )
+ import Id ( Id, stringFromId )
+ import IdMap ( IdMap, emptyMap, insertMapWith, lookupMap )
+-import System ( exitWith, ExitCode(..))
++import System.Exit ( exitWith, ExitCode(..))
+ import Byte
+ import Instr
+ import Lvm
+@@ -519,4 +519,4 @@ encodeInt i
+ = (2*i)+1
+
+ encodeIdx i
+- = (2*i)
+\ No newline at end of file
++ = (2*i)
+--- helium-1.7~pre20090428.orig/lvm/src/lib/common/TopSort.hs
++++ helium-1.7~pre20090428/lvm/src/lib/common/TopSort.hs
+@@ -34,8 +34,8 @@ module TopSort( topSort ) where
+ ) where
+ -}
+
+-import Array
+-import List
++import Data.Array
++import Data.List
+ import Special( ST,STArray, runST, newSTArray, readSTArray, writeSTArray)
+
+ type Vertex = Int
+--- helium-1.7~pre20090428.orig/lvm/src/lib/common/Standard.hs
++++ helium-1.7~pre20090428/lvm/src/lib/common/Standard.hs
+@@ -21,9 +21,9 @@ module Standard( trace, warning, assert
+ , raiseIO, raiseErr
+ ) where
+
+-import List (isPrefixOf)
+-import IO
+-import System (getEnv)
++import Data.List (isPrefixOf)
++import System.IO
++import System.Environment (getEnv)
+ import Special (doesFileExist,unsafeCoerce,unsafePerformIO)
+
+ ----------------------------------------------------------------
+--- helium-1.7~pre20090428.orig/lvm/src/lib/common/Byte.hs
++++ helium-1.7~pre20090428/lvm/src/lib/common/Byte.hs
+@@ -29,10 +29,10 @@ module Byte( Byte
+
+ import Data.Word
+
+-import IO ( IOMode(..) )
++import System.IO ( IOMode(..) )
+ import Special ( openBinary, writeBinaryChar, readBinary, closeBinary )
+ import Standard ( strict )
+-import System ( exitWith, ExitCode(..))
++import System.Exit ( exitWith, ExitCode(..))
+
+ {----------------------------------------------------------------
+ types
+@@ -167,4 +167,4 @@ readByteList path
+ } `catch` (\exception ->
+ let message = show exception ++ "\n\nUnable to read from file " ++ show path
+ in do { putStrLn message; exitWith (ExitFailure 1) })
+-
+\ No newline at end of file
++
+--- helium-1.7~pre20090428.orig/lvm/src/lib/common/Set.hs
++++ helium-1.7~pre20090428/lvm/src/lib/common/Set.hs
+@@ -127,7 +127,7 @@ import Prelude hiding (filter)
+ {-
+ -- just for testing
+ import QuickCheck
+-import List (nub,sort)
++import Data.List (nub,sort)
+ import qualified List
+ -}
+
+@@ -1029,4 +1029,4 @@ prop_Ordered
+ prop_List :: [Int] -> Bool
+ prop_List xs
+ = (sort (nub xs) == toList (fromList xs))
+--}
+\ No newline at end of file
++-}
+--- helium-1.7~pre20090428.orig/lvm/src/lib/common/PPrint.hs
++++ helium-1.7~pre20090428/lvm/src/lib/common/PPrint.hs
+@@ -57,7 +57,7 @@ module PPrint
+ , displayS, displayIO
+ ) where
+
+-import IO (Handle,hPutStr,hPutChar,stdout)
++import System.IO (Handle,hPutStr,hPutChar,stdout)
+
+ infixr 5 </>,<//>,<$>,<$$>
+ infixr 6 <>,<+>
+--- helium-1.7~pre20090428.orig/lvm/src/lib/common/ghc/Special.hs
++++ helium-1.7~pre20090428/lvm/src/lib/common/ghc/Special.hs
+@@ -21,8 +21,8 @@ module Special( doesFileExist
+ , unsafeCoerce, unsafePerformIO
+ ) where
+
+-import Directory ( doesFileExist )
+-import IO ( Handle, hGetContents, hClose, hPutChar, IOMode(..) )
++import System.Directory ( doesFileExist )
++import System.IO ( Handle, hGetContents, hClose, hPutChar, IOMode(..) )
+ import System.IO ( openBinaryFile )
+ import System.IO.Unsafe ( unsafePerformIO )
+ import GHC.Base ( unsafeCoerce# )
+--- helium-1.7~pre20090428.orig/lvm/src/lib/parsec/ParsecError.hs
++++ helium-1.7~pre20090428/lvm/src/lib/parsec/ParsecError.hs
+@@ -20,7 +20,7 @@ module ParsecError( Message(SysUnExpect,
+ where
+
+
+-import List (nub,sortBy)
++import Data.List (nub,sortBy)
+ import ParsecPos
+
+ -----------------------------------------------------------
+--- helium-1.7~pre20090428.orig/lvm/src/lib/parsec/ParsecPrim.hs
++++ helium-1.7~pre20090428/lvm/src/lib/parsec/ParsecPrim.hs
+@@ -35,7 +35,7 @@ module ParsecPrim( -- operators: label a
+
+ import ParsecPos
+ import ParsecError
+-import Monad
++import Control.Monad
+
+ {-# INLINE parsecMap #-}
+ {-# INLINE parsecReturn #-}
+--- helium-1.7~pre20090428.orig/lvm/src/lib/parsec/ParsecChar.hs
++++ helium-1.7~pre20090428/lvm/src/lib/parsec/ParsecChar.hs
+@@ -17,7 +17,7 @@ module ParsecChar ( CharParser
+ , satisfy
+ ) where
+
+-import Char
++import Data.Char
+ import ParsecPos( updatePosChar, updatePosString )
+ import ParsecPrim
+
+--- helium-1.7~pre20090428.orig/lvm/src/lib/parsec/ParsecCombinator.hs
++++ helium-1.7~pre20090428/lvm/src/lib/parsec/ParsecCombinator.hs
+@@ -24,7 +24,7 @@ module ParsecCombinator ( choice
+ , manyTill, lookAhead, anyToken
+ ) where
+
+-import Monad
++import Control.Monad
+ import ParsecPrim
+
+
+--- helium-1.7~pre20090428.orig/lvm/src/lib/core/Main.hs
++++ helium-1.7~pre20090428/lvm/src/lib/core/Main.hs
+@@ -11,7 +11,7 @@
+
+ module Main where
+
+-import System ( getArgs )
++import System.Environment ( getArgs )
+ import PPrint ( putDoc )
+
+ import Standard ( getLvmPath, searchPath, searchPathMaybe )
+--- helium-1.7~pre20090428.orig/lvm/src/lib/core/CoreSaturate.hs
++++ helium-1.7~pre20090428/lvm/src/lib/core/CoreSaturate.hs
+@@ -15,7 +15,7 @@
+ ----------------------------------------------------------------
+ module CoreSaturate( coreSaturate ) where
+
+-import List ( mapAccumR )
++import Data.List ( mapAccumR )
+ import Id ( NameSupply, freshId, splitNameSupply, splitNameSupplies )
+ import IdMap ( IdMap, lookupMap, mapFromList )
+ import Core
+--- helium-1.7~pre20090428.orig/lvm/src/lib/core/CoreLexer.hs
++++ helium-1.7~pre20090428/lvm/src/lib/core/CoreLexer.hs
+@@ -14,7 +14,7 @@ module CoreLexer( Token, Lexeme(..), Pos
+ , layout, addLayout
+ ) where
+
+-import Char
++import Data.Char hiding (isSymbol, isLetter)
+ import Standard( foldlStrict )
+
+ -----------------------------------------------------------
+--- helium-1.7~pre20090428.orig/lvm/src/lib/core/CoreLex.hs
++++ helium-1.7~pre20090428/lvm/src/lib/core/CoreLex.hs
+@@ -15,7 +15,7 @@ module CoreLex( topLevel
+ , integerOrFloat, integer, stringLiteral
+ ) where
+
+-import Char ( digitToInt, isAlphaNum, isLower, isUpper )
++import Data.Char ( digitToInt, isAlphaNum, isLower, isUpper )
+ import Set ( Set, fromList, member )
+ import Id ( Id, idFromString )
+
+--- helium-1.7~pre20090428.orig/helium/test/testinstallation/Simple.hs
++++ helium-1.7~pre20090428/helium/test/testinstallation/Simple.hs
+@@ -2,8 +2,8 @@ module Simple where
+
+ -- No need to import Prelude
+
+-import Char
+-import List
++import Data.Char
++import Data.List
+ import Base
+
+ type Strand = String
+--- helium-1.7~pre20090428.orig/helium/test/testinstallation/Overloaded.hs
++++ helium-1.7~pre20090428/helium/test/testinstallation/Overloaded.hs
+@@ -2,8 +2,8 @@ module Overloaded where
+
+ -- No need to import Prelude
+
+-import Char
+-import List
++import Data.Char
++import Data.List
+ import Base
+
+ type Strand = String
+--- helium-1.7~pre20090428.orig/helium/test/simple/typeerrors/Examples/HighlyTrustedReported.hs
++++ helium-1.7~pre20090428/helium/test/simple/typeerrors/Examples/HighlyTrustedReported.hs
+@@ -1,4 +1,4 @@
+-import List
++import Data.List
+
+ f lijst table
+ | elemBy eqString (head(head(transpose table))) lijst =
+--- helium-1.7~pre20090428.orig/helium/test/simple/benchmarks/Main.hs
++++ helium-1.7~pre20090428/helium/test/simple/benchmarks/Main.hs
+@@ -5,7 +5,7 @@
+ -- ==========================================================--
+
+ module Main where
+--- import Char -- 1.3
++-- import Data.Char -- 1.3
+ ----------------------------------------------------------
+ -- Lexemes --
+ ----------------------------------------------------------
+--- helium-1.7~pre20090428.orig/helium/test/typeerrors/Heuristics/OrdChr.hs
++++ helium-1.7~pre20090428/helium/test/typeerrors/Heuristics/OrdChr.hs
+@@ -1,3 +1,3 @@
+-import Char
++import Data.Char
+
+ main = (ord 65, chr 'a')
+--- helium-1.7~pre20090428.orig/helium/test/benchmarks/Main.hs
++++ helium-1.7~pre20090428/helium/test/benchmarks/Main.hs
+@@ -5,7 +5,7 @@
+ -- ==========================================================--
+
+ module Main where
+--- import Char -- 1.3
++-- import Data.Char -- 1.3
+ ----------------------------------------------------------
+ -- Lexemes --
+ ----------------------------------------------------------
+--- helium-1.7~pre20090428.orig/helium/test/benchmarks/Parser.hs
++++ helium-1.7~pre20090428/helium/test/benchmarks/Parser.hs
+@@ -8,7 +8,7 @@
+ -- ==========================================================--
+
+ module Parser where
+-import Char -- 1.3
++import Data.Char -- 1.3
+ ----------------------------------------------------------
+ -- Lexemes --
+ ----------------------------------------------------------
+--- helium-1.7~pre20090428.orig/helium/lib/Prelude.hs
++++ helium-1.7~pre20090428/helium/lib/Prelude.hs
+@@ -278,7 +278,7 @@ unzip3 = foldr (\(a,b,c) (as,bs,cs) -> (
+ -- List
+ -----------------------------------------------}
+
+--- We can't import Char here because that would mean we couldn't import
++-- We can't import Data.Char here because that would mean we couldn't import
+ -- it elsewhere. Therefore, we make local copies of the two functions
+ -- from that module
+ localIsSpace :: Char -> Bool
+--- helium-1.7~pre20090428.orig/helium/lib/simple/Prelude.hs
++++ helium-1.7~pre20090428/helium/lib/simple/Prelude.hs
+@@ -238,7 +238,7 @@ unzip3 = foldr (\(a,b,c) (as,bs,cs) -> (
+ -- List
+ -----------------------------------------------}
+
+- -- We can't import Char here because that would mean we couldn't import
++ -- We can't import Data.Char here because that would mean we couldn't import
+ -- it elsewhere. Therefore, we make local copies of the two functions
+ -- from that module
+ localIsSpace :: Char -> Bool
+--- helium-1.7~pre20090428.orig/helium/src/utils/Utils.hs
++++ helium-1.7~pre20090428/helium/src/utils/Utils.hs
+@@ -12,7 +12,7 @@ module Utils where
+
+ import Data.IORef
+ import GHC.IOBase (unsafePerformIO)
+-import List (group, groupBy, sort, elemIndex)
++import Data.List (group, groupBy, sort, elemIndex)
+ import Logger
+
+ -------------------------------------------------------
+--- helium-1.7~pre20090428.orig/helium/src/utils/Similarity.hs
++++ helium-1.7~pre20090428/helium/src/utils/Similarity.hs
+@@ -14,7 +14,7 @@
+
+ module Similarity(similar) where
+
+-import Char
++import Data.Char
+ import Utils(internalError)
+
+ similar :: String -> String -> Bool
+--- helium-1.7~pre20090428.orig/helium/src/utils/Logger.hs
++++ helium-1.7~pre20090428/helium/src/utils/Logger.hs
+@@ -10,12 +10,12 @@ module Logger ( logger, logInternalError
+
+ import Network
+ import Control.Concurrent
+-import Monad
+-import System
+-import Char
+-import List
++import Control.Monad
++import System.IO
++import System.Environment
++import Data.Char
++import Data.List
+ import Args
+-import IO
+ import Version
+
+ {-# NOTINLINE logger #-}
+--- helium-1.7~pre20090428.orig/helium/src/utils/OneLiner.hs
++++ helium-1.7~pre20090428/helium/src/utils/OneLiner.hs
+@@ -8,7 +8,7 @@
+
+ module OneLiner(OneLineTree(..), showOneLine) where
+
+-import List
++import Data.List
+
+ data OneLineTree
+ = OneLineNode [OneLineTree]
+--- helium-1.7~pre20090428.orig/helium/src/parser/Lexer.hs
++++ helium-1.7~pre20090428/helium/src/parser/Lexer.hs
+@@ -19,9 +19,9 @@ import LexerToken
+ import Text.ParserCombinators.Parsec.Pos
+ import Utils(internalError)
+
+-import Monad(when)
+-import Char(ord)
+-import List(isPrefixOf)
++import Control.Monad(when)
++import Data.Char(ord)
++import Data.List(isPrefixOf)
+
+ lexer :: String -> [Char] -> Either LexerError ([Token], [LexerWarning])
+ lexer fileName input = runLexerMonad fileName (mainLexer input)
+--- helium-1.7~pre20090428.orig/helium/src/parser/ResolveOperators.ag
++++ helium-1.7~pre20090428/helium/src/parser/ResolveOperators.ag
+@@ -3,7 +3,7 @@ import UHA_Utils
+ import UHA_Syntax
+ import UHA_Range
+ import OperatorTable
+-import Char
++import Data.Char
+ import Utils
+ import Messages
+ import qualified Data.Map as M
+--- helium-1.7~pre20090428.orig/helium/src/staticanalysis/messages/KindErrors.hs
++++ helium-1.7~pre20090428/helium/src/staticanalysis/messages/KindErrors.hs
+@@ -14,7 +14,7 @@ import Top.Types
+ import UHA_Syntax (Range, Type)
+ import PPrint (Doc)
+ import Messages
+-import List (union)
++import Data.List (union)
+ import qualified UHA_Pretty as PP
+ import qualified PPrint
+
+--- helium-1.7~pre20090428.orig/helium/src/staticanalysis/messages/HeliumMessages.hs
++++ helium-1.7~pre20090428/helium/src/staticanalysis/messages/HeliumMessages.hs
+@@ -15,10 +15,10 @@ import Messages
+ import Top.Types
+ import qualified PPrint
+ import qualified OneLiner
+-import List (intersperse, zipWith4)
++import Data.List (intersperse, zipWith4)
+ import TypesToAlignedDocs (qualifiedTypesToAlignedDocs)
+ import UHA_Range (isImportRange, showRanges)
+-import Char (isSpace)
++import Data.Char (isSpace)
+
+ ----------------------------------------------------------
+ -- message parameters
+--- helium-1.7~pre20090428.orig/helium/src/staticanalysis/messages/TypeErrors.hs
++++ helium-1.7~pre20090428/helium/src/staticanalysis/messages/TypeErrors.hs
+@@ -12,7 +12,7 @@ module TypeErrors where
+
+ import Messages
+ import Top.Types
+-import List (union, partition)
++import Data.List (union, partition)
+ import UHA_Syntax (Range, Name)
+ import UHA_Range (getNameRange)
+ import UHA_Source
+@@ -124,4 +124,4 @@ makeRestrictedButOverloadedError name sc
+ , "inferred type" >:> MessageType scheme
+ ]
+ hint = "Only functions and simple patterns can have an overloaded type"
+- in TypeError [getNameRange name] [message] table [("hint", MessageString hint)]
+\ No newline at end of file
++ in TypeError [getNameRange name] [message] table [("hint", MessageString hint)]
+--- helium-1.7~pre20090428.orig/helium/src/staticanalysis/messages/StaticErrors.hs
++++ helium-1.7~pre20090428/helium/src/staticanalysis/messages/StaticErrors.hs
+@@ -13,8 +13,8 @@ module StaticErrors where
+ import UHA_Syntax
+ import UHA_Range
+ import Messages
+-import List (nub, intersperse, sort, partition)
+-import Maybe (fromJust)
++import Data.List (nub, intersperse, sort, partition)
++import Data.Maybe (fromJust)
+ import Utils (commaList, internalError, maxInt)
+ import Top.Types
+
+--- helium-1.7~pre20090428.orig/helium/src/staticanalysis/messages/Messages.hs
++++ helium-1.7~pre20090428/helium/src/staticanalysis/messages/Messages.hs
+@@ -19,8 +19,8 @@ import Top.Types
+ import OneLiner
+ import Similarity (similar)
+ import Utils (internalError)
+-import List (sortBy, partition)
+-import Char (toUpper)
++import Data.List (sortBy, partition)
++import Data.Char (toUpper)
+
+ type Message = [MessageLine]
+
+--- helium-1.7~pre20090428.orig/helium/src/staticanalysis/inferencers/SelectConstraintSolver.hs
++++ helium-1.7~pre20090428/helium/src/staticanalysis/inferencers/SelectConstraintSolver.hs
+@@ -139,4 +139,4 @@ warnForTooSpecificSignatures solver clas
+ splitExplicit _ = Nothing
+
+ instance Show Warning where show _ = "<warning>"
+-instance IsState Warnings -}
+\ No newline at end of file
++instance IsState Warnings -}
+--- helium-1.7~pre20090428.orig/helium/src[...incomplete...]
More information about the Pkg-haskell-commits
mailing list