ghc-hetmet.git
15 years agoDon't require Parser.y in a source dist 6_10_branch_has_been_forked
Ian Lynagh [Fri, 19 Sep 2008 11:58:31 +0000 (11:58 +0000)]
Don't require Parser.y in a source dist

15 years agoAdd HpcParser.hs to source dists
Ian Lynagh [Fri, 19 Sep 2008 11:58:16 +0000 (11:58 +0000)]
Add HpcParser.hs to source dists

15 years agoFix the list of generated files that need to go into the source dists
Ian Lynagh [Fri, 19 Sep 2008 11:25:22 +0000 (11:25 +0000)]
Fix the list of generated files that need to go into the source dists

15 years agoImprove documentation of overlapping instances
simonpj@microsoft.com [Fri, 19 Sep 2008 09:31:47 +0000 (09:31 +0000)]
Improve documentation of overlapping instances

15 years agoPut generated files in source dists
Ian Lynagh [Thu, 18 Sep 2008 19:44:24 +0000 (19:44 +0000)]
Put generated files in source dists
We don't want to require that users building source dists have alex/happy

15 years agoAdd libraries/syb to .darcs-boring
Ian Lynagh [Thu, 18 Sep 2008 19:01:16 +0000 (19:01 +0000)]
Add libraries/syb to .darcs-boring

15 years agoFix a couple of issues with :print
pepe [Thu, 18 Sep 2008 12:21:33 +0000 (12:21 +0000)]
Fix a couple of issues with :print

      - Ticket #1995: Unsoundness with newtypes
      - Ticket #2475: "Can't unify" error when stopped at an exception

      In addition this patch adds the following:

      - Unfailingness: RTTI cannot panic anymore.
        In case of failure, it recovers gracefully by returning the "I know nothing" type
      - A -ddump-rtti flag

16 years agowibble
pepe [Fri, 18 Apr 2008 17:23:03 +0000 (17:23 +0000)]
wibble

15 years agoRichTokenStream support
Chaddai Fouche [Thu, 18 Sep 2008 16:52:56 +0000 (16:52 +0000)]
RichTokenStream support

This patch adds support for raw token streams, that contain more
information than normal token streams (they contains comments at
least). The "lexTokenStream" function brings this support to the
Lexer module. In addition to that, functions have been added to
the GHC module to make easier to recover of the token stream of
a module ("getTokenStream").

Building on that, I added what could be called "rich token
stream": token stream to which have been added the source string
corresponding to each token, the function addSourceToToken takes
a StringBuffer and a starting SrcLoc and a token stream and build
this rich token stream. getRichTokenStream is a convenience
function to get a module rich token stream. "showRichTokenStream"
use the SrcLoc information in such a token stream to get a string
similar to the original source (except unsignificant
whitespaces). Thus "putStrLn . showRichTokenStream =<<
getRichTokenStream s mod" should print a valid module source, the
interesting part being to modify the token stream between the get
and the show of course.

15 years agoWhen passing gcc -B, also tell it where the mingw include directory is
Ian Lynagh [Thu, 18 Sep 2008 14:33:12 +0000 (14:33 +0000)]
When passing gcc -B, also tell it where the mingw include directory is

15 years agoDon't put the mingw directory in RTS's package.conf
Ian Lynagh [Thu, 18 Sep 2008 14:31:18 +0000 (14:31 +0000)]
Don't put the mingw directory in RTS's package.conf

15 years agoBe more forceful when cleaning in compiler/ and ghc/
Ian Lynagh [Thu, 18 Sep 2008 13:44:43 +0000 (13:44 +0000)]
Be more forceful when cleaning in compiler/ and ghc/
Now that the Cabal file is generated by configure, it would be nice
if clean worked even if the cabal file is missing. So now we just rm -rf
the dist directory.

15 years agoGenerate ghc.cabal and ghc-bin.cabal with configure
Ian Lynagh [Thu, 18 Sep 2008 13:36:36 +0000 (13:36 +0000)]
Generate ghc.cabal and ghc-bin.cabal with configure
This allows us to put the proper version number into them

