summaryrefslogtreecommitdiff
path: root/compiler/main/GhcMonad.hs
Commit message (Collapse)AuthorAgeFilesLines
* Comments onlySimon Peyton Jones2015-01-091-0/+2
|
* Remove redundant constraints in the compiler itself, found by ↵Simon Peyton Jones2015-01-061-4/+13
| | | | -fwarn-redundant-constraints
* Add -fwarn-context-quantification (#4426)Krzysztof Gogolewski2014-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: This warning (enabled by default) reports places where a context implicitly binds a type variable, for example type T a = {-forall m.-} Monad m => a -> m a Also update Haddock submodule. Test Plan: validate Reviewers: hvr, goldfire, simonpj, austin Reviewed By: austin Subscribers: simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D211 GHC Trac Issues: #4426
* Add LANGUAGE pragmas to compiler/ source filesHerbert Valerio Riedel2014-05-151-0/+1
| | | | | | | | | | | | | | | | | | In some cases, the layout of the LANGUAGE/OPTIONS_GHC lines has been reorganized, while following the convention, to - place `{-# LANGUAGE #-}` pragmas at the top of the source file, before any `{-# OPTIONS_GHC #-}`-lines. - Moreover, if the list of language extensions fit into a single `{-# LANGUAGE ... -#}`-line (shorter than 80 characters), keep it on one line. Otherwise split into `{-# LANGUAGE ... -#}`-lines for each individual language extension. In both cases, try to keep the enumeration alphabetically ordered. (The latter layout is preferable as it's more diff-friendly) While at it, this also replaces obsolete `{-# OPTIONS ... #-}` pragma occurences by `{-# OPTIONS_GHC ... #-}` pragmas.
* Applicative instance for Ghc and GhcTDan Frumin2013-08-281-0/+8
| | | | | | Fixes #8175. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Remove printExceptionAndWarnings (deprecated since 7.2)Ian Lynagh2013-02-201-5/+1
|
* Add a "deprecated in" pragmaIan Lynagh2013-02-201-1/+1
|
* Remove gblock and gunblockIan Lynagh2013-02-191-4/+0
|
* Add a class HasDynFlags(getDynFlags)Ian Lynagh2011-12-191-2/+7
| | | | | | | | We no longer have many separate, clashing getDynFlags functions I've given each GhcMonad its own HasDynFlags instance, rather than using UndecidableInstances to make a GhcMonad m => HasDynFlags m instance.
* Change the way IfExtName is serialized so (most) wired-in names get special ↵Max Bolingbroke2011-09-271-0/+3
| | | | | | | | representation This lets IfaceType be dumber, with fewer special cases, because deserialization for more wired-in names will work. Once we have polymorphic kinds we will be able to replace IfaceTyCon with a simple IfExtName.
* Formatting fixes to GhcMonadDavid Terei2011-05-041-2/+2
|
* Split main/GHC into GHC and GhcMakesimonpj@microsoft.com2011-01-251-1/+22
| | | | | | | | | | | | | | | | | | | There are two things going on in main/GHC.hs. * It's the root module of the GHC package * It contains lots of stuff for --make It is also gigantic (2.7k lines) This patch splits it into two * GHC.hs is the root module for the GHC package (1.3k lines) * GhcMake.hs contains the stuff for --make (1.4k lines) Happily the functional split divided it almost exactly in half. This is a pure refactoring. There should be no behavioural change.
* Refactoring and tidyup of HscMain and related things (also fix #1666)Simon Marlow2010-10-271-0/+177
While trying to fix #1666 (-Werror aborts too early) I decided to some tidyup in GHC/DriverPipeline/HscMain. - The GhcMonad overloading is gone from DriverPipeline and HscMain now. GhcMonad is now defined in a module of its own, and only used in the top-level GHC layer. DriverPipeline and HscMain use the plain IO monad and take HscEnv as an argument. - WarnLogMonad is gone. printExceptionAndWarnings is now called printException (the old name is deprecated). Session no longer contains warnings. - HscMain has its own little monad that collects warnings, and also plumbs HscEnv around. The idea here is that warnings are collected while we're in HscMain, but on exit from HscMain (any function) we check for warnings and either print them (via log_action, so IDEs can still override the printing), or turn them into an error if -Werror is on. - GhcApiCallbacks is gone, along with GHC.loadWithLogger. Thomas Schilling told me he wasn't using these, and I don't see a good reason to have them. - there's a new pure API to the parser (suggestion from Neil Mitchell): parser :: String -> DynFlags -> FilePath -> Either ErrorMessages (WarningMessages, Located (HsModule RdrName))