A couple patches
Duncan Coutts
duncan.coutts at worc.ox.ac.uk
Fri Feb 8 07:20:56 EST 2008
A couple patches, one straightforward and one potentially controversial.
The NCG patch just tidies a few things up so that the next person to try
building the Sparc NCG will trip over the bits that need fixing straight
away rather than wandering around compile errors and runtime failures.
The unsafePerformIO patch is something Neil asked me to send in. It's a
cleaned up, slightly renamed and documented version of inlinePerformIO
that we use in ByteString, but exported from System.IO.Unsafe.
Similarly, the unsafeDupablePerformIO are also exported (separate
patches). And implementations are given for non-GHC so it should all
still work. This is not a direct proposal, but rather a request for
comments. If people think it's not insane to give people this much rope
then we can send the patch through the libraries submission process.
I'm not particularly arguing for it, I just note that several people use
inlinePerformIO from ByteString's Internal module which is not so great.
If it's needed then it should go somewhere standard with appropriate
dire warnings.
Duncan
-------------- next part --------------
New patches:
[Make more arch-specific #if's exclusive with #else #error cases
Duncan Coutts <duncan at haskell.org>**20080207170020
So when the next person compiles the Sparc NCG it should fail more
obviously at compile time rather than panicing at runtime.
Plus one obvious fix for LocalReg gaining an extra param
Missing bits of Sparc NCG:
* genSwitch for generating jump tables. This is the most tricky one.
* ALLOCATABLE_REGS_INTEGER and ALLOCATABLE_REGS_DOUBLE just requires
finding and verifying the values. The nearby comment describes how.
* isRegRegMove and mkRegRegMoveInstr. Sparc uses Or for int move, check
what this is supposed to do for single and double float types.
* regDotColor. Probably just copy the ppc impl.
] {
hunk ./compiler/nativeGen/MachCodeGen.hs 308
-assignReg_I64Code (CmmLocal (LocalReg u_dst pk)) valueTree = do
+assignReg_I64Code (CmmLocal (LocalReg u_dst pk _)) valueTree = do
hunk ./compiler/nativeGen/MachCodeGen.hs 338
-iselExpr64 (CmmReg (CmmLocal (LocalReg uq I64))) = do
+iselExpr64 (CmmReg (CmmLocal (LocalReg uq I64 _))) = do
hunk ./compiler/nativeGen/MachCodeGen.hs 3997
-genSwitch expr ids = panic "ToDo: genSwitch"
+#error "ToDo: genSwitch"
hunk ./compiler/nativeGen/MachRegs.lhs 507
-#endif
hunk ./compiler/nativeGen/MachRegs.lhs 508
-#if x86_64_TARGET_ARCH
+#elif x86_64_TARGET_ARCH
hunk ./compiler/nativeGen/MachRegs.lhs 511
-#endif
hunk ./compiler/nativeGen/MachRegs.lhs 512
-#if powerpc_TARGET_ARCH
+#elif powerpc_TARGET_ARCH
hunk ./compiler/nativeGen/MachRegs.lhs 515
+
+#else
+#error ToDo: define ALLOCATABLE_REGS_INTEGER and ALLOCATABLE_REGS_DOUBLE
hunk ./compiler/nativeGen/RegAllocInfo.hs 777
-#warning ToDo: isRegRegMove
+#error ToDo: isRegRegMove
hunk ./compiler/nativeGen/RegAllocInfo.hs 880
+#else
+#error ToDo: mkRegRegMoveInstr
hunk ./compiler/nativeGen/RegAllocStats.hs 294
-#endif
hunk ./compiler/nativeGen/RegAllocStats.hs 297
-#if x86_64_TARGET_ARCH
+#elif x86_64_TARGET_ARCH
hunk ./compiler/nativeGen/RegAllocStats.hs 319
-#endif
hunk ./compiler/nativeGen/RegAllocStats.hs 322
-#if powerpc_TARGET_ARCH
+#elif powerpc_TARGET_ARCH
hunk ./compiler/nativeGen/RegAllocStats.hs 329
+
+#else
+#error ToDo: regDotColor
}
Context:
[FIX BUILD on x86_64
Simon Marlow <simonmar at microsoft.com>**20080206113936]
[matchesPkg: match against the pkg Id (foo-1.0) not just the package name (foo)
Simon Marlow <simonmar at microsoft.com>**20080205090429
Fixes the ghcpkg01 test.
]
[Teach cheapEqExpr about casts
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20080206035007
Previously, cheapEqExpr would always return False if it encountered a cast.
This was bad for two reasons. Firstly, CSE (which uses cheapEqExpr to compare
expressions) never eliminated expressions which contained casts and secondly,
it was inconsistent with exprIsBig. This patch fixes this.
]
[Inject implicit bindings before the simplifier (Trac #2070)
simonpj at microsoft.com**20080205165507
With constructor unpacking, it's possible for constructors and record
selectors to have non-trivial code, which should be optimised before
being fed to the code generator. Example:
data Foo = Foo { get :: {-# UNPACK #-} !Int }
Then we do not want to get this:
T2070.get =
\ (tpl_B1 :: T2070.Foo) ->
case tpl_B1 of tpl1_B2 { T2070.Foo rb_B4 ->
let {
ipv_B3 [Just S] :: GHC.Base.Int
[Str: DmdType m]
ipv_B3 = GHC.Base.I# rb_B4
} in ipv_B3 }
If this goes through to codegen, we'll generate bad code. Admittedly,
this only matters when the selector is used in a curried way (e.g
map get xs), but nevertheless it's silly.
This patch injects the implicit bindings in SimplCore, before the
simplifier runs. That slows the simplifier a little, because it has
to look at some extra bindings; but it's probably a slight effect.
If it turns out to matter I suppose we can always inject them later,
e.g. just before the final simplification.
An unexpected (to me) consequence is that we get some specialisation rules
for class-method selectors. E.g. we get a rule
RULE (==) Int dInt = eqInt
There's no harm in this, but not much benefit either, because the
same result will happen when we inline (==) and dInt, but it's perhaps
more direct.
]
[Make do-notation a bit more flexible (Trac #1537)
simonpj at microsoft.com**20080205164816
This is a second attempt to fix #1537: to make the static typechecking
of do-notation behave just like the desugared version of the same thing.
This should allow parameterised monads to work properly (see Oleg's comment
in the above ticket).
We can probably merge to 6.8.3 if it goes smoothly.
Incidentally, the resulting setup suffers from greater type ambiguity
if (>>=) has a very general type. So test rebindable6 no longer works
(at least not without more type signatures), and rebindable5 requires
extra functional dependencies. But they are weird tests.
]
[White space only
simonpj at microsoft.com**20080205163702]
[FIX #2047: Windows (and older Unixes): align info tables to 4 bytes, not 2
Simon Marlow <simonmar at microsoft.com>**20080205101425
Perhaps in the past '.align 2' meant align to 4 bytes, but nowadays it
means align to 2 bytes. The compacting collector requires info tables
to be aligned to 4 bytes, because it stores tag bits in the low 2
bits.
This only affects -fvia-C - the native code generator was already
emitting the correct alignment. The incorrect alignment might well
have been adversely affecting performance with -fvia-C on Windows.
]
[Most of installer for framework on system volume
Manuel M T Chakravarty <chak at cse.unsw.edu.au>**20080205073738]
[Split into two types of Mac installer specs
Manuel M T Chakravarty <chak at cse.unsw.edu.au>**20080205052504]
[Lambda logo for packages
Manuel M T Chakravarty <chak at cse.unsw.edu.au>**20080205052017
- This image is in the public domain, cf
http://en.wikipedia.org/wiki/Image:Greek_lc_lamda_thin.svg
]
[xcode build target for fixed /Library/Frameworks inst
Manuel M T Chakravarty <chak at cse.unsw.edu.au>**20080205030047
- Also moving all MacOS-specific Makefile components into
distrib/MacOS/Makefile
]
[First stab at an installer package for the Mac
Manuel M T Chakravarty <chak at cse.unsw.edu.au>**20080202134853
- GHC as a Mac framework
- I tried to make a package where the user could choose whether to install
in /Library/Frameworks or ~/Library/Frameworks (to allow installation for
non-admins). However, that doesn't work well without including the whole
distribution twice as the decision as to whether the admin password needs
to be entered is made at packaging time (not at install time).
]
[Support for using libffi to implement FFI calls in GHCi (#631)
Simon Marlow <simonmar at microsoft.com>**20080204161053
This means that an unregisterised build on a platform not directly
supported by GHC can now have full FFI support using libffi.
Also in this commit:
- use PrimRep rather than CgRep to describe FFI args in the byte
code generator. No functional changes, but PrimRep is more correct.
- change TyCon.sizeofPrimRep to primRepSizeW, which is more useful
]
[Use the correct libffi type for pointers
Simon Marlow <simonmar at microsoft.com>**20080104131936]
[Fix DEBUG build
simonpj at microsoft.com**20080204160514]
[Make seqAlts actually seq everything
Ian Lynagh <igloo at earth.li>**20080203134321]
[Strictness tweaks
Ian Lynagh <igloo at earth.li>**20080203024836]
[Whitespace
Ian Lynagh <igloo at earth.li>**20080203003929]
[Whitespace only
Ian Lynagh <igloo at earth.li>**20080202213936]
[Tweak strictness
Ian Lynagh <igloo at earth.li>**20080202213542]
[Fix warnings in deSugar/DsBinds
Ian Lynagh <igloo at earth.li>**20080130144014]
[UNDO: Be a little keener to inline
Simon Marlow <simonmar at microsoft.com>**20080201144810
This patch caused at least the following test failures:
1744(normal)
ghci028(ghci)
unicode001(normal)
and additionally made the stage3 build fail.
A little more validation please!
I didn't find the exact cause of the failure yet, but it appears that
the Lexer is miscompiled in some strange way. If any of {Encoding,
StringBuffer, or Lexer} are compiled without -O, the problem goes
away.
]
[FIX BUILD with GHC 6.4.x
Simon Marlow <simonmar at microsoft.com>**20080201122753]
[FIX BUILD with ghc-6.4.x
Simon Marlow <simonmar at microsoft.com>**20080201114302]
[Some tweaks to the building from source section
Simon Marlow <simonmar at microsoft.com>**20080129091132]
[Warning clean up
Manuel M T Chakravarty <chak at cse.unsw.edu.au>**20080131024845]
[Move spiltDmdTy within module (no change in code)
simonpj at microsoft.com**20080129011438]
[Fix typo where I forgot the new substitution
simonpj at microsoft.com**20080128213856]
[Add missing (error) case in isIrrefutablePat
simonpj at microsoft.com**20080128213429]
[Add missing (error) case in pprConDecl
simonpj at microsoft.com**20080128213409]
[Fix warnings on non-Windows
Ian Lynagh <igloo at earth.li>**20080130114640]
[Fixed warnings in main/ErrUtils
Twan van Laarhoven <twanvl at gmail.com>**20080127015419]
[Fixed warnings in main/HeaderInfo, except for incomplete pattern matches
Twan van Laarhoven <twanvl at gmail.com>**20080127014118]
[Fixed warnings in main/DynFlags
Twan van Laarhoven <twanvl at gmail.com>**20080127012443]
[Fixed warnings in hsSyn/HsSyn
Twan van Laarhoven <twanvl at gmail.com>**20080127004626]
[Fixed warnings in hsSyn/HsUtils
Twan van Laarhoven <twanvl at gmail.com>**20080127004506]
[Fixed warnings in hsSyn/HsTypes
Twan van Laarhoven <twanvl at gmail.com>**20080127004419]
[Fixed warnings in hsSyn/HsDoc
Twan van Laarhoven <twanvl at gmail.com>**20080127004359]
[Fixed warnings in hsSyn/HsLit
Twan van Laarhoven <twanvl at gmail.com>**20080127004330]
[Fixed warnings in hsSyn/HsImpExp, except for incomplete pattern matches
Twan van Laarhoven <twanvl at gmail.com>**20080127004254]
[Fixed warnings in hsSyn/HsPat, except for incomplete pattern matches
Twan van Laarhoven <twanvl at gmail.com>**20080127004209]
[Fixed warnings in hsSyn/HsBinds, except for incomplete pattern matches
Twan van Laarhoven <twanvl at gmail.com>**20080127004119]
[Fixed warnings in hsSyn/HsDecls, except for incomplete pattern matches
Twan van Laarhoven <twanvl at gmail.com>**20080127004046]
[Fixed warnings in simplCore/CSE
Twan van Laarhoven <twanvl at gmail.com>**20080126233918]
[Fixed warnings in profiling/CostCentre, except for incomplete pattern matches
Twan van Laarhoven <twanvl at gmail.com>**20080126232841]
[Fixed warnings in types/InstEnv
Twan van Laarhoven <twanvl at gmail.com>**20080126231732]
[Fixed warnings in types/FamInstEnv
Twan van Laarhoven <twanvl at gmail.com>**20080126231426]
[Fixed warnings in simplStg/SRT, except for incomplete pattern matches
Twan van Laarhoven <twanvl at gmail.com>**20080126230900]
[Fixed warnings in simplStg/StgStats, except for incomplete pattern matches
Twan van Laarhoven <twanvl at gmail.com>**20080126230830]
[Fixed warnings in simplStg/SimplStg
Twan van Laarhoven <twanvl at gmail.com>**20080126230805]
[Fixed warnings in vectorise/VectUtils
Twan van Laarhoven <twanvl at gmail.com>**20080126223033]
[Fixed warnings in types/Generics
Twan van Laarhoven <twanvl at gmail.com>**20080126222817]
[Fixed warnings in stgSyn/StgSyn
Twan van Laarhoven <twanvl at gmail.com>**20080126221010]
[Fixed warnings in types/TyCon
Twan van Laarhoven <twanvl at gmail.com>**20080126215800]
[Fixed warnings in types/Type, except for incomplete pattern matches
Twan van Laarhoven <twanvl at gmail.com>**20080126214126]
[Fixed warnings in types/TypeRep
Twan van Laarhoven <twanvl at gmail.com>**20080126211722]
[Fixed warnings in types/FunDeps
Twan van Laarhoven <twanvl at gmail.com>**20080126203050]
[Fixed warnings in basicTypes/OccName
Twan van Laarhoven <twanvl at gmail.com>**20080126202737]
[Fixed warnings in basicTypes/RdrName
Twan van Laarhoven <twanvl at gmail.com>**20080126202104]
[Fixed warnings in utils/Encoding
Twan van Laarhoven <twanvl at gmail.com>**20080126201235]
[Fixed warnings in utils/Digraph
Twan van Laarhoven <twanvl at gmail.com>**20080126200754]
[Fixed warnings in basicTypes/Demand
Twan van Laarhoven <twanvl at gmail.com>**20080126195929]
[Fixed warnings in basicTypes/Unique
Twan van Laarhoven <twanvl at gmail.com>**20080126195459]
[Fixed warnings in coreSyn/ExternalCore
Twan van Laarhoven <twanvl at gmail.com>**20080126194759]
[Fixed warnings in simplCore/OccurAnal
Twan van Laarhoven <twanvl at gmail.com>**20080126194426]
[Fixed warnings in basicTypes/BasicTypes
Twan van Laarhoven <twanvl at gmail.com>**20080126194255]
[Fixed warnings in basicTypes/Literal, except for incomplete pattern matches
Twan van Laarhoven <twanvl at gmail.com>**20080126193209]
[Fixed warnings in basicTypes/Id
Twan van Laarhoven <twanvl at gmail.com>**20080126192817]
[Fixed warnings in basicTypes/Var
Twan van Laarhoven <twanvl at gmail.com>**20080126191939]
[Fixed warnings in basicTypes/Name
Twan van Laarhoven <twanvl at gmail.com>**20080126191501]
[Fixed warnings in types/Coercion, except for incomplete pattern matches
Twan van Laarhoven <twanvl at gmail.com>**20080126190735]
[Fixed warnings in coreSyn/MkExternalCore, except for incomplete pattern matches
Twan van Laarhoven <twanvl at gmail.com>**20080126012807]
[Fixed warnings in coreSyn/PprExternalCore
Twan van Laarhoven <twanvl at gmail.com>**20080125162418]
[Fixed warnings in coreSyn/CoreUtils, except for incomplete pattern matches
Twan van Laarhoven <twanvl at gmail.com>**20080125161800]
[Fixed warnings in coreSyn/CoreUnfold
Twan van Laarhoven <twanvl at gmail.com>**20080125161308]
[Fixed warnings in coreSyn/CorePrep
Twan van Laarhoven <twanvl at gmail.com>**20080125161051]
[Fixed warnings in coreSyn/CoreSubst
Twan van Laarhoven <twanvl at gmail.com>**20080125161002]
[Fixed warnings in coreSyn/CoreLint
Twan van Laarhoven <twanvl at gmail.com>**20080125160809]
[Fixed warnings in coreSyn/CoreFVs, except for incomplete pattern matches
Twan van Laarhoven <twanvl at gmail.com>**20080125160716]
[Fixed warnings in types/Class
Twan van Laarhoven <twanvl at gmail.com>**20080125160438]
[Fix warnings in coreSyn/CoreTidy
Twan van Laarhoven <twanvl at gmail.com>**20080118165559]
[Fix warnings in coreSyn/CoreSyn
Twan van Laarhoven <twanvl at gmail.com>**20080118165506]
[Strictness tweaks
Ian Lynagh <igloo at earth.li>**20080125174347]
[Parser tweak
Ian Lynagh <igloo at earth.li>**20080125145847]
[A couple more parser tweaks
Ian Lynagh <igloo at earth.li>**20080125143421]
[Make comb[234] strict
Ian Lynagh <igloo at earth.li>**20080124183149]
[Strictness tweaks
Ian Lynagh <igloo at earth.li>**20080124183142]
[Tell happy to be strict
Ian Lynagh <igloo at earth.li>**20080124165214]
[Make the Parser Monad's return strict
Ian Lynagh <igloo at earth.li>**20080124155827]
[Get a bit of sharing
Ian Lynagh <igloo at earth.li>**20080124152000]
[Make sL strict in /both/ arguments to L
Ian Lynagh <igloo at earth.li>**20080124151223]
[A touch more strictness in the parser
Ian Lynagh <igloo at earth.li>**20080124150137]
[Add a bit of strictness to the parser
Ian Lynagh <igloo at earth.li>**20080124145311]
[Use nilFS
Ian Lynagh <igloo at earth.li>**20080123211917]
[Whitespace only
Ian Lynagh <igloo at earth.li>**20080123174153]
[Fix #2062: foldr1 problem in hpc tool
andy at galois.com**20080126210607]
[Fix do-notation so that it works with -DDEBUG
simonpj at microsoft.com**20080125163101]
[Be a little keener to inline
simonpj at microsoft.com**20080125104616
This is really a bug. A saturated call in an "interesting" context
should inline, but there was a strange "n_val_args > 0" condition, which
was stopping it. Reported by Roman.
]
[Fix the build
Ian Lynagh <igloo at earth.li>**20080124141800
Work around various problems caused by some of the monadification patches
not being applied.
]
[Replace ioToTcRn with liftIO
Twan van Laarhoven <twanvl at gmail.com>**20080117220553]
[Remove unused custom versions of monad combinators from IOEnv
Twan van Laarhoven <twanvl at gmail.com>**20080117215835]
[Remove unused custom versions of monad combinators from UniqSupply
Twan van Laarhoven <twanvl at gmail.com>**20080117215752]
[Replace remaining uses of ioToIOEnv by liftIO, remove ioToIOEnv
Twan van Laarhoven <twanvl at gmail.com>**20080117215233]
[Monadify iface/BuildTyCl: use return
Twan van Laarhoven <twanvl at gmail.com>**20080117215036]
[Monadify iface/TcIface: use do, return, applicative, standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117214938]
[Monadify iface/MkIface: use do, return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117214441]
[Monadify iface/LoadIface: use return and liftIO
Twan van Laarhoven <twanvl at gmail.com>**20080117214233]
[Monadify iface/IfaceEnv: use do, return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117214041]
[Monadify typecheck/TcRnMonad: use return, standard monad functions and liftIO
Twan van Laarhoven <twanvl at gmail.com>**20080117213850]
[Monadify typecheck/TcEnv: use do, return, applicative, standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117213636]
[Monadify typecheck/TcRnDriver: use return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117213352]
[Monadify typecheck/TcMatches: use return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117213307]
[Monadify typecheck/TcMType: use do, return, applicative, standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117213242]
[Monadify typecheck/TcInstDcls: use do, return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117213040]
[Monadify typecheck/TcHsType: use do, return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117212822]
[Monadify typecheck/TcSimplify: use do, return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117212200]
[Monadify typecheck/TcSplice: use do and return
Twan van Laarhoven <twanvl at gmail.com>**20080117211911]
[Monadify typecheck/TcTyClsDecls: use return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117211746]
[Monadify typecheck/TcDefaults: use return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117211558]
[Monadify typecheck/TcDeriv: use return
Twan van Laarhoven <twanvl at gmail.com>**20080117211507]
[Monadify typecheck/TcClassDcl: use do, return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117211439]
[Monadify typecheck/TcBinds: use do, return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117211035]
[Monadify typecheck/TcArrows: use do and return
Twan van Laarhoven <twanvl at gmail.com>**20080117210818]
[Monadify typecheck/Inst: use do, return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117210655]
[Monadify typecheck/TcUnify: use do, return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117210213
there may be some accidental tab->space conversion
]
[Monadify typecheck/TcTyFuns: use standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117205505]
[Monadify typecheck/TcPat: use return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117205423]
[Monadify typecheck/TcRules: use do, return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117205307]
[Monadify typecheck/TcForeign: use do, return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117204934]
[Monadify typecheck/TcExpr: use do, return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117204603]
[Monadify specialise/Specialise: use do, return, standard monad functions and MonadUnique
Twan van Laarhoven <twanvl at gmail.com>**20080117204330]
[Monadify specialise/SpecConstr: use do, return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117203842]
[Monadify stgSyn/StgLint
Twan van Laarhoven <twanvl at gmail.com>**20080117203042
- made LintM a newtype instead of a type synonym
- use do, return and standard monad functions
- use MaybeT where `thenMaybeL` was used
- removed custom versions of monad functions
]
[Monadify stgSyn/CoreToStg
Twan van Laarhoven <twanvl at gmail.com>**20080117202619
- made LneM a newtype instead of a type synonym
- use do, return and standard monad functions
- removed custom versions of monad functions
]
[Remove generic monad function from State, it was moved to MonadUtils
Twan van Laarhoven <twanvl at gmail.com>**20080117202144]
[Added MaybeT monad transformer to utils/Maybes
Twan van Laarhoven <twanvl at gmail.com>**20080117202051]
[Removed unused Maybe functions, use the standard Maybe monad instead
Twan van Laarhoven <twanvl at gmail.com>**20080117201953]
[MonadIO instance for IOEnv
Twan van Laarhoven <twanvl at gmail.com>**20080117201812]
[Monadify simplCore/SimplMonad: custom monad functions are no longer needed
Twan van Laarhoven <twanvl at gmail.com>**20080117200354]
[Monadify simplCore/SimplMonad: use MonadUnique instance instead of custom functions
Twan van Laarhoven <twanvl at gmail.com>**20080117200228]
[Monadify simplCore/SetLevels: use do, return, standard monad functions and MonadUnique
Twan van Laarhoven <twanvl at gmail.com>**20080117195958]
[Monadify simplCore/SimplUtils: use do, return, standard monad functions and MonadUnique
Twan van Laarhoven <twanvl at gmail.com>**20080117195625]
[Monadify simplCore/Simplify: use do and return
Twan van Laarhoven <twanvl at gmail.com>**20080117195408]
[Monadify simplCore/SimplEnv: use standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117195255]
[Monadify simplCore/SimplCore: use do, return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117195149]
[Monadify profiling/SCCfinal
Twan van Laarhoven <twanvl at gmail.com>**20080117194417
- change monad type synonym into a newtype
- use do, return and standard monad functions
]
[Monadify coreSyn/CorePrep: use do, return, applicative, standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117193154]
[Monadify rename/RnTypes: use do, return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117190823]
[Monadify rename/RnPat: use do, return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117190033]
[Monadify rename/RnNames: use return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117185837]
[seqMaybe is more commonly known as mplus
Twan van Laarhoven <twanvl at gmail.com>**20080117185330]
[Monadify rename/RnBinds: use do, return and standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117184354]
[Monadify stranal/StrictAnal: use the State monad instead of a custom thing
Twan van Laarhoven <twanvl at gmail.com>**20080117180449]
[Monadify stranal/WwLib: use do, return, applicative, standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117180022]
[Added MonadUnique class for monads that have a unique supply
Twan van Laarhoven <twanvl at gmail.com>**20080117175616]
[Monadify stranal/WorkWrap: use do, return, applicative, standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117175007]
[Added Applicative and Functor instances for State monad
Twan van Laarhoven <twanvl at gmail.com>**20080117174656]
[Monadify deSugar/DsMonad: use do, return, applicative, standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117174432]
[Monadify deSugar/Desugar: use do, return, applicative, standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117174130]
[Monadify deSugar/DsUtils: use do, return, applicative, standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117173856]
[Monadify deSugar/DsListComp: use do, return, applicative, standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117173205]
[Monadify deSugar/DsForeign: use do, return, applicative, standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117172843]
[Monadify deSugar/DsGRHSs: use do, return, applicative, standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117172228]
[Monadify deSugar/DsExpr: use do, return, applicative, standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117164055]
[Added Applicative instance for IOEnv
Twan van Laarhoven <twanvl at gmail.com>**20080117162644]
[Add 'util/MonadUtils.hs' with common monad (and applicative) combinators
Twan van Laarhoven <twanvl at gmail.com>**20080117161939]
[Monadify deSugar/MatchLit: use do, return, applicative, standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117173439]
[Monadify deSugar/Match: use do, return, applicative, standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117173336]
[Monadify deSugar/DsCCall: use do, return, applicative, standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117165334]
[Monadify deSugar/DsArrows: use do, return, applicative, standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117165114]
[Monadify deSugar/DsBinds: use do, return, applicative, standard monad functions
Twan van Laarhoven <twanvl at gmail.com>**20080117164746]
[Added MASSERT macro for assertions in do notation
Twan van Laarhoven <twanvl at gmail.com>**20080117163112]
[FIX BUILD wrong imports on non-Windows
Simon Marlow <simonmar at microsoft.com>**20080124092935]
[Show CmdLineError exceptions as "<command line>: ..."
Simon Marlow <simonmar at microsoft.com>**20080123163145
instead of something like "ghc-6.8.2: ...", which causes problems in
the test suite. In any case, "<command line>" seems a more
appropriate context for these errors, the only question is whether
we're using CmdLineError incorrectly anywhere.
]
[FIX #1750: in isBrokenPackage, don't loop if the deps are recursive
Simon Marlow <simonmar at microsoft.com>**20080123160703]
[FIX #1750: throw out mutually recursive groups of packages
Simon Marlow <simonmar at microsoft.com>**20080123160635]
[Windows now doesn't need different values for DQ in the build system
Ian Lynagh <igloo at earth.li>**20080123173933]
[Fix setting argv[0] in shell-utils.c on Windows
Ian Lynagh <igloo at earth.li>**20080123160139]
[Escape arguments for Windows in shell-tools.c
Ian Lynagh <igloo at earth.li>**20080123151724]
[Attach the INLINE Activation pragma to any automatically-generated specialisations
simonpj at microsoft.com**20080123134012
Another idea suggested by Roman, happily involving a one-line change. Here's
the new Note in Specialise:
Note [Auto-specialisation and RULES]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider:
g :: Num a => a -> a
g = ...
f :: (Int -> Int) -> Int
f w = ...
{-# RULE f g = 0 #-}
Suppose that auto-specialisation makes a specialised version of
g::Int->Int That version won't appear in the LHS of the RULE for f.
So if the specialisation rule fires too early, the rule for f may
never fire.
It might be possible to add new rules, to "complete" the rewrite system.
Thus when adding
RULE forall d. g Int d = g_spec
also add
RULE f g_spec = 0
But that's a bit complicated. For now we ask the programmer's help,
by *copying the INLINE activation pragma* to the auto-specialised rule.
So if g says {-# NOINLINE[2] g #-}, then the auto-spec rule will also
not be active until phase 2.
]
[Tidy up the treatment of SPECIALISE pragmas
simonpj at microsoft.com**20080122122613
Remove the now-redundant "const-dicts" field in SpecPrag
In dsBinds, abstract over constant dictionaries in the RULE.
This avoids the creation of a redundant, duplicate, rule later
in the Specialise pass, which was happening before.
There should be no effect on performance either way, just less
duplicated code, and the compiler gets a little simpler.
]
[Comments only
simonpj at microsoft.com**20080122122547]
[FIX #1838, #1987: change where GHCi searches for config files
Simon Marlow <simonmar at microsoft.com>**20080123143207
6.6 behaviour:
- ./.ghci
- $HOME/.ghci
6.8.[12] behaviour:
- ./.ghci
- Windows: c:/Documents and Settings/<user>/.ghci
- Unix: $HOME/.ghci
6.10 (and 6.8.3 when this is merged):
- ./.ghci
- Windows: c:/Documents and Settings/<user>/Application Data/ghc/ghci.conf
- Unix: $HOME/.ghc/ghci.conf
- $HOME/.ghci
We will need to document this in the 6.8.3 release notes because it
may affect Windows users who have adapted their setup to 6.8.[12].
]
[FIX #1767 :show documentation claimed too much
Simon Marlow <simonmar at microsoft.com>**20080122152943
Also put the :help docs back within 80 columns
]
[fix syntax-error output for :show
Simon Marlow <simonmar at microsoft.com>**20080122144923]
[This goes with the patch for #1839, #1463
Simon Marlow <simonmar at microsoft.com>**20080122161811]
[use pathSeparator instead of '/'
Simon Marlow <simonmar at microsoft.com>**20080122140957]
[cleanup only
Simon Marlow <simonmar at microsoft.com>**20080122132047]
[FIX #1839, #1463, by supporting ghc-pkg bulk queries with substring matching
claus.reinke at talk21.com**20080121161744
- #1839 asks for a ghc-pkg dump feature, #1463 for the ability
to query the same fields in several packages at once.
- this patch enables substring matching for packages in 'list',
'describe', and 'field', and for modules in find-module. it
also allows for comma-separated multiple fields in 'field'.
substring matching can optionally ignore cases to avoid the
rather unpredictable capitalisation of packages.
- the patch is not quite as full-featured as the one attached
to #1839, but avoids the additional dependency on regexps.
open ended substrings are indicated by '*' (only the three
forms prefix*, *suffix, *infix* are supported)
- on windows, the use of '*' for package/module name globbing
leads to conflicts with filename globbing: by default, windows
programs are self-globbing, and bash adds another level of
globbing on top of that. it seems impossible to escape '*'
from both levels of globbing, so we disable default globbing
for ghc-pkg and ghc-pkg-inplace. users of bash will still
have filename globbing available, users of cmd won't.
- if it is considered necessary to reenable filename globbing
for cmd users, it should be done selectively, only for
filename parameters. to this end, the patch includes a
glob.hs program which simply echoes its parameters after
filename globbing. see the commented out glob command in
Main.hs for usage or testing.
- this covers both tickets, and permits for the most common
query patterns (finding all packages contributing to the
System. hierarchy, finding all regex or string packages,
listing all package maintainers or haddock directories,
..), which not only i have wanted to have for a long time.
examples (the quotes are needed to escape shell-based
filename globbing and should be omitted in cmd.exe):
ghc-pkg list '*regex*' --ignore-case
ghc-pkg list '*string*' --ignore-case
ghc-pkg list '*gl*' --ignore-case
ghc-pkg find-module 'Data.*'
ghc-pkg find-module '*Monad*'
ghc-pkg field '*' name,maintainer
ghc-pkg field '*' haddock-html
ghc-pkg describe '*'
]
[Wibble to the OccurAnal fix for RULEs and loop-breakers
simonpj at microsoft.com**20080121165529]
[FIX #2049, another problem with the module context on :reload
Simon Marlow <simonmar at microsoft.com>**20080121145935
The previous attempt to fix this (#1873, #1360) left a problem that
occurred when the first :load of the program failed (#2049).
Now I've implemented a different strategy: between :loads, we remember
all the :module commands, and just replay them after a :reload. This
is in addition to remembering all the package modules added with
:module, which is orthogonal.
This approach is simpler than the previous one, and seems to do the
right thing in all the cases I could think of. Let's hope this is the
last bug in this series...
]
[Increase the bar for bootstrapping GHC to 6.4 (HEAD only)
Simon Marlow <simonmar at microsoft.com>**20080121111835
- remove $(ghc_ge_601), $(ghc_ge_602), $(ghc_ge_603)
- configure now checks the GHC version number
- there are probably various cleanups that we can now do in compat/
and compiler/, but I haven't done those yet.
]
[Do not worker/wrapper INLINE things, even if they are in a recursive group
simonpj at microsoft.com**20080121135909
This patch stops the worker/wrapper transform working on an INLINE thing,
even if it's in a recursive group. It might not be the loop breaker. Indeed
a recursive group might have no loop breaker, if the only recursion is
through rules.
Again, this change was provoked by one of Roman's NDP libraries.
Specifically the Rec { splitD, splitJoinD } group in
Data.Array.Parallel.Unlifted.Distributed.Arrays
Simon
]
[Make the loop-breaking algorithm a bit more liberal, where RULES are involved
simonpj at microsoft.com**20080121135654
This is another gloss on the now-quite-subtle and heavily-documented algorithm
for choosing loop breakers.
This fix, provoked by Roman's NDP library, makes sure that when we are choosing
a loop breaker we only take into account variables free on the *rhs* of a rule
not the *lhs*.
Most of the new lines are comments!
]
[Fix Trac #2055
simonpj at microsoft.com**20080121124244
Sorry, this was my fault, a consequence of the quasi-quoting patch.
I've added rn062 as a test.
]
[Fix exception message with ghc -e
Ian Lynagh <igloo at earth.li>**20080121104142
When running with ghc -e, exceptions should claim to be from the program
that we are running, not ghc.
]
[Fix warnings in main/CmdLineParser
Ian Lynagh <igloo at earth.li>**20080121103158]
[Normalise FilePaths before printing them
Ian Lynagh <igloo at earth.li>**20080120193002]
[Tweak runghc
Ian Lynagh <igloo at earth.li>**20080120184639]
[Fix catching exit exceptions in ghc -e
Ian Lynagh <igloo at earth.li>**20080120170236]
[Typo in phase-control documentation
simonpj at microsoft.com**20080121113620]
[Fix warnings in main/Main
Ian Lynagh <igloo at earth.li>**20080119235914]
[Support multiple -e flags
Ian Lynagh <igloo at earth.li>**20080119223036]
[Fix ghc -e :main (it was enqueuing the main function, but not running it)
Ian Lynagh <igloo at earth.li>**20080119220044]
[Fix whitespace
Ian Lynagh <igloo at earth.li>**20080119212830]
[Fix giving an error if we are given conflicting mode flags
Ian Lynagh <igloo at earth.li>**20080119212602]
[Add :run and tweak :main
Ian Lynagh <igloo at earth.li>**20080119164923
You can now give :main a Haskell [String] as an argument, e.g.
:main ["foo", "bar"]
and :run is a variant that takes the name of the function to run.
Also, :main now obeys the -main-is flag.
]
[Make MacFrameworks a subdirectory of distrib, since it isn't used in the normal building process.
judah.jacobson at gmail.com**20071217235735]
[Add scripts for building GMP.framework and GNUreadline.framework (OS X).
judah.jacobson at gmail.com**20071127072951]
[Use -framework-path flags during the cc phase. Fixes trac #1975.
judah.jacobson at gmail.com**20071212201245]
[FIX #1821 (Parser or lexer mess-up)
df at dfranke.us**20071210230649]
[Improve the error when :list can't find any code to show
Ian Lynagh <igloo at earth.li>**20080118225655]
[Fix imports when !DEBUG
Ian Lynagh <igloo at earth.li>**20080118180126]
[Tweak the splitter
Ian Lynagh <igloo at earth.li>**20080116195612
We were generating a label ".LnLC7", which the splitter was confusing
with a literal constant (LC). The end result was the assembler tripping
up on ".Ln.text".
]
[Wibble to SetLevels.abstractVars
simonpj at microsoft.com**20080118171754
I've gotten this wrong more than once. Hopefully this has it nailed.
The issue is that in float-out we must abstract over the correct
variables.
]
[Add quasi-quotation, courtesy of Geoffrey Mainland
simonpj at microsoft.com**20080118145503
This patch adds quasi-quotation, as described in
"Nice to be Quoted: Quasiquoting for Haskell"
(Geoffrey Mainland, Haskell Workshop 2007)
Implemented by Geoffrey and polished by Simon.
Overview
~~~~~~~~
The syntax for quasiquotation is very similar to the existing
Template haskell syntax:
[$q| stuff |]
where 'q' is the "quoter". This syntax differs from the paper, by using
a '$' rather than ':', to avoid clashing with parallel array comprehensions.
The "quoter" is a value of type Language.Haskell.TH.Quote.QuasiQuoter, which
contains two functions for quoting expressions and patterns, respectively.
quote = Language.Haskell.TH.Quote.QuasiQuoter quoteExp quotePat
quoteExp :: String -> Language.Haskell.TH.ExpQ
quotePat :: String -> Language.Haskell.TH.PatQ
TEXT is passed unmodified to the quoter. The context of the
quasiquotation statement determines which of the two quoters is
called: if the quasiquotation occurs in an expression context,
quoteExp is called, and if it occurs in a pattern context, quotePat
is called.
The result of running the quoter on its arguments is spliced into
the program using Template Haskell's existing mechanisms for
splicing in code. Note that although Template Haskell does not
support pattern brackets, with this patch binding occurrences of
variables in patterns are supported. Quoters must also obey the same
stage restrictions as Template Haskell; in particular, in this
example quote may not be defined in the module where it is used as a
quasiquoter, but must be imported from another module.
Points to notice
~~~~~~~~~~~~~~~~
* The whole thing is enabled with the flag -XQuasiQuotes
* There is an accompanying patch to the template-haskell library. This
involves one interface change:
currentModule :: Q String
is replaced by
location :: Q Loc
where Loc is a data type defined in TH.Syntax thus:
data Loc
= Loc { loc_filename :: String
, loc_package :: String
, loc_module :: String
, loc_start :: CharPos
, loc_end :: CharPos }
type CharPos = (Int, Int) -- Line and character position
So you get a lot more info from 'location' than from 'currentModule'.
The location you get is the location of the splice.
This works in Template Haskell too of course, and lets a TH program
generate much better error messages.
* There's also a new module in the template-haskell package called
Language.Haskell.TH.Quote, which contains support code for the
quasi-quoting feature.
* Quasi-quote splices are run *in the renamer* because they can build
*patterns* and hence the renamer needs to see the output of running the
splice. This involved a bit of rejigging in the renamer, especially
concerning the reporting of duplicate or shadowed names.
(In fact I found and removed a few calls to checkDupNames in RnSource
that are redundant, becuase top-level duplicate decls are handled in
RnNames.)
]
[lots of portability changes (#1405)
Isaac Dupree <id at isaac.cedarswampstudios.org>**20080117011312
re-recording to avoid new conflicts was too hard, so I just put it
all in one big patch :-( (besides, some of the changes depended on
each other.) Here are what the component patches were:
Fri Dec 28 11:02:55 EST 2007 Isaac Dupree <id at isaac.cedarswampstudios.org>
* document BreakArray better
Fri Dec 28 11:39:22 EST 2007 Isaac Dupree <id at isaac.cedarswampstudios.org>
* properly ifdef BreakArray for GHCI
Fri Jan 4 13:50:41 EST 2008 Isaac Dupree <id at isaac.cedarswampstudios.org>
* change ifs on __GLASGOW_HASKELL__ to account for... (#1405)
for it not being defined. I assume it being undefined implies
a compiler with relatively modern libraries but without most
unportable glasgow extensions.
Fri Jan 4 14:21:21 EST 2008 Isaac Dupree <id at isaac.cedarswampstudios.org>
* MyEither-->EitherString to allow Haskell98 instance
Fri Jan 4 16:13:29 EST 2008 Isaac Dupree <id at isaac.cedarswampstudios.org>
* re-portabilize Pretty, and corresponding changes
Fri Jan 4 17:19:55 EST 2008 Isaac Dupree <id at isaac.cedarswampstudios.org>
* Augment FastTypes to be much more complete
Fri Jan 4 20:14:19 EST 2008 Isaac Dupree <id at isaac.cedarswampstudios.org>
* use FastFunctions, cleanup FastString slightly
Fri Jan 4 21:00:22 EST 2008 Isaac Dupree <id at isaac.cedarswampstudios.org>
* Massive de-"#", mostly Int# --> FastInt (#1405)
Fri Jan 4 21:02:49 EST 2008 Isaac Dupree <id at isaac.cedarswampstudios.org>
* miscellaneous unnecessary-extension-removal
Sat Jan 5 19:30:13 EST 2008 Isaac Dupree <id at isaac.cedarswampstudios.org>
* add FastFunctions
]
[Add missing extendSubst
simonpj at microsoft.com**20080117180227
Oops -- missed this from previous commit; sorry
]
[Add -fspec-inline-join-points to SpecConstr
simonpj at microsoft.com**20080117150325
This patch addresses a problem that Roman found in SpecConstr. Consider:
foo :: Maybe Int -> Maybe Int -> Int
foo a b = let j b = foo a b
in
case b of
Nothing -> ...
Just n -> case a of
Just m -> ... j (Just (n+1)) ...
Nothing -> ... j (Just (n-1)) ...
We want to make specialised versions for 'foo' for the patterns
Nothing (Just v)
(Just a) (Just b)
Two problems, caused by the join point j. First, j does not
scrutinise b, so j won't be specialised f for the (Just v) pattern.
Second, j is defined where the free var 'a' is not evaluated.
Both are solved by brutally inlining j at its call sites. This risks
major code bloat, but it's relatively quick to implement. The flag
-fspec-inline-join-points
causes brutal inlining for a
non-recursive binding
of a function
whose RHS contains calls
of a recursive function
The (experimental) flag is static for now, and I have not even
documented it properly.
]
[Fix references to Filepath
Clemens Fruhwirth <clemens at endorphin.org>**20080117134139]
[Fix egregious error in earlier "Record evaluated-ness" patch
simonpj at microsoft.com**20080117134057]
[Eliminate warnings with -DDEBUG
simonpj at microsoft.com**20080117124921]
[Record evaluated-ness information correctly for strict constructors
simonpj at microsoft.com**20080117105256
The add_evals code in Simplify.simplAlt had bit-rotted. Example:
data T a = T !a
data U a = U !a
foo :: T a -> U a
foo (T x) = U x
Here we should not evaluate x before building the U result, because
the x argument of T is already evaluated.
Thanks to Roman for finding this.
]
[In float-out, make sure we abstract over the type variables in the kind of a coercion
simonpj at microsoft.com**20080116153908
I can't remember where this bug showed up, but we were abstracting over a
coercion variable (co :: a ~ T), without also abstracting over 'a'.
The fix is simple.
]
[Fix broken debug warning
simonpj at microsoft.com**20080116151818]
[Complain sensibly if you try to use scoped type variables in Template Haskell
simonpj at microsoft.com**20080116151612
This fixes Trac #2024; worth merging onto 6.8 branch.
]
[Comments only
simonpj at microsoft.com**20080116150554]
[Extra instance for Outputable on 5-tuples
simonpj at microsoft.com**20080116150525]
[Fix the -frule-check pass
simonpj at microsoft.com**20080116141156
Rules for imported things are now kept in the global rule base, not
attached to the global Id. The rule-check pass hadn't kept up.
This should fix it.
]
[Add dyn-wrapper.c used as cross-plattform launch wrapper for executables using dynamic libraries in non-standard places
Clemens Fruhwirth <clemens at endorphin.org>**20080116220603]
[Use runPhase_MoveBinary also for generating a dynamic library wrapper
Clemens Fruhwirth <clemens at endorphin.org>**20080116220420]
[Remove -fhardwire-lib-paths in favour of -dynload sysdep
Clemens Fruhwirth <clemens at endorphin.org>**20080110121736]
[ghc-inplace defaults to -fhardwire-lib-paths. Change that to -dynload wrapped
Clemens Fruhwirth <clemens at endorphin.org>**20080110090839]
[Add -dynload flag as dynamic flag.
Clemens Fruhwirth <clemens at endorphin.org>**20080116205710]
[Add a missing import
Ian Lynagh <igloo at earth.li>**20080116174149]
[Fix Makefile generatin on Windows
Ian Lynagh <igloo at earth.li>**20080116162752]
[Fix slash direction on Windows with the new filePath code
Ian Lynagh <igloo at earth.li>**20080116154317]
[Fix typo
Ian Lynagh <igloo at earth.li>**20080116011953]
[The Core type-matcher should look through PredTypes
simonpj at microsoft.com**20080116145939
The core type-matcher Unify.match was previouly using tcView to expand
types, because it must treat newtypes as distinct from their representation.
But that meant that it also treated the PredType {C Int} as distinct from
its representation type (:TC Int). And that in turn was causing a rule
not to fire, because the argument types didn't match up.
For this to happen we need to get a situation where we have
a = :DC blah blah -- Dictionary
....(f a).....
Now a has type (:TC Int), bu the RULE for f expects an argument
of type {C Int}. Roman found that just this was happening.
]
[A bottoming function should have infinite arity
simonpj at microsoft.com**20080116145722
I can't think how this one escaped for so long, but
(error "foo")
should have arityType ABot, just as 'error' itself does.
This improves eta expansion. I spotted it when looking at the function
Data.Array.Parallel.Arr.BBArr.writeMBB
in the ndp package.
]
[Add Main.dyn_o deployed into the RTS library dir to linking (see DLLNOTES for rational)
Clemens Fruhwirth <clemens at endorphin.org>**20080110091217]
[Refactor cross-plattform process spawning from ghc-inplace into shell-tools.c
Clemens Fruhwirth <clemens at endorphin.org>**20080110090721]
[More verbose error reporting in mk/target.mk
Clemens Fruhwirth <clemens at endorphin.org>**20071231170715]
[Fix generating dependencies for different ways now we use FilePath
Ian Lynagh <igloo at earth.li>**20080115204716
We were making filenames like
dist/build/GHC/Base.p_.o
rather than
dist/build/GHC/Base.p_o
]
[Fix utils/Util for debug build
mainland at eecs.harvard.edu**20080114190530]
[Give an error if view pattern syntax is used in an expression; fixes #2033
Ian Lynagh <igloo at earth.li>**20080114115031]
[FIX BUILD (Solaris): include fcntl.h for file operations
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20080115051844]
[Fix warning when USE_READLINE is unset
Manuel M T Chakravarty <chak at cse.unsw.edu.au>**20080115015014]
[Remove an extra ) that was breaking the build on Windows
Ian Lynagh <igloo at earth.li>**20080114103953]
[Fix warnings in utils/ListSetOps
Ian Lynagh <igloo at earth.li>**20080113150017]
[Fix warnings in utils/Panic
Ian Lynagh <igloo at earth.li>**20080113142939]
[Fix warnings in utils/UniqSet
Ian Lynagh <igloo at earth.li>**20080113142604]
[Fix warnings in utils/Maybes
Ian Lynagh <igloo at earth.li>**20080113142347]
[Fix warnings in utils/BufWrite
Ian Lynagh <igloo at earth.li>**20080113141630]
[Fix warnings in utils/FastTypes
Ian Lynagh <igloo at earth.li>**20080113141612
Split off a FastBool module, to avoid a circular import with Panic
]
[Fix warnings in utils/OrdList
Ian Lynagh <igloo at earth.li>**20080113132042]
[Fix warnings in utils/FastMutInt
Ian Lynagh <igloo at earth.li>**20080113131830]
[Fix warnings in utils/State
Ian Lynagh <igloo at earth.li>**20080113131658]
[Only initialise readline if we are connected to a terminal
Ian Lynagh <igloo at earth.li>**20080113124107
Patch from Bertram Felgenhauer <int-e at gmx.de>
]
[Fix warnings in utils/Util
Ian Lynagh <igloo at earth.li>**20080113005832]
[Fix warnings in utils/Bag.lhs
Ian Lynagh <igloo at earth.li>**20080113002037]
[Add GMP_INCLUDE_DIRS in a couple of places
Ian Lynagh <igloo at earth.li>**20080112234215
Fixes the build on OpenBSD (trac #2009). Based on a patch from kili.
]
[Tweak whitespace in HsExpr
Ian Lynagh <igloo at earth.li>**20080112185753]
[Fix warnings in HsExpr
Ian Lynagh <igloo at earth.li>**20080112181444]
[FilePath fixes
Ian Lynagh <igloo at earth.li>**20080112172837]
[don't initialize readline needlessly
Ian Lynagh <igloo at earth.li>**20080112155413
Readline.initialize spills some escape sequences to stdout for some terminal
types, potentially spoiling ghc -e output. So don't initialize readline
unless we're working interactively on a terminal.
Patch from Bertram Felgenhauer <int-e at gmx.de>
]
[Fix whitespace
Ian Lynagh <igloo at earth.li>**20080112155214]
[Use System.FilePath
Ian Lynagh <igloo at earth.li>**20080112154459]
[Fix filename completion by adding trailing spaces/slashes manually.
judah.jacobson at gmail.com**20080110221928]
[Use command-dependent word break characters for tab completion in ghci. Fixes bug #998.
judah.jacobson at gmail.com**20080109003606]
[Fix 2030: make -XScopedTypeVariables imply -XRelaxedPolyRec
simonpj at microsoft.com**20080110113133
The type checker doesn't support lexically scoped type variables
unless we are using the RelaxedPolyRec option. Reasons: see
Note [Scoped tyvars] in TcBinds.
So I've changed DynFlags to add this implication, improved the
documentation, and simplified the code in TcBinds somewhat.
(It's longer but only because of comments!)
]
[More refactoring in getCoreToDo
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20080109023747]
[Document -fsimplifier-phases
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20080109022822]
[Add -fsimplifier-phases option
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20080109022449
It controls the number of simplifier phases run during optimisation. These are
numbered from n to 1 (by default, n=2). Phase 0 is always run regardless of
this flag. The flag is ignored with -O0 since (practically) no optimisation is
performed in that case.
]
[Refactor getCoreToDo slightly
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20080109014359]
[Fix Trac #2018: float-out was ignoring the kind of a coercion variable
simonpj at microsoft.com**20080107142601
The float-out transformation must handle the case where a coercion
variable is free, which in turn mentions type variables in its kind.
Just like a term variable really.
I did a bit of refactoring at the same time.
Test is tc241
MERGE to stable branch
]
[Make the treatment of equalities more uniform
simonpj at microsoft.com**20080107142306
This patch (which is part of the fix for Trac #2018) makes coercion variables
be handled more uniformly. Generally, they are treated like dictionaries
in the type checker, not like type variables, but in a couple of places we
were treating them like type variables. Also when zonking we should use
zonkDictBndr not zonkIdBndr.
]
[Fix Trac #2017
simonpj at microsoft.com**20080107125819]
[Add -XImpredicativeTypes, and tighten up type-validity checking (cf Trac 2019)
simonpj at microsoft.com**20080107115451
Somehow we didn't have a separate flag for impredicativity; now we do.
Furthermore, Trac #2019 showed up a missing test for monotypes in data
constructor return types. And I realised that we were even allowing
things like
Num (forall a. a) => ...
which we definitely should not.
This patch insists on monotypes in several places where we were (wrongly)
too liberal before.
Could be merged to 6.8 but no big deal.
]
[pass -no-user-package-conf to ghc-inplace
Simon Marlow <simonmar at microsoft.com>**20080104162840]
[Fix build: Recent instance shuffling left us with overlapping instances
Ian Lynagh <igloo at earth.li>**20080106221547]
[Add instructions for building docs to README
Ian Lynagh <igloo at earth.li>**20080106215723]
[A little refactoring of GenIfaceEq to make the Outputable instance into H98
simonpj at microsoft.com**20080104105450]
[Make the instance of DebugNodes more H98-like
simonpj at microsoft.com**20080104105409]
[change CmmActual, CmmFormal to use a data CmmHinted rather than tuple (#1405)
Isaac Dupree <id at isaac.cedarswampstudios.org>**20080104105339
This allows the instance of UserOfLocalRegs to be within Haskell98, and IMHO
makes the code a little cleaner generally.
This is one small (though tedious) step towards making GHC's code more
portable...
]
[generalize instance Outputable GenCmm to H98 (#1405)
Isaac Dupree <id at isaac.cedarswampstudios.org>**20071226175915]
[move and generalize another instance (#1405)
Isaac Dupree <id at isaac.cedarswampstudios.org>**20071226174904
was instance Outputable CmmGraph
type CmmGraph = LGraph Middle Last
now instance (ctx) => Outputable (LGraph m l),
in module with LGraph where it belongs
This also let us reduce the context of DebugNodes to Haskell98,
leaving that class's only extension being multi-parameter.
(also Outputable (LGraph M Last) with M = ExtendWithSpills Middle
was another redundant instance that was then removed)
]
[move and generalize an instance (#1405)
Isaac Dupree <id at isaac.cedarswampstudios.org>**20071226171913
UserOfLocalRegs (ZLast Last) isn't Haskell98, but it was just as
good an instance to be UserOfLocalRegs a => UserOfLocalRegs (ZLast a)
]
[Do not consult -XGADTs flag when pattern matching on GADTs
simonpj at microsoft.com**20080104125814
See Trac #2004, and Note [Flags and equational constraints] in TcPat.
]
[Add a note about primop wrappers (cf Trac #1509)
simonpj at microsoft.com**20080104125305]
[Document SOURCE pragma; clarify TH behavior for mutually-recurive modules (Trac #1012)
simonpj at microsoft.com**20080104121939]
[White space and comments only
simonpj at microsoft.com**20080104102236]
[Optionally use libffi to implement 'foreign import "wrapper"' (#793)
Simon Marlow <simonmar at microsoft.com>**20080103170236
To enable this, set UseLibFFI=YES in mk/build.mk.
The main advantage here is that this reduces the porting effort for
new platforms: libffi works on more architectures than our current
adjustor code, and it is probably more heavily tested. We could
potentially replace our existing code, but since it is probably faster
than libffi (just a guess, I'll measure later) and is already working,
it doesn't seem worthwhile.
Right now, you must have libffi installed on your system. I used the
one supplied by Debian/Ubuntu.
]
[remove trace apparently left in by accident
Simon Marlow <simonmar at microsoft.com>**20080103163805]
[Remove -funfolding-update-in-place flag documentation
simonpj at microsoft.com**20080103160036
This flag does nothing, and should have been removed ages ago. (GHC
no longer does update-in-place.)
MERGE to 6.8 branch
]
[Fix warnings with newer gcc versions (I hope)
Simon Marlow <simonmar at microsoft.com>**20080103140338]
[FIX #1898: add a missing UNTAG_CLOSURE() in checkBlackHoles
Simon Marlow <simonmar at microsoft.com>**20080103112717]
[fix validation failure on non-i386
Simon Marlow <simonmar at microsoft.com>**20080102151740]
[expand "out of stack slots" panic to suggest using -fregs-graph, see #1993
Simon Marlow <simonmar at microsoft.com>**20080102150737]
[Warning clean, and fix compilation with GHC 6.2.x
Simon Marlow <simonmar at microsoft.com>**20080102114529]
[Add dead code elimination in cmmMiniInline
Simon Marlow <simonmar at microsoft.com>**20071220151734
cmmMiniInline counts the uses of local variables, so it can easily
eliminate assigments to unused locals. This almost never gets
triggered, as we don't generate any dead assignments, but it will be
needed by a forthcoming cleanup in CgUtils.emitSwitch.
]
[implement prefix unboxed tuples (part of #1509)
Isaac Dupree <id at isaac.cedarswampstudios.org>**20080102124001]
[Link libgmp.a statically into libHSrts.dll on Windows
Clemens Fruhwirth <clemens at endorphin.org>**20080101154017]
[Embedd DLL name into its import library, so client libs reference them properly in .idata
Clemens Fruhwirth <clemens at endorphin.org>**20080101152157]
[Add package dependencies to link pass when building ghc package (required for windows DLL build)
Clemens Fruhwirth <clemens at endorphin.org>**20080101152101]
[Fix building libHSrts.dll by using ghc-pkg instead of grepping in base.cabal
Clemens Fruhwirth <clemens at endorphin.org>**20071230193952]
[Add installPackage to dependencies of make.library.* as it's used by the rule
Clemens Fruhwirth <clemens at endorphin.org>**20071229162707]
[Install dynlibs correctly
Clemens Fruhwirth <clemens at endorphin.org>**20071228184024
Add dynlibdir target to config.mk.in, setting it to @libdir at .
Invoke installPackage with dynlibdir at libraries/Makefile
Make installPackage.hs hand dynlibdir to Cabal.
]
[import ord that alex secretly imported
Isaac Dupree <id at isaac.cedarswampstudios.org>**20071228175727]
[add missing import that happy -agc secretly provided
Isaac Dupree <id at isaac.cedarswampstudios.org>**20071227171335]
[correct type mistake, hidden by happy -agc coercions!
Isaac Dupree <id at isaac.cedarswampstudios.org>**20071226140743]
[API changes for cabal-HEAD
Clemens Fruhwirth <clemens at endorphin.org>**20071227143114
Rename interfacedir to haddockdir
Change empty(Copy|Register)Flags to default(Copy|Register)Flags
Wrap content of RegisterFlags with toFlag (the Flag type is actually just Maybe)
]
[Extend API for compiling to and from Core
Tim Chevalier <chevalier at alum.wellesley.edu>**20071225200411
Added API support for compiling Haskell to simplified Core, and for
compiling Core to machine code. The latter, especially, should be
considered experimental and has only been given cursory testing. Also
fixed warnings in DriverPipeline. Merry Christmas.
]
[When complaining about non-rigid context, give suggestion of adding a signature
simonpj at microsoft.com**20071224122217]
[Improve handling of newtypes (fixes Trac 1495)
simonpj at microsoft.com**20071221090406
In a few places we want to "look through" newtypes to get to the
representation type. But we need to be careful that we don't fall
into an ininite loop with e.g.
newtype T = MkT T
The old mechansim for doing this was to have a field nt_rep, inside
a newtype TyCon, that gave the "ultimate representation" of the type.
But that failed for Trac 1495, which looked like this:
newtype Fix a = Fix (a (Fix a))
data I a = I a
Then, expanding the type (Fix I) went on for ever.
The right thing to do seems to be to check for loops when epxanding
the *type*, rather than in the *tycon*. This patch does that,
- Removes nt_rep from TyCon
- Make Type.repType check for loops
See Note [Expanding newtypes] in Type.lhs.
At the same time I also fixed a bug for Roman, where newtypes were not
being expanded properly in FamInstEnv.topNormaliseType. This function
and Type.repType share a common structure.
Ian, see if this merges easily to the branch
If not, I don't think it's essential to fix 6.8
]
[Fix Trac #1981: seq on a type-family-typed expression
simonpj at microsoft.com**20071221085542
We were crashing when we saw
case x of DEFAULT -> rhs
where x had a type-family type. This patch fixes it.
MERGE to the 6.8 branch.
]
[Comment only
simonpj at microsoft.com**20071220164621]
[Fix nasty recompilation bug in MkIface.computeChangedOccs
simonpj at microsoft.com**20071220164307
MERGE to 6.8 branch
In computeChangedOccs we look up the old version of a Name.
But a WiredIn Name doesn't have an old version, because WiredIn things
don't appear in interface files at all.
Result: ghc-6.9: panic! (the 'impossible' happened)
(GHC version 6.9 for x86_64-unknown-linux):
lookupVers1 base:GHC.Prim chr#{v}
This fixes the problem. The patch should merge easily onto the branch.
]
[Fix Trac #1988; keep the ru_fn field of a RULE up to date
simonpj at microsoft.com**20071220131912
The ru_fn field was wrong when we moved RULES from one Id to another.
The fix is simple enough.
However, looking at this makes me realise that the worker/wrapper stuff
for recursive newtypes isn't very clever: we generate demand info but
then don't properly exploit it.
This patch fixes the crash though.
]
[Add better panic message in getSRTInfo (Trac #1973)
simonpj at microsoft.com**20071220180335]
[Remove obselete code for update-in-place (which we no longer do)
simonpj at microsoft.com**20071220173432]
[Implement generalised list comprehensions
simonpj at microsoft.com**20071220111300
This patch implements generalised list comprehensions, as described in
the paper "Comprehensive comprehensions" (Peyton Jones & Wadler, Haskell
Workshop 2007). If you don't use the new comprehensions, nothing
should change.
The syntax is not exactly as in the paper; see the user manual entry
for details.
You need an accompanying patch to the base library for this stuff
to work.
The patch is the work of Max Bolingbroke [batterseapower at hotmail.com],
with some advice from Simon PJ.
The related GHC Wiki page is
http://hackage.haskell.org/trac/ghc/wiki/SQLLikeComprehensions
]
[More bindist-publishing fixes and refactoring
Ian Lynagh <igloo at earth.li>**20071218144505]
[Fix publishing the docs
Ian Lynagh <igloo at earth.li>**20071216122544]
[FIX #1980: must check for ThreadRelocated in killThread#
Simon Marlow <simonmar at microsoft.com>**20071217164610]
[Eliminate external GMP dependencies
Manuel M T Chakravarty <chak at cse.unsw.edu.au>**20071217093839
- Ensure the stage1 compiler uses ghc's own GMP library on Mac OS
- Need to rebuild installPackage and ifBuildable with stage1 compiler as they
go into bindists
]
[Include ~/Library/Frameworks in the framework searchpath
Ian Lynagh <igloo at earth.li>**20071217233457
Patch from Christian Maeder
]
[Make ghcii.sh executable
Ian Lynagh <igloo at earth.li>**20071217195734]
[Don't rely on distrib/prep-bin-dist-mingw being executable
Ian Lynagh <igloo at earth.li>**20071217195554]
[always try to remove the new file before restoring the old one (#1963)
Simon Marlow <simonmar at microsoft.com>**20071214123345]
[Fix a bug in gen_contents_index
Ian Lynagh <igloo at earth.li>**20071212121154
The library doc index thought that the docs were in $module.html, rather
than $package/$module.html.
]
[Fix lifting of case expressions
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071215000837
We have to explicity check for empty arrays in each alternative as recursive
algorithms wouldn't terminate otherwise.
]
[Use (UArr Int) instead of PArray_Int# in vectorisation
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071215000739]
[Fix bug in VectInfo loading
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071214230914]
[Remove unused vectorisation built-in
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071214011015]
[Treat some standard data cons specially during vectorisation
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071213034855
This is a temporary hack which allows us to vectorise literals.
]
[More vectorisation-related built ins
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071213034839]
[Track changes to package ndp
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071212062714]
[Add vectorisation built-ins
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071212040521]
[FIX #1963: catch Ctrl-C and clean up properly
Simon Marlow <simonmar at microsoft.com>**20071213154056]
[Document the new threshold flags
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071214003003]
[Separate and optional size thresholds for SpecConstr and LiberateCase
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071214002719
This patch replaces -fspec-threshold by -fspec-constr-threshold and
-fliberate-case-threshold. The thresholds can be disabled by
-fno-spec-constr-threshold and -fno-liberate-case-threshold.
]
[Make HscTypes.tyThingId respond not panic on ADataCon
simonpj at microsoft.com**20071204152903]
[Use Unix format for RnPat (no other change)
simonpj at microsoft.com**20071213140532]
[Improve free-variable handling for rnPat and friends (fixes Trac #1972)
simonpj at microsoft.com**20071213140213
As well as fixing the immediate problem (Trac #1972) this patch does
a signficant simplification and refactoring of pattern renaming.
Fewer functions, fewer parameters passed....it's all good. But it
took much longer than I expected to figure out.
The most significant change is that the NameMaker type does *binding*
as well as *making* and, in the matchNameMaker case, checks for unused
bindings as well. This is much tider.
(No need to merge to the 6.8 branch, but no harm either.)
]
[Allow more than 3 simplifier iterations to be run in phase 0
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071213040835
The number of iterations during the first run of phase 0 was erroneously
hardcoded to 3. It should be *at least* 3 (see comments in code) but can be
more.
]
[Document -ddump-simpl-phases
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071213040822]
[New flag: -ddump-simpl-phases
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071213040644
This outputs the core after each simplifier phase (i.e., it produces less
information that -ddump-simpl-iterations).
]
[Don't dump simplifier iterations with -dverbose-core2core
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071213034635
SimonPJ says this is the correct behaviour. We still have
-ddump-simpl-iterations.
]
["list --simple-output" should be quiet when there are no packages to list
Simon Marlow <simonmar at microsoft.com>**20071212102230
Previously:
$ ghc-pkg list --user --simple-output
ghc-pkg: no matches
$
Now:
$ ghc-pkg list --user --simple-output
$
]
[Fix vectorisation bug
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071206233015]
[Vectorisation-related built ins
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071206040829]
[Teach vectorisation about some temporary conversion functions
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071206032547]
[Vectorise case of unit correctly
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071205221305]
[Teach vectorisation about singletonP
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071205221240]
[Optimise desugaring of parallel array comprehensions
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071205221213]
[Teach vectorisation about tuple datacons
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071205050221]
[Track additions to package ndp
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071205042649]
[Track changes to package ndp
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071205033859]
[Improve pretty-printing of InstDecl
simonpj at microsoft.com**20071210083053
Fixes Trac #1966.
]
[Comments only
Pepe Iborra <mnislaih at gmail.com>**20071208204815]
[Refactoring only
Pepe Iborra <mnislaih at gmail.com>**20071208195222
Suspensions in the Term datatype used for RTTI
always get assigned a Type, so there is no reason
to juggle around with a (Maybe Type) anymore.
]
[Change the format used by :print to show the content of references
Pepe Iborra <mnislaih at gmail.com>**20071208193013
This comes as result of the short discussion linked below.
http://www.haskell.org/pipermail/cvs-ghc/2007-December/040049.html
]
[Help the user when she tries to do :history without :trace
Pepe Iborra <mnislaih at gmail.com>**20071208180918
Teach GHCi to show a "perhaps you forgot to use :trace?" when
it finds that the user is trying to retrieve an empty :history
]
[Prevent the binding of unboxed things by :print
Pepe Iborra <mnislaih at gmail.com>**20071208181830]
[Coercions from boxy splitters must be sym'ed in pattern matches
Manuel M T Chakravarty <chak at cse.unsw.edu.au>**20071208105018]
[Properly keep track of whether normalising given or wanted dicts
Manuel M T Chakravarty <chak at cse.unsw.edu.au>**20071207071302
- The information of whether given or wanted class dictionaries where
normalised by rewriting wasn't always correctly propagated in TcTyFuns,
which lead to malformed dictionary bindings.
- Also fixes a bug in TcPat.tcConPat where GADT equalities where emitted in
the wrong position in case bindings (which led to CoreLint failures).
]
[TcPat.tcConPat uses equalities instead of GADT refinement
Manuel M T Chakravarty <chak at cse.unsw.edu.au>**20071120071208
* This patch implements the use of equality constraints instead of GADT
refinements that we have been discussing for a while.
* It just changes TcPat.tcConPat. It doesn't have any of the simplification
and dead code removal that is possible due to this change.
* At the moment, this patch breaks a fair number of GADT regression tests.
]
[Use installPackage for register --inplace as well as installing
Ian Lynagh <igloo at earth.li>**20071207234652
We also need to do the GHC.Prim hack when registering inplace or the
tests that use it fail.
]
[Fix the libraries Makefile
Ian Lynagh <igloo at earth.li>**20071205125015
x && y
is not the same as
if x; then y; fi
as the latter doesn't fail when x fails
]
[Copy hscolour.css into dist/... so it gets installed with the library docs
Ian Lynagh <igloo at earth.li>**20071205013703]
[Add the hscolour.css from hscolour 1.8
Ian Lynagh <igloo at earth.li>**20071205011733]
[BIN_DIST_INST_SUBDIR Needs to be defined in config.mk so ./Makefile can see it
Ian Lynagh <igloo at earth.li>**20071207121317]
[#include ../includes/MachRegs.h rather than just MachRegs.h
Ian Lynagh <igloo at earth.li>**20071205170335
This fixes building on NixOS. I'm not sure why it worked everywhere else,
but not on NixOS, before.
]
[Fix bindist creation: readline/config.mk is gone
Ian Lynagh <igloo at earth.li>**20071203123031]
[FIX #1843: Generate different instructions on PPC
Ian Lynagh <igloo at earth.li>**20071203123237
The old ones caused lots of
unknown scattered relocation type 4
errors. Patch from Chris Kuklewicz.
]
[Refactor gen_contents_index
Ian Lynagh <igloo at earth.li>**20071207183538
Also fixes it with Solaris's sh, spotted by Christian Maeder
]
[Use GHC.Exts rather than GHC.Prim
Ian Lynagh <igloo at earth.li>**20071202234222]
[Alter the base:GHC.Prim hack in installPackage, following changes in base
Ian Lynagh <igloo at earth.li>**20071202215719]
[Remove debug warning, and explain why
simonpj at microsoft.com**20071207170507]
[comment only
Simon Marlow <simonmar at microsoft.com>**20071206092422]
[comment typo
Simon Marlow <simonmar at microsoft.com>**20071206092412]
[add Outputable instance for OccIfaceEq
Simon Marlow <simonmar at microsoft.com>**20071206092403]
[Workaround for #1959: assume untracked names have changed
Simon Marlow <simonmar at microsoft.com>**20071206092349
This fixes the 1959 test, but will do more recompilation than is
strictly necessary (but only when -O is on). Still, more
recompilation is better than segfaults, link errors or other random
breakage.
]
[FIX part of #1959: declaration versions were not being incremented correctly
Simon Marlow <simonmar at microsoft.com>**20071206084556
We were building a mapping from ModuleName to [Occ] from the usage
list, using the usg_mod field as the key. Unfortunately, due to a
very poor naming decision, usg_mod is actually the module version, not
the ModuleName. usg_name is the ModuleName. Since Version is also an
instance of Uniquable, there was no type error: all that happened was
lookups in the map never succeeded. I shall rename the fields of
Usage in a separate patch.
This doesn't completely fix #1959, but it gets part of the way there.
I have to take partial blame as the person who wrote this fragment of
code in late 2006 (patch "Interface file optimisation and removal of
nameParent").
]
[move FP_FIND_ROOT after the "GHC is required" check
Simon Marlow <simonmar at microsoft.com>**20071205101814]
[FIX #1110: hackery also needed when running gcc for CPP
Simon Marlow <simonmar at microsoft.com>**20071205150230]
[Teach :print to follow references (STRefs and IORefs)
Pepe Iborra <mnislaih at gmail.com>**20071204105511
Prelude Data.IORef> :p l
l = (_t4::Maybe Integer) : (_t5::[Maybe Integer])
Prelude Data.IORef> p <- newIORef l
Prelude Data.IORef> :p p
p = GHC.IOBase.IORef (GHC.STRef.STRef {((_t6::Maybe Integer) :
(_t7::[Maybe Integer]))})
Prelude Data.IORef> :sp p
p = GHC.IOBase.IORef (GHC.STRef.STRef {(_ : _)})
I used braces to denote the contents of a reference.
Perhaps there is a more appropriate notation?
]
[refactoring only
Pepe Iborra <mnislaih at gmail.com>**20071202125400]
[Change --shared to -shared in Win32 DLL docs
simonpj at microsoft.com**20071204154023]
[protect console handler against concurrent access (#1922)
Simon Marlow <simonmar at microsoft.com>**20071204153918]
[Make eta reduction check more carefully for bottoms (fix Trac #1947)
simonpj at microsoft.com**20071204145803
Eta reduction was wrongly transforming
f = \x. f x
to
f = f
Solution: don't trust f's arity information; instead look at its
unfolding. See Note [Eta reduction conditions]
Almost all the new lines are comments!
]
[Improve inlining for INLINE non-functions
simonpj at microsoft.com**20071204114955
(No need to merge to 6.8, but no harm if a subsequent patch needs it.)
The proximate cause for this patch is to improve the inlining for INLINE
things that are not functions; this came up in the NDP project. See
Note [Lone variables] in CoreUnfold.
This caused some refactoring that actually made things simpler. In
particular, more of the inlining logic has moved from SimplUtils to
CoreUnfold, where it belongs.
]
[fix race conditions in sandboxIO (#1583, #1922, #1946)
Simon Marlow <simonmar at microsoft.com>**20071204114444
using the new block-inheriting forkIO (#1048)
]
[:cd with no argument goes to the user's home directory
Simon Marlow <simonmar at microsoft.com>**20071204113945
Seems better than getting a confusing 'cannot find directory' exception.
]
[forkIO starts the new thread blocked if the parent is blocked (#1048)
Simon Marlow <simonmar at microsoft.com>**20071204110947]
[Improve eta reduction, to reduce Simplifier iterations
simonpj at microsoft.com**20071203150039
I finally got around to investigating why the Simplifier was sometimes
iterating so often. There's a nice example in Text.ParserCombinators.ReadPrec,
which produced:
NOTE: Simplifier still going after 3 iterations; bailing out. Size = 339
NOTE: Simplifier still going after 3 iterations; bailing out. Size = 339
NOTE: Simplifier still going after 3 iterations; bailing out. Size = 339
No progress is being made. It turned out that an interaction between
eta-expansion, casts, and eta reduction was responsible. The change is
small and simple, in SimplUtils.mkLam: do not require the body to be
a Lam when floating the cast outwards.
I also discovered a missing side condition in the same equation, so fixing
that is good too. Now there is no loop when compiling ReadPrec.
Should do a full nofib run though.
]
[Don't default to stripping binaries when installing
Ian Lynagh <igloo at earth.li>**20071202195817]
[Improve pretty-printing for Insts
simonpj at microsoft.com**20071128173125]
[Reorganise TcSimplify (again); FIX Trac #1919
simonpj at microsoft.com**20071128173146
This was a bit tricky. We had a "given" dict like (d7:Eq a); then it got
supplied to reduceImplication, which did some zonking, and emerged with
a "needed given" (d7:Eq Int). That got everything confused.
I found a way to simplify matters significantly. Now reduceContext
- first deals with methods/literals/dictionaries
- then deals with implications
Separating things in this way not only made the bug go away, but
eliminated the need for the recently-added "needed-givens" results returned
by checkLoop. Hurrah.
It's still a swamp. But it's a bit better.
]
[FIX #1914: GHCi forgot all the modules that were loaded before an error
Simon Marlow <simonmar at microsoft.com>**20071130130734]
[FIX #1744: ignore the byte-order mark at the beginning of a file
Simon Marlow <simonmar at microsoft.com>**20071130101100]
[FIX Trac #1935: generate superclass constraints for derived classes
simonpj at microsoft.com**20071128150541
This bug only reports a problem with phantom types, but actually
there was quite a long-standing and significant omission in the
constraint generation for derived classes. See
Note [Superclasses of derived instance] in TcDeriv.
The test deriving-1935 tests both cases.
]
[Print a bit more info in VarBinds (no need to merge)
simonpj at microsoft.com**20071128150354]
[Check for duplicate bindings in CoreLint
simonpj at microsoft.com**20071128150214]
[add comment
Simon Marlow <simonmar at microsoft.com>**20071128111417]
[FIX #1916: don't try to convert float constants to int in CMM optimizer
Bertram Felgenhauer <int-e at gmx.de>**20071122095513]
[give a more useful message when the static flags have not been initialised (#1938)
Simon Marlow <simonmar at microsoft.com>**20071127135435]
[Rebuild utils with the stage1 compiler when making a bindist; fixes trac #1860
Ian Lynagh <igloo at earth.li>**20071127203959
This is a bit unpleasant, as "make binary-dist" really shouldn't actually
build anything, but it works.
]
[Remove the --print-docdir flag
Ian Lynagh <igloo at earth.li>**20071127195605
It wasn't doing the right thing for bindists. Let's rethink...
]
[FIX #1925: the interpreter was not maintaining tag bits correctly
Simon Marlow <simonmar at microsoft.com>**20071127122614
See comment for details
]
[add missing instruction: ALLOC_AP_NOUPD
Simon Marlow <simonmar at microsoft.com>**20071127122604]
[Check tag bits on the fun pointer of a PAP
Simon Marlow <simonmar at microsoft.com>**20071126160420]
[canonicalise the path to HsColour
Simon Marlow <simonmar at microsoft.com>**20071126141614]
[Consistently put www. on the front of haskell.org in URLs
Ian Lynagh <igloo at earth.li>**20071126215256]
[Fix some more URLs
Ian Lynagh <igloo at earth.li>**20071126214147]
[Tweak some URLs
Ian Lynagh <igloo at earth.li>**20071126194148]
[Fix some links
Ian Lynagh <igloo at earth.li>**20071126184406]
[Copy gmp stamps into bindists, so we don't try and rebuild gmp
Ian Lynagh <igloo at earth.li>**20071125211919]
[On Windows, Delete the CriticalSection's we Initialize
Ian Lynagh <igloo at earth.li>**20071125125845]
[On Windows, add a start menu link to the flag reference
Ian Lynagh <igloo at earth.li>**20071125124429]
[Remove html/ from the paths we put in the start menu on Windows
Ian Lynagh <igloo at earth.li>**20071125124150]
[MERGED: Make ":" in GHCi repeat the last command
Ian Lynagh <igloo at earth.li>**20071125122020
Ian Lynagh <igloo at earth.li>**20071124231857
It used to be a synonym for ":r" in 6.6.1, but this wasn't documented or
known about by the developers. In 6.8.1 it was accidentally broken.
This patch brings it back, but as "repeat the last command", similar to
pressing enter in gdb. This is almost as good for people who want it to
reload, and means that it can also be used to repeat commands like :step.
]
[MERGED: Put library docs in a $pkg, rather than $pkgid, directory; fixes trac #1864
Ian Lynagh <igloo at earth.li>**20071124212305
Ian Lynagh <igloo at earth.li>**20071124171220
]
[Don't make a library documentation prologue
Ian Lynagh <igloo at earth.li>**20071124211943
It's far too large now, and no-one complained when 6.8.1 didn't have one.
]
[Don't put package version numbers in links in index.html
Ian Lynagh <igloo at earth.li>**20071124211629]
[Define install-strip in Makefile
Ian Lynagh <igloo at earth.li>**20071124205037]
[Define install-strip in distrib/Makefile
Ian Lynagh <igloo at earth.li>**20071124204803]
[Install gmp from bindists; fixes trac #1848
Ian Lynagh <igloo at earth.li>**20071124185240]
[(native gen) fix code generated for GDTOI on x86_32
Bertram Felgenhauer <int-e at gmx.de>**20071121063942
See trac #1910.
]
[Copy the INSTALL hack from mk/config.mk.in into distrib/Makefile-bin-vars.in
Ian Lynagh <igloo at earth.li>**20071124163028
configure will set INSTALL to ./install-sh if it can't find it in the path,
so we need to replace the . with the path to our root.
]
[Make install-sh executable /before/ we try to find it
Ian Lynagh <igloo at earth.li>**20071124162450]
[Document --info in the +RTS -? help
Ian Lynagh <igloo at earth.li>**20071123204352]
[MERGED: If we have hscolour then make source code links in teh haddock docs
Ian Lynagh <igloo at earth.li>**20071123233113
Fri Nov 23 13:15:59 PST 2007 Ian Lynagh <igloo at earth.li>
]
[Tidy and trim the type environment in mkBootModDetails
simonpj at microsoft.com**20071123153519
Should fix Trac #1833
We were failing to trim the type envt in mkBootModDetails, so several
functions all called (*), for example, were getting into the interface.
Result chaos. It only actually bites when we do the retyping-loop thing,
which is why it's gone so long without a fix.
]
[refactor: HscNothing and boot modules do not need desugaring
Simon Marlow <simonmar at microsoft.com>**20071123135237]
[FIX #1910: fix code generated for GDTOI on x86_32
Bertram Felgenhauer <int-e at gmx.de>*-20071121102627]
[Properly ppr InstEqs in wanteds of implication constraints
Manuel M T Chakravarty <chak at cse.unsw.edu.au>**20071122093002]
[FIX #1910: fix code generated for GDTOI on x86_32
Bertram Felgenhauer <int-e at gmx.de>**20071121102627]
[Add built-in Double operations to vectorisation
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071122002517]
[Teach vectorisation about Double
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071121054932]
[Vectorise polyexprs with notes
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071121053102]
[Make rebindable do-notation behave as advertised
simonpj at microsoft.com**20071121174914
Adopt Trac #1537. The patch ended up a bit bigger than I expected,
so I suggest we do not merge this into the 6.8 branch. But there
is no funadamental reason why not.
With this patch, rebindable do-notation really does type as if you
had written the original (>>) and (>>=) operations in desguared form.
I ended up refactoring some of the (rather complicated) error-context
stuff in TcUnify, by pushing an InstOrigin into tcSubExp and its
various calls. That means we could get rid of tcFunResTy, and the
SubCtxt type. This should improve error messages slightly
in complicated situations, because we have an Origin to hand
to instCall (in the (isSigmaTy actual_ty) case of tc_sub1).
Thanks to Pepe for the first draft of the patch.
]
[Add DEBUG-only flag -dsuppress-uniques to suppress printing of uniques
simonpj at microsoft.com**20071116152446
This is intended only for debugging use: it makes it easier to
compare two variants without the variations between uniques mattering.
(Of course, you can't actually feed the output to the C compiler
or assembler and expect anything sensible to happen!)
]
[Add -dcore-lint when validating libraries
simonpj at microsoft.com**20071105164733]
[Fix Trac #1913: check data const for derived types are in scope
simonpj at microsoft.com**20071121151428
When deriving an instance, the data constructors should all be in scope.
This patch checks the condition.
]
[Fix Trac #1909: type of map in docs
simonpj at microsoft.com**20071120160152]
[Move file locking into the RTS, fixing #629, #1109
Simon Marlow <simonmar at microsoft.com>**20071120140859
File locking (of the Haskell 98 variety) was previously done using a
static table with linear search, which had two problems: the array had
a fixed size and was sometimes too small (#1109), and performance of
lockFile/unlockFile was suboptimal due to the linear search.
Also the algorithm failed to count readers as required by Haskell 98
(#629).
Now it's done using a hash table (provided by the RTS). Furthermore I
avoided the extra fstat() for every open file by passing the dev_t and
ino_t into lockFile. This and the improvements to the locking
algorithm result in a healthy 20% or so performance increase for
opening/closing files (see openFile008 test).
]
[FIX Trac #1825: standalone deriving Typeable
simonpj at microsoft.com**20071120125732
Standalone deriving of typeable now requires you to say
instance Typeable1 Maybe
which is exactly the shape of instance decl that is generated
by a 'deriving( Typeable )' clause on the data type decl.
This is a bit horrid, but it's the only consistent way, at least
for now. If you say something else, the error messages are helpful.
MERGE to 6.8 branch
]
[FIX #1715: egregious bug in ifaceDeclSubBndrs
simonpj at microsoft.com**20071120111723
ifaceDeclSubBndrs didn't have an IfaceSyn case; but with type
families an IfaceSyn can introduce subordinate binders. Result:
chaos.
The fix is easy though. Merge to 6.8 branch.
]
[Always do 'setup makefile' before building each library
Simon Marlow <simonmar at microsoft.com>**20071120103329
This forces preprocessing to happen, which is necessary if any of the
.hsc files have been modified. Without this change, a 'setup
makefile' would be required by hand after a .hsc file changed.
Fortunately 'setup makefile' isn't much extra work, and I've made it
not overwrite GNUmakefile if it hasn't changed, which avoids
recalculating the dependencies each time.
]
[FIX #1847 (improve :browse! docs, fix unqual)
claus.reinke at talk21.com**20071108013147
- add example to docs, explain how to interpret
output of `:browse! Data.Maybe`
- print unqualified names according to current
context, not the context of the target module
]
[Track changes to package ndp
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071120033716]
[Temporary hack for passing PArrays from unvectorised to vectorised code
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071120024545]
[Bind NDP stuff to [:.:] arrays
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071119020302]
[Don't treat enumerations specially during vectorisation for the moment
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071119013729]
[Fix bugs in vectorisation of case expressions
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071119013714]
[More built-in NDP combinators
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071119012205]
[New vectorisation built-ins
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071118051940]
[Fix bug in conversion unvect/vect
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071118051926]
[Extend built-in vectorisation environments
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071118045219]
[Fix bug in generation of environments for vectorisation
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071118045203]
[Add builtin var->var mapping to vectorisation
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071118042605]
[Extend vectorisation built-in mappings with datacons
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071118034351]
[Change representation of parallel arrays of enumerations
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071118033355]
[Add vectorisation-related builtin
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071118031513]
[Teach vectorisation about Bool
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071117042714]
[Incomplete support for boxing during vectorisation
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071117040739]
[Make sure some TyCons always vectorise to themselves
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071117040537]
[Simple conversion vectorised -> unvectorised
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071117023029]
[Fix bug in case vectorisation
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071117015014]
[Vectorisation of algebraic case expressions
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071116074814]
[More vectorisation-related built-ins
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071116061831]
[Vectorisation utilities
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071116051037]
[Add vectorisation built-ins
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071116050959]
[Fix vectorisation of binders in case expressions
Roman Leshchinskiy <rl at cse.unsw.edu.au>**20071116021833]
[Two small typos in the flags summary (merge to 6.8 branch)
simonpj at microsoft.com**20071119134639]
[Improve the situation for Trac #959: civilised warning instead of a trace msg
simonpj at microsoft.com**20071119122938
This doesn't fix the root cause of the bug, but it makes the report
more civilised, and points to further info.
]
[FIX Trac #1806: test for correct arity for datacon in infix pattern patch
simonpj at microsoft.com**20071119114301
Happily the fix is easy; pls merge
]
[Accept x86_64-*-freebsd* as well as amd64-*-freebsd* in configure.ac
Ian Lynagh <igloo at earth.li>**20071117154502
Patch from Brian P. O'Hanlon
]
[Attempt at fixing #1873, #1360
Simon Marlow <simonmar at microsoft.com>**20071116152148
I think I figured out a reasonable way to manage the GHCi context,
comments welcome.
Rule 1: external package modules in the context are persistent. That
is, when you say 'import Data.Maybe' it survives over :load, :add,
:reload and :cd.
Rule 2: :load and :add remove all home-package modules from the
context and add the rightmost target, as a *-module if possible. This
is as before, and makes sense for :load because we're starting a new
program; the old home-package modules don't make sense any more. For
:add, it usually does what you want, because the new target will
become the context.
Rule 3: any modules from the context that fail to load during a
:reload are remembered, and re-added to the context at the next
successful :reload.
Claus' suggestion about adding the "remembered" modules to the prompt
prefixed with a ! is implemented but commented out. I couldn't
decide whether it was useful or confusing.
One difference that people might notice is that after a :reload where
there were errors, GHCi would previously dump you in the most recent
module that it loaded. Now it dumps you in whatever subset of the
current context still makes sense, and in the common case that will
probably be {Prelude}.
]
[Wibble to fix Trac #1901 (shorten messsage slightly)
simonpj at microsoft.com**20071116150341]
[Improve links from flag reference to the relevant section; and improve doc of RankN flags
simonpj at microsoft.com**20071116145816]
[FIX Trac #1901: check no existential context in H98 mode
simonpj at microsoft.com**20071116145609]
[Improve documentation of data type declarations (Trac #1901)
simonpj at microsoft.com**20071116081841]
[Change the command-line semantics for query commands
Simon Marlow <simonmar at microsoft.com>**20071116132046
From the help text:
Commands that query the package database (list, latest, describe,
field) operate on the list of databases specified by the flags
--user, --global, and --package-conf. If none of these flags are
given, the default is --global --user.
This makes it possible to query just a single database (e.g. the
global one without the user one), which needed tricks to accomplish
before.
]
[use "ghc-pkg latest --global" instead of "ghc-pkg list --simple-output"
Simon Marlow <simonmar at microsoft.com>**20071116122018
The former now does the right thing: it uses the global database only,
and picks the most recent package with the given name.
]
[Disallow installing packages whose names differ in case only.
Simon Marlow <simonmar at microsoft.com>**20071116121153
--force overrides. Requested by Duncan Coutts, with a view to
treating package names as case-insensitive in the future.
]
[FIX BUILD (with GHC 6.2.x): update .hi-boot file
Simon Marlow <simonmar at microsoft.com>**20071116101227]
[FIX #1828: installing to a patch with spaces in
Simon Marlow <simonmar at microsoft.com>**20071115155747
We have to pass the path to gcc when calling windres, which itself
might have spaces in. Furthermore, we have to pass the path to gcc's
tools to gcc. This means getting the quoting right, and after much
experimentation and reading of the windres sources I found something
that works: passing --use-temp-files to windres makes it use its own
implementation of quoting instead of popen(), and this does what we
want. Sigh.
]
[on Windows, install to a directory with spaces (test for #1828)
Simon Marlow <simonmar at microsoft.com>**20071115155327]
[FIX #1679: crash on returning from a foreign call
Simon Marlow <