15 years agoMake the ghci scripts point to the versioned GHC program, not just "ghc"
Ian Lynagh [Thu, 18 Sep 2008 12:25:16 +0000 (12:25 +0000)]
Make the ghci scripts point to the versioned GHC program, not just "ghc"

15 years agoFix Trac #1470: improve handling of recursive instances (needed for SYB3)
simonpj@microsoft.com [Thu, 18 Sep 2008 16:17:19 +0000 (16:17 +0000)]
Fix Trac #1470: improve handling of recursive instances (needed for SYB3)

This bug has been hanging around for a long time, as you'll see by its
number. The fix implements a feature that is really needed by SYB3, to
allow an instance to (rather indirectly) refer to itself.  The trickiness
comes when solving the superclass constraints.

The whoel issue is explained in Note [Recursive instances and superclases]
in TcSimplify.

In cracking this one I found I could remove the WantSCs argument to the
ReduceMe flag, which is a worthwhile simplification.  Good!

15 years agoComments only
simonpj@microsoft.com [Thu, 18 Sep 2008 15:56:02 +0000 (15:56 +0000)]
Comments only

15 years agoReplace ASSERT with WARN, and explain why
simonpj@microsoft.com [Thu, 18 Sep 2008 15:52:45 +0000 (15:52 +0000)]
Replace ASSERT with WARN, and explain why

The DPH library tripped an ASSERT.  The code is actually OK, but it's
badly-optimised so I changed it to WARN.  The issue here is explained
in ClosureInfo, Note [Unsafe coerce complications].

