summaryrefslogtreecommitdiff
path: root/compiler/utils/Maybes.hs
Commit message (Collapse)AuthorAgeFilesLines
* Refactor TcRnMonad.mapAndRecoverMSimon Jakobi2018-11-221-0/+5
| | | | | | | | | | | | | | | This version doesn't require the 'reverse' step after the monadic fold. Test Plan: ./validate Reviewers: bgamari, tdammers Reviewed By: tdammers Subscribers: monoidal, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5343
* compiler: introduce custom "GhcPrelude" PreludeHerbert Valerio Riedel2017-09-191-0/+2
| | | | | | | | | | | | | | | | | | This switches the compiler/ component to get compiled with -XNoImplicitPrelude and a `import GhcPrelude` is inserted in all modules. This is motivated by the upcoming "Prelude" re-export of `Semigroup((<>))` which would cause lots of name clashes in every modulewhich imports also `Outputable` Reviewers: austin, goldfire, bgamari, alanz, simonmar Reviewed By: bgamari Subscribers: goldfire, rwbarton, thomie, mpickering, bgamari Differential Revision: https://phabricator.haskell.org/D3989
* Unify CallStack handling in ghcBen Gamari2016-09-151-6/+2
| | | | | | | Here we introduce compatibility wrappers for HasCallStack constraints. This is necessary as we must support GHC 7.10.1 which lacks sane call stack support. We also introduce another constraint synonym, HasDebugCallStack, which only provides a call stack when DEBUG is set.
* utils: Provide CallStack to expectJustBen Gamari2016-04-151-1/+11
| | | | | | | | | | | | Test Plan: Validate Reviewers: gridaphobe, austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2106
* Handle unset HOME environment variable more gracefullyBen Gamari2016-03-111-1/+9
| | | | | | | | | | | | | | | Test Plan: * Validate * try `env -i ghc` * try `env -i runghc HelloWorld.hs` Reviewers: austin Subscribers: thomie, ezyang Differential Revision: https://phabricator.haskell.org/D1971 GHC Trac Issues: #11678
* Remove some redundant definitions/constraintsHerbert Valerio Riedel2015-12-311-2/+0
| | | | | | Starting with GHC 7.10 and base-4.8, `Monad` implies `Applicative`, which allows to simplify some definitions to exploit the superclass relationship. This a first refactoring to that end.
* Re-use `transformers`'s `MaybeT` rather than our ownHerbert Valerio Riedel2015-12-071-56/+4
| | | | | | | | | The now removed `MaybeT` type was originally added back in 2008 via bc845b714132a897032502536fea8cd018ce325b Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1583
* MonadFail proposal, phase 1David Luposchainsky2015-11-171-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | This implements phase 1 of the MonadFail proposal (MFP, #10751). - MonadFail warnings are all issued as desired, tunable with two new flags - GHC was *not* made warning-free with `-fwarn-missing-monadfail-warnings` (but it's disabled by default right now) Credits/thanks to - Franz Thoma, whose help was crucial to implementing this - My employer TNG Technology Consulting GmbH for partially funding us for this work Reviewers: goldfire, austin, #core_libraries_committee, hvr, bgamari, fmthoma Reviewed By: hvr, bgamari, fmthoma Subscribers: thomie Projects: #ghc Differential Revision: https://phabricator.haskell.org/D1248 GHC Trac Issues: #10751
* Make Monad/Applicative instances MRP-friendlyHerbert Valerio Riedel2015-10-171-11/+21
| | | | | | | | | | | | | | | | | | | | | | | | | This patch refactors pure/(*>) and return/(>>) in MRP-friendly way, i.e. such that the explicit definitions for `return` and `(>>)` match the MRP-style default-implementation, i.e. return = pure and (>>) = (*>) This way, e.g. all `return = pure` definitions can easily be grepped and removed in GHC 8.1; Test Plan: Harbormaster Reviewers: goldfire, alanz, bgamari, quchen, austin Reviewed By: quchen, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1312
* Package environmentsEdsko de Vries2015-01-131-3/+21
| | | | | | | | | | | | Summary: Package environments are files with package IDs that indicate which packages should be visible; see entry in user guide for details. Reviewers: duncan, austin Reviewed By: duncan, austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D558
* Comments onlySimon Peyton Jones2015-01-091-0/+1
|
* Remove redundant constraints in the compiler itself, found by ↵Simon Peyton Jones2015-01-061-0/+4
| | | | -fwarn-redundant-constraints
* compiler: de-lhs utils/Austin Seipp2014-12-031-0/+106
Signed-off-by: Austin Seipp <austin@well-typed.com>