Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Glasgow Haskell Compiler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
873dc895
Commit
873dc895
authored
Sep 12, 2007
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
foldl1' was added to Data.List in GHC 6.4.x
parent
ed3d36bc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
compiler/nativeGen/RegSpillClean.hs
compiler/nativeGen/RegSpillClean.hs
+2
-1
compiler/utils/Util.lhs
compiler/utils/Util.lhs
+15
-5
No files found.
compiler/nativeGen/RegSpillClean.hs
View file @
873dc895
...
...
@@ -39,9 +39,10 @@ import UniqFM
import
Unique
import
State
import
Outputable
import
Util
import
Data.Maybe
import
Data.List
import
Data.List
(
nub
)
-- | Clean out unneeded spill/reloads from this top level thing.
cleanSpills
::
LiveCmmTop
->
LiveCmmTop
...
...
compiler/utils/Util.lhs
View file @
873dc895
...
...
@@ -20,6 +20,7 @@ module Util (
mapFst, mapSnd,
mapAndUnzip, mapAndUnzip3,
nOfThem, filterOut, partitionWith, splitEithers,
foldl1',
lengthExceeds, lengthIs, lengthAtLeast,
listLengthCmp, atLength, equalLength, compareLength,
...
...
@@ -88,8 +89,8 @@ module Util (
import FastTypes
#if
def DEBUG
import Panic
( panic, trace )
#if
defined(DEBUG) || __GLASGOW_HASKELL__ < 604
import Panic
#endif
import Control.Exception ( Exception(..), finally, catchDyn, throw )
...
...
@@ -98,11 +99,10 @@ import Data.Dynamic ( Typeable )
import Data.IORef ( IORef, newIORef )
import System.IO.Unsafe ( unsafePerformIO )
import Data.IORef ( readIORef, writeIORef )
import Data.List hiding (group)
import qualified Data.List as List ( elem )
#ifndef DEBUG
import Data.List ( zipWith4 )
#else
#ifdef DEBUG
import qualified Data.List as List ( notElem )
#endif
...
...
@@ -363,6 +363,16 @@ isn'tIn msg x ys
# endif /* DEBUG */
\end{code}
foldl1' was added in GHC 6.4
\begin{code}
#if __GLASGOW_HASKELL__ < 604
foldl1' :: (a -> a -> a) -> [a] -> a
foldl1' f (x:xs) = foldl' f x xs
foldl1' _ [] = panic "foldl1'"
#endif
\end{code}
%************************************************************************
%* *
\subsubsection[Utils-Carsten-mergesort]{A mergesort from Carsten}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment