add support for <{..}> and ~~> syntax as well as typing for Kappa-calculus
merge GHC HEAD
Fix renaming of guards This was making mc17 fail.
Do-notation in an arrow context is not rebindable Fixes Trac #4851
Final batch of monad-comprehension stuff * Do-notation in arrows is marked with HsStmtContext = ArrowExpr * tcMDoStmt (which was only used for arrows) is moved to TcArrows, and renamed tcArrDoStmt * Improved documentation in the user manual * Lots of other minor changes
More hacking on monad-comp Lots of refactoring. In particular I have now combined TansformStmt and GroupStmt into a single constructor TransStmt. This gives lots of useful code sharing.
More on monad-comp; an intermediate state, so don't pull
More hacking on monad-comp; now works
Simon's hacking on monad-comp; incomplete
Preliminary monad-comprehension patch (Trac #4370) This is the work of Nils Schweinsberg <mail@n-sch.de> It adds the language extension -XMonadComprehensions, which generalises list comprehension syntax [ e | x <- xs] to work over arbitrary monads.
merge upstream HEAD
Fix Trac #5038 (missing free variable in ifThenElse rebindable syntax)
merge up to ghc HEAD 16-Apr-2011
Ignore names introduced "implicitly" in unused-variable warnings (Fix #4404) We collect variables introduced by the {...} part of a let-like record wildcard pattern and do not warn if the user then doesn't actually use them.
Initial checkin of HetMet / -XModalTypes modifications
Produce an error message, not a crash, for HsOpApp with non-var operator Fixes Trac #4877.
Tidy up rebindable syntax for MDo For a long time an 'mdo' expression has had a SyntaxTable attached to it. However, we're busy deprecating SyntaxTables in favour of rebindable syntax attached to individual Stmts, and MDoExpr was totally inconsistent with DoExpr in this regard. This patch tidies it all up. Now there's no SyntaxTable on MDoExpr, and 'modo' is generally handled much more like 'do'. There is resulting small change in behaviour: now MonadFix is required only if you actually *use* recursion in mdo. This seems consistent with the implicit dependency analysis that is done for mdo. Still to do: * Deal with #4148 (this patch is on the way) * Get rid of the last remaining SyntaxTable on HsCmdTop
Fix Trac #4534: renamer bug The renamer wasn't attaching the right used-variables to a TransformStmt constructor. The real modification is in RnExpr; the rest is just pretty-printing and white space.
Add rebindable syntax for if-then-else There are two main changes * New LANGUAGE option RebindableSyntax, which implies NoImplicitPrelude * if-the-else becomes rebindable, with function name "ifThenElse" (but case expressions are unaffected) Thanks to Sam Anklesaria for doing most of the work here
Implement auto-specialisation of imported Ids This big-ish patch arranges that if an Id 'f' is * Type-class overloaded f :: Ord a => [a] -> [a] * Defined with an INLINABLE pragma {-# INLINABLE f #-} * Exported from its defining module 'D' then in any module 'U' that imports D 1. Any call of 'f' at a fixed type will generate (a) a specialised version of f in U (b) a RULE that rewrites unspecialised calls to the specialised on e.g. if the call is (f Int dOrdInt xs) then the specialiser will generate $sfInt :: [Int] -> [Int] $sfInt = <code for f, imported from D, specialised> {-# RULE forall d. f Int d = $sfInt #-} 2. In addition, you can give an explicit {-# SPECIALISE -#} pragma for the imported Id {-# SPECIALISE f :: [Bool] -> [Bool] #-} This too generates a local specialised definition, and the corresponding RULE The new RULES are exported from module 'U', so that any module importing U will see the specialised versions of 'f', and will not re-specialise them. There's a flag -fwarn-auto-orphan that warns you if the auto-generated RULES are orphan rules. It's not in -Wall, mainly to avoid lots of error messages with existing packages. Main implementation changes - A new flag on a CoreRule to say if it was auto-generated. This is persisted across interface files, so there's a small change in interface file format. - Quite a bit of fiddling with plumbing, to get the {-# SPECIALISE #-} pragmas for imported Ids. In particular, a new field tgc_imp_specs in TcGblEnv, to keep the specialise pragmas for imported Ids between the typechecker and the desugarer. - Some new code (although surprisingly little) in Specialise, to deal with calls of imported Ids