summaryrefslogtreecommitdiff
path: root/compiler/parser
Commit message (Collapse)AuthorAgeFilesLines
* Refactor the imports of InteractiveContextSimon Peyton Jones2011-08-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of two fields ic_toplev_scope :: [Module] ic_imports :: [ImportDecl RdrName] we now just have one ic_imports :: [InteractiveImport] with the auxiliary data type data InteractiveImport = IIDecl (ImportDecl RdrName) -- Bring the exports of a particular module -- (filtered by an import decl) into scope | IIModule Module -- Bring into scope the entire top-level envt of -- of this module, including the things imported -- into it. This makes lots of code less confusing. No change in behaviour. It's preparatory to fixing Trac #5147. While I was at I also * Cleaned up the handling of the "implicit" Prelude import by adding a ideclImplicit field to ImportDecl. This significantly reduces plumbing in the handling of the implicit Prelude import * Used record notation consistently for ImportDecl
* White space onlySimon Peyton Jones2011-07-271-1/+1
|
* Separate the warning flags into their own datatypeIan Lynagh2011-07-141-4/+4
| | | | | | | The -w flag wasn't turning off a few warnings (Opt_WarnMissingImportList, Opt_WarnMissingLocalSigs, Opt_WarnIdentities). Rather than just adding them, I've separated the Opt_Warn* contructors off into their own type, so -w now just sets the list of warning flags to [].
* More Lexer.x tidy-upsIan Lynagh2011-07-141-8/+4
|
* Remove some unused, commented-out code from Lexer.xIan Lynagh2011-07-141-38/+7
|
* Whitespace in Lexer.xIan Lynagh2011-07-141-484/+485
|
* Remove 'threadsafe' FFI importsIan Lynagh2011-07-133-10/+3
| | | | They've been deprecated since GHC 6.12.
* Fix bug in parsing of module headers (see #5243)Simon Marlow2011-07-121-3/+7
|
* Make an extension for interruptible FFI callsIan Lynagh2011-07-111-26/+29
|
* SafeHaskell: Add safe import flag (not functional)David Terei2011-06-172-3/+10
|
* Merge branch 'master' of http://darcs.haskell.org/ghcDavid Waern2011-06-132-35/+40
|\
| * Added a pragma {-# NOVECTORISE f #-} that suppresses vectorisation of ↵Manuel M T Chakravarty2011-06-132-35/+40
| | | | | | | | toplevel variable 'f'.
* | Merge branch 'master' of http://darcs.haskell.org/ghcDavid Waern2011-06-102-73/+76
|\ \ | |/
| * Refactor SrcLoc and SrcSpanIan Lynagh2011-06-092-73/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "Unhelpful" cases are now in a separate type. This allows us to improve various things, e.g.: * Most of the panic's in SrcLoc are now gone * The Lexer now works with RealSrcSpans rather than SrcSpans, i.e. it knows that it has real locations and thus can assume that the line number etc really exists * Some of the more suspicious cases are no longer necessary, e.g. we no longer need this case in advanceSrcLoc: advanceSrcLoc loc _ = loc -- Better than nothing More improvements can probably be made, e.g. tick locations can probably use RealSrcSpans too.
* | Change TypeSig and GenericSig to take a list of names (fixes #1595).David Waern2011-06-102-2/+2
|/ | | | | This is a merge of a patch contributed by Michal Terepeta and the recent generics changes.
* Merge branch 'master' of http://darcs.haskell.org/ghc into ghc-genericsJose Pedro Magalhaes2011-05-171-7/+10
|\
| * Use FractionalLit more extensively to improve other pretty printersMax Bolingbroke2011-05-151-5/+8
| |
| * Record the original text along with parsed Rationals: fixes #2245Max Bolingbroke2011-05-151-3/+3
| |
* | Merge branch 'master' of http://darcs.haskell.org/ghc into ghc-genericsJose Pedro Magalhaes2011-05-121-1/+1
|\ \ | |/ | | | | | | Resolved conflicts: compiler/typecheck/TcTyClsDecls.lhs
| * Merge master into the ghc-new-co branchSimon Peyton Jones2011-05-063-41/+26
| |\
| * \ Merge remote branch 'origin/master' into ghc-new-coSimon Peyton Jones2011-04-301-21/+21
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: compiler/typecheck/TcErrors.lhs compiler/typecheck/TcSMonad.lhs compiler/typecheck/TcType.lhs compiler/types/TypeRep.lhs
| * | | This BIG PATCH contains most of the work for the New Coercion RepresentationSimon Peyton Jones2011-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See the paper "Practical aspects of evidence based compilation in System FC" * Coercion becomes a data type, distinct from Type * Coercions become value-level things, rather than type-level things, (although the value is zero bits wide, like the State token) A consequence is that a coerion abstraction increases the arity by 1 (just like a dictionary abstraction) * There is a new constructor in CoreExpr, namely Coercion, to inject coercions into terms
* | | | Remove comment mentioning the old generic classes.Jose Pedro Magalhaes2011-05-051-2/+1
| | | |
* | | | Merge branch 'master' of http://darcs.haskell.org/ghc into ghc-genericsJose Pedro Magalhaes2011-05-043-41/+26
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | Fixed conflicts: compiler/prelude/PrelNames.lhs
| * | | More on monad-comp; an intermediate state, so don't pullSimon Peyton Jones2011-05-021-1/+1
| | | |
| * | | Simon's hacking on monad-comp; incompleteSimon Peyton Jones2011-04-292-42/+9
| | | |
| * | | Merge remote branch 'origin/master' into monad-compSimon Peyton Jones2011-04-281-21/+21
| |\ \ \ | | | |/ | | |/| | | | | | | | | Conflicts: compiler/main/HscMain.lhs
| * | | Preliminary monad-comprehension patch (Trac #4370)Simon Peyton Jones2011-04-283-4/+22
| | |/ | |/| | | | | | | | | | | | | | | | | | | 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.
* | | Remove HsNumTy and TypePati.Jose Pedro Magalhaes2011-05-042-7/+1
| | | | | | | | | | | | They belonged to the old generic deriving mechanism, so they can go. Adapted a lot of code as a consequence.
* | | Add a new flag XDefaultSignatures to enable just the signatures on the ↵Jose Pedro Magalhaes2011-05-041-3/+3
| | | | | | | | | | | | default methods. Redefine the behavior of XGenerics to mean enable XDefaultSignatures and XDeriveRepresentable.
* | | Use 'default' rather than 'generic' for default-method signaturesSimon Peyton Jones2011-04-282-18/+12
| | | | | | | | | | | | | | | | | | Also get rid of the old {| |} brackets in the lexer. Fewer keywords!
* | | Merge branch 'master' of http://darcs.haskell.org/ghc into ghc-genericsJose Pedro Magalhaes2011-04-271-21/+21
|\ \ \ | | |/ | |/|
| * | Formatting fixes in Lexer.xDavid Terei2011-04-261-21/+21
| |/
* | Small fixes to the generics branch to get rid of warnings,unknown2011-04-141-1/+1
| | | | | | | | plus a false ASSERT failure
* | Initial commit for Pedro's new generic default methodssimonpj2011-04-123-9/+19
|/ | | | | (See his Haskell Symposium 2010 paper "A generic deriving mechaism for Haskell")
* Added a VECTORISE pragmaManuel M T Chakravarty2011-02-202-3/+11
| | | | | | | | | | | | | | | - Added a pragma {-# VECTORISE var = exp #-} that prevents the vectoriser from vectorising the definition of 'var'. Instead it uses the binding '$v_var = exp' to vectorise 'var'. The vectoriser checks that the Core type of 'exp' matches the vectorised Core type of 'var'. (It would be quite complicated to perform that check in the type checker as the vectorisation of a type needs the state of the VM monad.) - Added parts of a related VECTORISE SCALAR pragma - Documented -ddump-vect - Added -ddump-vt-trace - Some clean up
* multiline commands in GHCi #4316Vivian McPhail2010-11-051-0/+22
| | | | | | | | | | | | | This patch adds support for multiline commands in GHCi. The first line of input is lexed. If there is an active layout context once the lexer reaches the end of file, the user is prompted for more input. Multiline input is exited by an empty line and can be escaped with a user interrupt. Multiline mode is toggled with `:set +m`
* Tidy up rebindable syntax for MDosimonpj@microsoft.com2010-12-221-1/+3
| | | | | | | | | | | | | | | | | | | | 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
* Replace uses of the old catch function with the new oneIan Lynagh2010-12-181-1/+2
|
* Remove code that is dead now that we need >= 6.12 to buildIan Lynagh2010-12-151-3/+0
|
* Rename -XPArr to -XParallelArraysBen Lippmeier2010-11-301-8/+8
|
* Remove NewQualifiedOperatorsIan Lynagh2010-12-011-11/+2
| | | | The extension was rejected by Haskell', and deprecated in 7.0.
* Unicide OtherNumber category should be allowed in identifiers (#4373)Simon Marlow2010-11-151-1/+1
|
* Separate NondecreasingIndentation out into its own extensionIan Lynagh2010-11-241-2/+7
|
* Add another GHC layout rule relaxation to RelaxedLayoutIan Lynagh2010-11-241-1/+14
|
* Remove references to Haskell 98Ian Lynagh2010-11-232-5/+6
| | | | | They are no longer right, as we have Haskell' generating new Haskell standards.
* Add an extension for GHC's layout-rule relaxationsIan Lynagh2010-11-201-2/+9
| | | | | Still TODO: Add the other relaxation (#1060) and update the alternative layout rule to use the extension.
* remove -XNoMonomorphismRestrictionSimon Marlow2010-11-172-18/+2
| | | | | This was apparently needed at some point during the new typechecker development, but does not seem to be required now.
* add some {-# LANGUAGE BangPatterns #-} to mollify GHCSimon Marlow2010-11-172-0/+2
|
* More modules that need LANGUAGE BangPatternssimonpj@microsoft.com2010-11-121-0/+1
|