15 years agoAdd a missing "prime" (env' --> env'') thereby fixing a tripping WARN. Hurrah!
simonpj@microsoft.com [Thu, 18 Sep 2008 15:51:44 +0000 (15:51 +0000)]
Add a missing "prime" (env' --> env'') thereby fixing a tripping WARN.  Hurrah!

15 years agoFix nasty infelicity: do not short-cut empty substitution in the simplifier
simonpj@microsoft.com [Wed, 17 Sep 2008 16:29:10 +0000 (16:29 +0000)]
Fix nasty infelicity: do not short-cut empty substitution in the simplifier

I was perplexed about why an arity-related WARN was tripping. It took
me _day_ (sigh) to find that it was because SimplEnv.substExpr was taking
a short cut when the substitution was empty, thereby not subsituting for
Ids in scope, which must be done (CoreSubst Note [Extending the Subst]).

The fix is a matter of deleting the "optimisation".  Same with
CoreSubst.substSpec, although I don't know if that actually caused a
probem.

15 years agoAvoid arity reduction when doing eta-reduce
simonpj@microsoft.com [Wed, 17 Sep 2008 16:27:04 +0000 (16:27 +0000)]
Avoid arity reduction when doing eta-reduce

We like things with high arity, so when doing eta reduction
it's probably a good idea to avoid reducing arity.

15 years agoAdd extra WARN test
simonpj@microsoft.com [Wed, 17 Sep 2008 16:24:34 +0000 (16:24 +0000)]
Add extra WARN test

This warning tests that the arity of a function does not decrease.
And that it's at least as great as the strictness signature.

Failing this test isn't a disater, but it's distinctly odd and
usually indicates that not enough information is getting propagated
around, and hence you may get more simplifier iterations.

15 years agoComments only
simonpj@microsoft.com [Wed, 17 Sep 2008 16:23:50 +0000 (16:23 +0000)]
Comments only

15 years agoRe-adjust interaction between -ddump flags and force-recompilation
simonpj@microsoft.com [Wed, 17 Sep 2008 16:19:20 +0000 (16:19 +0000)]
Re-adjust interaction between -ddump flags and force-recompilation

If you say -ddump-xx we effectively add -fforce-recomp, so that you
see your dump output.  But this works badly in --make mode, because
you get the ddump output for every module, which is probably not what
you want.  This patch forces recompilation with -ddump-X only in one-shot
mode.

Of course, this only affects people using -ddump options.

15 years agoAdd Outputable GhcMode instance
simonpj@microsoft.com [Wed, 17 Sep 2008 16:18:47 +0000 (16:18 +0000)]
Add Outputable GhcMode instance

15 years agoImprove error reporting for 'deriving' (Trac #2604)
simonpj@microsoft.com [Wed, 17 Sep 2008 13:51:04 +0000 (13:51 +0000)]
Improve error reporting for 'deriving' (Trac #2604)

15 years agoAdd link to GADT paper re rigid types
simonpj@microsoft.com [Tue, 16 Sep 2008 09:45:21 +0000 (09:45 +0000)]
Add link to GADT paper re rigid types

15 years agoFix MacOS X build: don't believe __GNUC_GNU_INLINE__ on MacOS X
Simon Marlow [Thu, 18 Sep 2008 11:28:56 +0000 (11:28 +0000)]
Fix MacOS X build: don't believe __GNUC_GNU_INLINE__ on MacOS X

15 years agorequire Alex version 2.1.0
Simon Marlow [Thu, 18 Sep 2008 11:28:12 +0000 (11:28 +0000)]
require Alex version 2.1.0
Having 2.0.1 causes some unicode tests to fail

15 years agoType families: fixes in the new solver
Manuel M T Chakravarty [Thu, 18 Sep 2008 10:09:34 +0000 (10:09 +0000)]
Type families: fixes in the new solver

15 years agoext-core library: Parser fixes; make it build with the HEAD
Tim Chevalier [Thu, 18 Sep 2008 09:03:49 +0000 (09:03 +0000)]
ext-core library: Parser fixes; make it build with the HEAD

In the ext-core parser I guess I never tested:
* existential type variable bindings in case alts
* empty data declarations

That'll learn me!

15 years agoWibble ghc-pkg imports to fix building on Windows
Ian Lynagh [Wed, 17 Sep 2008 21:08:13 +0000 (21:08 +0000)]
Wibble ghc-pkg imports to fix building on Windows

15 years agoghc-pkg needs to make package.conf with sensible permissions
Ian Lynagh [Wed, 17 Sep 2008 19:21:55 +0000 (19:21 +0000)]
ghc-pkg needs to make package.conf with sensible permissions
It was calling openTempFile which uses a 600 permissions mask.

15 years agoChange 'loadWithCompiler' callback argument to just print warnings.
Thomas Schilling [Wed, 17 Sep 2008 10:29:25 +0000 (10:29 +0000)]
Change 'loadWithCompiler' callback argument to just print warnings.
Rename function accordingly.

The callback wasn't very flexible to begin with.  There's pretty much
no way around to calling 'compile' inside that callback since
'upsweep' depends on certain side effects of compile.  It therefore
makes more sense to restrict the callback to its intended use only,
namely to log warnings and errors.

15 years agoFix: GhcStage2HcOpts were being added to stage 3 too
Simon Marlow [Wed, 17 Sep 2008 08:59:17 +0000 (08:59 +0000)]
Fix: GhcStage2HcOpts were being added to stage 3 too

15 years agoType families: unify with family apps in checking mode
Manuel M T Chakravarty [Wed, 17 Sep 2008 06:25:48 +0000 (06:25 +0000)]
Type families: unify with family apps in checking mode

15 years agoType families: bug fixes
Manuel M T Chakravarty [Tue, 16 Sep 2008 15:12:54 +0000 (15:12 +0000)]
Type families: bug fixes

15 years agoKeep sysnonyms folded in equalities if possible
Manuel M T Chakravarty [Tue, 16 Sep 2008 07:57:00 +0000 (07:57 +0000)]
Keep sysnonyms folded in equalities if possible

15 years agoType families: apply flattening coercions in the right order
Manuel M T Chakravarty [Tue, 16 Sep 2008 05:51:36 +0000 (05:51 +0000)]
Type families: apply flattening coercions in the right order

15 years agoTcTyFuns: tidy warning
Manuel M T Chakravarty [Mon, 15 Sep 2008 03:14:23 +0000 (03:14 +0000)]
TcTyFuns: tidy warning

15 years agoSignature for Inst.isValidWantedEqInst
Manuel M T Chakravarty [Mon, 15 Sep 2008 03:01:18 +0000 (03:01 +0000)]
Signature for Inst.isValidWantedEqInst

15 years agoRemember if RewriteInst is swapped & bug fixes
Manuel M T Chakravarty [Sun, 14 Sep 2008 16:36:39 +0000 (16:36 +0000)]
Remember if RewriteInst is swapped & bug fixes

15 years agoType families: fixed all non-termination in the testsuite
Manuel M T Chakravarty [Sun, 14 Sep 2008 12:06:38 +0000 (12:06 +0000)]
Type families: fixed all non-termination in the testsuite

15 years agoType families: completed the new equality solver
Manuel M T Chakravarty [Sat, 13 Sep 2008 13:36:31 +0000 (13:36 +0000)]
Type families: completed the new equality solver
- Implements normalisation of class constraints containing synonym family
  applications or skolems refined by local equalities.
- Clean up of TcSimplify.reduceContext by using the new equality solver.
- Removed all the now unused code of the old algorithm.
- This completes the implementation of the new algorithm, but it is largely
  untested => many regressions.

15 years agoUse the new -optdep flag replacements when building with >= GHC 6.9
Ian Lynagh [Tue, 16 Sep 2008 22:00:57 +0000 (22:00 +0000)]
Use the new -optdep flag replacements when building with >= GHC 6.9
Fix building the HEAD with itself

15 years agoUse "exec" when running ghc in the wrapper
Ian Lynagh [Mon, 15 Sep 2008 10:02:17 +0000 (10:02 +0000)]
Use "exec" when running ghc in the wrapper

15 years agoAdd "#!/bin/sh" to runghc.wrapper
Ian Lynagh [Sun, 14 Sep 2008 15:35:07 +0000 (15:35 +0000)]
Add "#!/bin/sh" to runghc.wrapper

15 years agoAdd a "#!/bin/sh" to ghc.wrapper
Ian Lynagh [Sun, 14 Sep 2008 15:33:44 +0000 (15:33 +0000)]
Add a "#!/bin/sh" to ghc.wrapper

15 years agoFixing directory creation to not create "" directories inside hpc report (harmless...
andygill@ku.edu [Tue, 16 Sep 2008 17:23:13 +0000 (17:23 +0000)]
Fixing directory creation to not create "" directories inside hpc report (harmless but needless)

15 years agoFix Trac #2052 Allowing hpc to understand hsc files.
andygill@ku.edu [Tue, 16 Sep 2008 03:05:21 +0000 (03:05 +0000)]
Fix Trac #2052 Allowing hpc to understand hsc files.

15 years agoFix Trac #2311: creates subdirs for package coverage information
andygill@ku.edu [Mon, 15 Sep 2008 20:43:22 +0000 (20:43 +0000)]
Fix Trac #2311: creates subdirs for package coverage information

15 years agoFIX #2469: sort out our static/extern inline story
Simon Marlow [Tue, 16 Sep 2008 13:22:22 +0000 (13:22 +0000)]
FIX #2469: sort out our static/extern inline story
gcc has changed the meaning of "extern inline" when certain flags are
on (e.g. --std=gnu99), and this broke our use of it in the header
files.

15 years agoFix a warning
Simon Marlow [Tue, 16 Sep 2008 13:09:22 +0000 (13:09 +0000)]
Fix a warning

15 years agoStop using mremap() to allocate space for trampolines
Simon Marlow [Mon, 15 Sep 2008 14:59:24 +0000 (14:59 +0000)]
Stop using mremap() to allocate space for trampolines

This was causing problems because sometimes mremap() moved the memory
we had allocated from the low 2Gb to above the 2Gb boundary, causing
some linkages to fail.  There's no MAP_32BIT flag to mremap().

So now we just use mmap(MAP_ANON|MAP_32BIT) to allocated space for the
trampolines.  People without MAP_32BIT (eg. *BSD) will still have to
do something else here, such as allocating memory from a fixed
address; so I've made it slightly easier for those guys, but there's
still work to do (#2063).

One solution (that Simon PJ is advocating) is to turn on -fPIC by
default on x86-64.  This is a good solution as it removes the need for
MAP_32BIT, but doesn't work with -fvia-C, so probably this is for
later.

15 years agoadd $(GhcStage[123]HcOpts)
Simon Marlow [Fri, 12 Sep 2008 15:55:49 +0000 (15:55 +0000)]
add $(GhcStage[123]HcOpts)

15 years agoImprove handling of -fdph-* flags
Roman Leshchinskiy [Tue, 16 Sep 2008 03:47:46 +0000 (03:47 +0000)]
Improve handling of -fdph-* flags

15 years agoAdd -fdph-this
Roman Leshchinskiy [Tue, 16 Sep 2008 03:37:10 +0000 (03:37 +0000)]
Add -fdph-this

15 years agoRemove last traces of package ndp
Roman Leshchinskiy [Tue, 16 Sep 2008 03:34:28 +0000 (03:34 +0000)]
Remove last traces of package ndp

15 years agoClean up vectorisation error messages
Roman Leshchinskiy [Tue, 16 Sep 2008 01:32:36 +0000 (01:32 +0000)]
Clean up vectorisation error messages

15 years agoFix vectoriser bug
Roman Leshchinskiy [Mon, 15 Sep 2008 04:28:23 +0000 (04:28 +0000)]
Fix vectoriser bug

We were using mkWildId in situations where it cause disastrous shadowing

15 years agoTrack changes to dph
Roman Leshchinskiy [Fri, 12 Sep 2008 11:40:28 +0000 (11:40 +0000)]
Track changes to dph

15 years agoChange desugaring of PArr literals
Roman Leshchinskiy [Fri, 12 Sep 2008 01:56:09 +0000 (01:56 +0000)]
Change desugaring of PArr literals

15 years agoExpose the dph packages automatically if -dph-* is set
Roman Leshchinskiy [Fri, 12 Sep 2008 00:44:03 +0000 (00:44 +0000)]
Expose the dph packages automatically if -dph-* is set

15 years agoDon't panic on non-vectorisable expressions
Roman Leshchinskiy [Thu, 11 Sep 2008 05:43:33 +0000 (05:43 +0000)]
Don't panic on non-vectorisable expressions

15 years ago-Odph implies -fno-spec-constr-count
Roman Leshchinskiy [Wed, 10 Sep 2008 04:53:39 +0000 (04:53 +0000)]
-Odph implies -fno-spec-constr-count

15 years agoImprove warning for SpecConstr
simonpj@microsoft.com [Mon, 15 Sep 2008 15:49:08 +0000 (15:49 +0000)]
Improve warning for SpecConstr

15 years agoWhite space only
simonpj@microsoft.com [Mon, 15 Sep 2008 15:48:41 +0000 (15:48 +0000)]
White space only

15 years agoMinor refactoring to get rid of Type.splitNewTyConApp
simonpj@microsoft.com [Mon, 15 Sep 2008 07:29:46 +0000 (07:29 +0000)]
Minor refactoring to get rid of Type.splitNewTyConApp

15 years agoRefactor the desugaring of RULE lhss a bit
simonpj@microsoft.com [Mon, 15 Sep 2008 15:06:01 +0000 (15:06 +0000)]
Refactor the desugaring of RULE lhss a bit

This is just a tidy-up.  Previously we were calling occurAnalyse
twice on each LHS which was silly and a bit unclean too.

This patch should have no overall effect, though.

15 years agoDo not use the Static Arg Transformation by default with -O2
simonpj@microsoft.com [Mon, 15 Sep 2008 15:04:33 +0000 (15:04 +0000)]
Do not use the Static Arg Transformation by default with -O2

Max has some more heuristics to add, and is meanwhile worried
that having SAT on by default will make some highly-tuned array
programs worse.  So it's off by default.

Use -fstatic-argument-transformation to switch it on.

15 years agoComments, and a couple of asserts, only
simonpj@microsoft.com [Sun, 14 Sep 2008 11:46:41 +0000 (11:46 +0000)]
Comments, and a couple of asserts, only

15 years agoFix Trac #2587: take account of type lets
simonpj@microsoft.com [Sun, 14 Sep 2008 11:34:34 +0000 (11:34 +0000)]
Fix Trac #2587: take account of type lets

GHC allows a non-recursive let for type varaibles
let a = TYPE ty in ...
But the free-variable finder had not caught up with this
fact. This patch catches up.

15 years agoDon't try to float type-lets
simonpj@microsoft.com [Sun, 14 Sep 2008 11:33:24 +0000 (11:33 +0000)]
Don't try to float type-lets

A type let shouldn't really occur in SetLevels, but if it does,
this patch makes sure it is left alone.

15 years agoadd refs and fix a bug (noted by Peter Gammie) in docs of arrow notation
Ross Paterson [Mon, 15 Sep 2008 10:47:57 +0000 (10:47 +0000)]
add refs and fix a bug (noted by Peter Gammie) in docs of arrow notation

15 years agoGeneralise type of 'withExtendedLinkEnv'.
Thomas Schilling [Mon, 15 Sep 2008 08:57:38 +0000 (08:57 +0000)]
Generalise type of 'withExtendedLinkEnv'.

15 years agoUse 'GhcMonad' in ghci/InteractiveUI.
Thomas Schilling [Mon, 15 Sep 2008 08:56:33 +0000 (08:56 +0000)]
Use 'GhcMonad' in ghci/InteractiveUI.

15 years agoUse 'GhcMonad' in ghci/GhciTags.
Thomas Schilling [Mon, 15 Sep 2008 08:49:22 +0000 (08:49 +0000)]
Use 'GhcMonad' in ghci/GhciTags.

15 years agoUse 'GhcMonad' in ghci/Debugger.
Thomas Schilling [Mon, 15 Sep 2008 08:47:38 +0000 (08:47 +0000)]
Use 'GhcMonad' in ghci/Debugger.

15 years agoUse 'GhcMonad' in ghci/GhciMonad.
Thomas Schilling [Mon, 15 Sep 2008 08:46:46 +0000 (08:46 +0000)]
Use 'GhcMonad' in ghci/GhciMonad.

15 years agoUse 'GhcMonad' in ghc/Main.
Thomas Schilling [Sun, 14 Sep 2008 23:29:57 +0000 (23:29 +0000)]
Use 'GhcMonad' in ghc/Main.

15 years agoRequire PatternSignatures for bootstrapping compiler.
Thomas Schilling [Sun, 14 Sep 2008 23:26:42 +0000 (23:26 +0000)]
Require PatternSignatures for bootstrapping compiler.

15 years agoUse 'GhcMonad' in InteractiveEval.
Thomas Schilling [Sun, 14 Sep 2008 23:24:54 +0000 (23:24 +0000)]
Use 'GhcMonad' in InteractiveEval.

15 years agoUse 'GhcMonad' in GHC and split up checkModule into phases.
Thomas Schilling [Sun, 14 Sep 2008 23:20:44 +0000 (23:20 +0000)]
Use 'GhcMonad' in GHC and split up checkModule into phases.

I'm not sure I covered all the ways of throwing errors in the code.
Some functions throw ProgramErrors, some error messages.  It's still
quite a mess, but we're getting closer.  The missing cases are mostly
errors that cannot be fixed by the API client either or are a result
of wrong usage, so are in any case fatal.

One function, 'getModuleInfo', still returns a 'Maybe', but the
documentation suggests it should always succeed.  So I may change that
soon.

The spit-up of of 'checkModule' has pros and cons.  The various forms
of 'checkModule*' now become:

 checkAndLoadModule ms False ~~>
    loadModule =<< typecheckModule =<< parseModule (ms_mod_name ms)

 checkAndLoadModule ms True ~~>
   loadModule =<< desugarModule =<< typecheckModule =<< parseModule (ms_mod_name ms)

 checkModule mn False ~~>
   typecheckModule =<< parseModule mn

 checkModule mn True ~~>
   desugarModule =<< typecheckModule =<< parseModule mn

The old APIs cannot easily be provided, since the result type would be
different depending on the second argument.  However, a more
convenient API can be modelled on top of these four functions
({parse,typecheck,desugar,load}Module).

15 years agoUse 'GhcMonad' in DriverPipeline. Also haddockify a bit while we're at it.
Thomas Schilling [Sun, 14 Sep 2008 22:06:28 +0000 (22:06 +0000)]
Use 'GhcMonad' in DriverPipeline.  Also haddockify a bit while we're at it.

15 years agoUse 'GhcMonad' in HscMain.
Thomas Schilling [Sun, 14 Sep 2008 21:36:55 +0000 (21:36 +0000)]
Use 'GhcMonad' in HscMain.

15 years agoUse 'GhcMonad' in DriverMkDepend.
Thomas Schilling [Sun, 14 Sep 2008 21:21:13 +0000 (21:21 +0000)]
Use 'GhcMonad' in DriverMkDepend.

15 years agoHaddockify DynFlags (partial).
Thomas Schilling [Sun, 14 Sep 2008 21:17:18 +0000 (21:17 +0000)]
Haddockify DynFlags (partial).

15 years agoHaddockify 'IE'.
Thomas Schilling [Sun, 14 Sep 2008 21:00:16 +0000 (21:00 +0000)]
Haddockify 'IE'.

15 years agoProvide accessors for 'ImportDecl'.
Thomas Schilling [Sun, 14 Sep 2008 20:58:11 +0000 (20:58 +0000)]
Provide accessors for 'ImportDecl'.

15 years agoStart haddockifying 'HsBindLR'.
Thomas Schilling [Sun, 14 Sep 2008 20:56:29 +0000 (20:56 +0000)]
Start haddockifying 'HsBindLR'.

15 years agoDocument 'parseStaticFlags'.
Thomas Schilling [Sun, 14 Sep 2008 20:53:16 +0000 (20:53 +0000)]
Document 'parseStaticFlags'.

15 years agoIntroduce 'GhcMonad' class and two default implementations 'Ghc' and 'GhcT'.
Thomas Schilling [Sun, 14 Sep 2008 20:49:30 +0000 (20:49 +0000)]
Introduce 'GhcMonad' class and two default implementations 'Ghc' and 'GhcT'.

This monad will be required by most public API calls.

15 years agoGive the "Failing due to -Werror" message a name.
Thomas Schilling [Sun, 14 Sep 2008 17:39:04 +0000 (17:39 +0000)]
Give the "Failing due to -Werror" message a name.

15 years agoMake typechecker top-level functions also return messages instead of
Thomas Schilling [Sun, 14 Sep 2008 17:32:28 +0000 (17:32 +0000)]
Make typechecker top-level functions also return messages instead of
printing them.

15 years agoReflect changes of desugarer error reporting in VectMonad.
Thomas Schilling [Sun, 14 Sep 2008 17:27:11 +0000 (17:27 +0000)]
Reflect changes of desugarer error reporting in VectMonad.

15 years agoGeneralise 'handleGhcException' to work with any 'ExceptionMonad'.
Thomas Schilling [Sun, 14 Sep 2008 17:24:04 +0000 (17:24 +0000)]
Generalise 'handleGhcException' to work with any 'ExceptionMonad'.

15 years agoIntroduce an 'ExceptionMonad' class.
Thomas Schilling [Sun, 14 Sep 2008 17:21:54 +0000 (17:21 +0000)]
Introduce an 'ExceptionMonad' class.

This monad provides variants of 'catch', 'bracket', and 'finally', so
exceptions can be handled in monads that wrap IO.  The latter two
methods need to be part of the class definition, because GHC uses
'block' and 'unblock' which are used in the definition of those two
methods for the IO monad.  A perhaps better class interface would
consist of 'gcatch', 'gblock', and 'gunblock' and let the latter two
default to 'id' like is done for non-GHC implementations of 'bracket'
and 'finally'.

15 years agoProvide default MonadIO instance for IO.
Thomas Schilling [Sun, 14 Sep 2008 16:42:45 +0000 (16:42 +0000)]
Provide default MonadIO instance for IO.

15 years agoReturn instead of print warnings and errors in desugarer.
Thomas Schilling [Sun, 14 Sep 2008 16:36:41 +0000 (16:36 +0000)]
Return instead of print warnings and errors in desugarer.

15 years agoReturn parser errors and warnings instead of dying.
Thomas Schilling [Sun, 14 Sep 2008 16:26:44 +0000 (16:26 +0000)]
Return parser errors and warnings instead of dying.

15 years agoAdd aliases for bags of warnings and errors.
Thomas Schilling [Sun, 14 Sep 2008 16:03:37 +0000 (16:03 +0000)]
Add aliases for bags of warnings and errors.