ghc.git
6 years agoRefine fix for #7667.
Richard Eisenberg [Mon, 21 Oct 2013 14:10:24 +0000 (10:10 -0400)] 
Refine fix for #7667.

Now, we allow types that do not begin with ':', but we retain other
checks on variable names.

6 years agoFix Trac #8455.
Richard Eisenberg [Mon, 21 Oct 2013 13:52:30 +0000 (09:52 -0400)] 
Fix Trac #8455.

This was quite simple -- just use mkIntegerExpr instead of mkIntExpr.

6 years agoNormalise the type when generating do-bind warnings (Trac #8470)
Simon Peyton Jones [Wed, 23 Oct 2013 11:12:39 +0000 (12:12 +0100)] 
Normalise the type when generating do-bind warnings (Trac #8470)

This was easy to do, except that the desugar monad needs a
FamInstEnv init.  Straightforward, routine, albeit a bit clunky.

6 years agoFix Trac #8448
Simon Peyton Jones [Wed, 23 Oct 2013 11:10:48 +0000 (12:10 +0100)] 
Fix Trac #8448

We weren't dealing with built-in syntax; data constructors
that are built-in syntax (only [] actually) don't appear
in the GlobalRdrEnv

6 years agoRename topNormaliseType to topNormaliseType_maybe
Simon Peyton Jones [Wed, 23 Oct 2013 11:09:33 +0000 (12:09 +0100)] 
Rename topNormaliseType to topNormaliseType_maybe
and add new, simpler topNormaliseType

This is just a minor refactoring

6 years agos/excpetions/exceptions/
Edward Z. Yang [Mon, 21 Oct 2013 19:59:35 +0000 (12:59 -0700)] 
s/excpetions/exceptions/

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agoMore comments about stack layout
Simon Peyton Jones [Fri, 18 Oct 2013 21:29:57 +0000 (22:29 +0100)] 
More comments about stack layout

6 years agoComments only
Jan Stolarek [Fri, 18 Oct 2013 16:18:27 +0000 (18:18 +0200)] 
Comments only

6 years agoImprove control flow optimisation algorithm
Jan Stolarek [Fri, 18 Oct 2013 15:43:55 +0000 (17:43 +0200)] 
Improve control flow optimisation algorithm

Fixes #8456. Previous version of control flow optimisations
did not update the list of block predecessors, leading to
unnecessary duplication of blocks in some cases. See Trac
and comments in the code for more details.

6 years agoTrailing whitespaces
Jan Stolarek [Thu, 17 Oct 2013 13:53:17 +0000 (15:53 +0200)] 
Trailing whitespaces

6 years agoClarify comments and liberalise stack-check optimisation slightly
Simon Peyton Jones [Fri, 18 Oct 2013 13:35:07 +0000 (14:35 +0100)] 
Clarify comments and liberalise stack-check optimisation slightly

The only substantive change here is to change "==" into ">=" in
the Note [Always false stack check] code.  This is semantically
correct, but won't have any practical impact.

6 years agoComments about control-flow optimisation
Simon Peyton Jones [Fri, 18 Oct 2013 12:51:56 +0000 (13:51 +0100)] 
Comments about control-flow optimisation

6 years agoComments (about the stack overflow check) only
Simon Peyton Jones [Fri, 18 Oct 2013 12:04:33 +0000 (13:04 +0100)] 
Comments (about the stack overflow check) only

6 years agoTrailing whitespace only
Simon Peyton Jones [Thu, 17 Oct 2013 16:01:58 +0000 (17:01 +0100)] 
Trailing whitespace only

6 years agoWhen de-serialising interfaces, need to distinguish types from kinds
Simon Peyton Jones [Thu, 17 Oct 2013 15:59:57 +0000 (16:59 +0100)] 
When de-serialising interfaces, need to distinguish types from kinds

This patches fixes two separate instances of the bug,

 * one in tc_ax_branches (Trac #8449)

 * one in type/kind applications in IfaceExpr
   (hence the new tcIfaceApps)

The latter was reported by Iavor, no ticket

6 years agoComments only
Simon Peyton Jones [Thu, 17 Oct 2013 14:18:17 +0000 (15:18 +0100)] 
Comments only

6 years agoComments only
Simon Peyton Jones [Thu, 10 Oct 2013 09:53:41 +0000 (10:53 +0100)] 
Comments only

6 years agoOptimise stack checks that are always false
Jan Stolarek [Thu, 17 Oct 2013 21:17:06 +0000 (23:17 +0200)] 
Optimise stack checks that are always false

Fix a bug introduced in 94125c97e49987e91fa54da6c86bc6d17417f5cf.
See Note [Always false stack check]

6 years agoAdd typed Template Haskell details to the release notes.
Geoffrey Mainland [Thu, 17 Oct 2013 19:21:58 +0000 (15:21 -0400)] 
Add typed Template Haskell details to the release notes.

6 years agoDocument new typed Template Haskell features.
Geoffrey Mainland [Thu, 17 Oct 2013 19:21:38 +0000 (15:21 -0400)] 
Document new typed Template Haskell features.

6 years agoSupport the syntax [e||...||] for typed expression brackets.
Geoffrey Mainland [Thu, 17 Oct 2013 18:09:01 +0000 (14:09 -0400)] 
Support the syntax [e||...||] for typed expression brackets.

6 years agoFix typo
Geoffrey Mainland [Thu, 17 Oct 2013 18:08:44 +0000 (14:08 -0400)] 
Fix typo

6 years agoCorrect release notes about SIMD support.
Geoffrey Mainland [Thu, 17 Oct 2013 18:04:53 +0000 (14:04 -0400)] 
Correct release notes about SIMD support.

6 years agoDocument -c in hp2hs(1)
Joachim Breitner [Thu, 17 Oct 2013 07:41:35 +0000 (09:41 +0200)] 
Document -c in hp2hs(1)

This fixes #8452.

6 years agoMinor code refactoring in HscMain
Jan Stolarek [Wed, 16 Oct 2013 11:23:23 +0000 (13:23 +0200)] 
Minor code refactoring in HscMain

Compiled HscMain.o is now smaller.

6 years agoTrailing whitespaces
Jan Stolarek [Wed, 16 Oct 2013 11:23:03 +0000 (13:23 +0200)] 
Trailing whitespaces

6 years agoRemove unused code
Jan Stolarek [Wed, 16 Oct 2013 11:12:12 +0000 (13:12 +0200)] 
Remove unused code

I am removing old loopification code that has been commented out
for long long time. We now have loopification implemented in
the code generator (see Note [Self-recursive tail calls]) so we
won't need to resurect this old code.

6 years agoTrailing whitespaces
Jan Stolarek [Wed, 16 Oct 2013 11:11:52 +0000 (13:11 +0200)] 
Trailing whitespaces

6 years agoGenerate (old + 0) instead of Sp in stack checks
Jan Stolarek [Wed, 16 Oct 2013 07:45:56 +0000 (09:45 +0200)] 
Generate (old + 0) instead of Sp in stack checks

When compiling a function we can determine how much stack space it will
use. We therefore need to perform only a single stack check at the beginning
of a function to see if we have enough stack space. Instead of referring
directly to Sp - as we used to do in the past - the code generator uses
(old + 0) in the stack check. Stack layout phase turns (old + 0) into Sp.

The idea here is that, while we need to perform only one stack check for
each function, we could in theory place more stack checks later in the
function. They would be redundant, but not incorrect (in a sense that they
should not change program behaviour). We need to make sure however that a
stack check inserted after incrementing the stack pointer checks for a
respectively smaller stack space. This would not be the case if the code
generator produced direct references to Sp. By referencing (old + 0) we make
sure that we always check for a correct amount of stack: when converting
(old + 0) to Sp the stack layout phase takes into account changes already
made to stack pointer. The idea for this change came from observations made
while debugging #8275.

6 years agoImprove documentation (Related to #8447)
Iavor S. Diatchki [Wed, 16 Oct 2013 09:33:49 +0000 (02:33 -0700)] 
Improve documentation (Related to #8447)

6 years agoUpdate `Cabal` to 1.18.1.1 final
Herbert Valerio Riedel [Wed, 16 Oct 2013 06:54:28 +0000 (08:54 +0200)] 
Update `Cabal` to 1.18.1.1 final

6 years agoAdded comments to BooleanFormula to explain the expression simplifier. (#7633)
Twan van Laarhoven [Tue, 15 Oct 2013 19:38:58 +0000 (20:38 +0100)] 
Added comments to BooleanFormula to explain the expression simplifier. (#7633)

6 years agoTrivial comment fix. (#8358)
Zac Slade [Wed, 25 Sep 2013 21:36:59 +0000 (16:36 -0500)] 
Trivial comment fix. (#8358)

Version of Happy required is now 1.19.

6 years agoFix Trac #7667.
Richard Eisenberg [Mon, 14 Oct 2013 19:00:33 +0000 (15:00 -0400)] 
Fix Trac #7667.

We no longer check capitalization (or colons) in names that come
from TH, according to the commentary in #7667.

6 years agoTypo in manual
Krzysztof Gogolewski [Tue, 15 Oct 2013 16:42:52 +0000 (18:42 +0200)] 
Typo in manual

Remove remains of old role syntax

6 years agoWeaken the improvement for subtraction.
Iavor S. Diatchki [Tue, 15 Oct 2013 16:43:39 +0000 (09:43 -0700)] 
Weaken the improvement for subtraction.

For details see the comment on `interactTopSub`.

6 years agoUpdate `haskeline` library to latest HEAD
Herbert Valerio Riedel [Sat, 12 Oct 2013 20:09:58 +0000 (22:09 +0200)] 
Update `haskeline` library to latest HEAD

This is actually a no-op wrt the source-code and is only performed to show
that upstream is identical to our lagged repository.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoReject negative type-level integers created via TH (#8412)
Krzysztof Gogolewski [Sat, 5 Oct 2013 15:21:44 +0000 (17:21 +0200)] 
Reject negative type-level integers created via TH (#8412)

This commit moves the check from parser to renamer.

6 years agoTypos
Krzysztof Gogolewski [Sat, 12 Oct 2013 16:39:54 +0000 (18:39 +0200)] 
Typos

6 years agoAdd rts_isDynamic to the linker symbol list
Austin Seipp [Sat, 12 Oct 2013 14:50:53 +0000 (09:50 -0500)] 
Add rts_isDynamic to the linker symbol list

Spotted by Bertram Felgenhauer.

Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoFix building RtsProbes.d on Mac OS X 10.9 (#8139)
Darin Morrison [Thu, 26 Sep 2013 06:32:17 +0000 (00:32 -0600)] 
Fix building RtsProbes.d on Mac OS X 10.9 (#8139)

Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoFix mkdirhier.sh on OS X 10.9 (#8139)
Darin Morrison [Thu, 26 Sep 2013 06:08:28 +0000 (00:08 -0600)] 
Fix mkdirhier.sh on OS X 10.9 (#8139)

Mac OS X 10.9 mkdir is apparently stricter than the Mac OS X 10.8
mkdir about which paths are considered valid arguments. For example,
in a typical build on Mac OS X 10.9, the first of the following
invocations of mkdirhier.sh will succeed but the second will fail:

"inplace/bin/mkdirhier"   utils/ghc-cabal/dist/build/tmp//.  # WORKS
"inplace/bin/mkdirhier"   bootstrapping/.                    # FAILS

Simply prefixing the path arguments with "./" causes both to succeed:

"inplace/bin/mkdirhier" ./utils/ghc-cabal/dist/build/tmp//.  # WORKS
"inplace/bin/mkdirhier" ./bootstrapping/.                    # WORKS

Testing indicates failure on paths satisfying all of these criteria:

- path is suffixed with "/."
- path is only 1 level deep (e.g., "foo/."; _not_ "foo/bar/.")
- path is _not_ prefixed with "./"

This workaround prefixes "./" to the path argument passed to mkdir.

Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoAdd machinery to reify annotations (#8397)
Austin Seipp [Sat, 12 Oct 2013 03:18:41 +0000 (22:18 -0500)] 
Add machinery to reify annotations (#8397)

Authored-by: Gergely Risko <gergely@risko.hu>
Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoRemove outdated comment (#8434)
Austin Seipp [Sat, 12 Oct 2013 03:05:37 +0000 (22:05 -0500)] 
Remove outdated comment (#8434)

Authored-by: Gergely Risko <gergely@risko.hu>
Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoDo not copy stack after stack overflow, fixes #8435
Edward Z. Yang [Sat, 12 Oct 2013 00:01:00 +0000 (17:01 -0700)] 
Do not copy stack after stack overflow, fixes #8435

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agoFix freezing on bare ')' with alternative layout rule (#8431)
Krzysztof Gogolewski [Sat, 12 Oct 2013 02:15:17 +0000 (04:15 +0200)] 
Fix freezing on bare ')' with alternative layout rule (#8431)

Patch by errge

6 years agoMake MO_Prefetch_Data a no-op in the C backend (#8437).
Reid Barton [Fri, 11 Oct 2013 22:57:50 +0000 (09:57 +1100)] 
Make MO_Prefetch_Data a no-op in the C backend (#8437).

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoIf exceptions are blocked, add stack overflow to blocked exceptions list. Fixes ...
Edward Z. Yang [Fri, 11 Oct 2013 01:37:32 +0000 (18:37 -0700)] 
If exceptions are blocked, add stack overflow to blocked exceptions list. Fixes #8303.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agoReject spurious \end{code} in literate mode (#8430)
Krzysztof Gogolewski [Fri, 11 Oct 2013 22:52:27 +0000 (00:52 +0200)] 
Reject spurious \end{code} in literate mode (#8430)

6 years agoUpdate Cabal to current upstream `1.18` branch tip
Herbert Valerio Riedel [Fri, 11 Oct 2013 20:34:31 +0000 (22:34 +0200)] 
Update Cabal to current upstream `1.18` branch tip

This is mainly to relax the `array` build-dep to
allow the upcoming `array-0.5.0.0` package.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoRelax build-deps to allow upcoming `array-0.5.0.0`
Herbert Valerio Riedel [Fri, 11 Oct 2013 19:44:16 +0000 (21:44 +0200)] 
Relax build-deps to allow upcoming `array-0.5.0.0`

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoFuture-proof code for upcoming `array-0.5.0.0`
Herbert Valerio Riedel [Fri, 11 Oct 2013 19:24:31 +0000 (21:24 +0200)] 
Future-proof code for upcoming `array-0.5.0.0`

This way CPP conditionals can be avoided for the transition period.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoFix a bug in the canned selector code when profiling.
Simon Marlow [Fri, 11 Oct 2013 09:35:14 +0000 (10:35 +0100)] 
Fix a bug in the canned selector code when profiling.

6 years agoFix up the conditions for zeroing slop (#8402)
Simon Marlow [Tue, 8 Oct 2013 15:58:42 +0000 (16:58 +0100)] 
Fix up the conditions for zeroing slop (#8402)

6 years agoUse dynamic linking only if the GHC package is compiled with -dynamic (#8376)
Simon Marlow [Tue, 8 Oct 2013 15:58:24 +0000 (16:58 +0100)] 
Use dynamic linking only if the GHC package is compiled with -dynamic (#8376)

6 years agoTypofix.
Edward Z. Yang [Fri, 11 Oct 2013 00:31:19 +0000 (17:31 -0700)] 
Typofix.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agoClarify the TSO_SQUEEZED check.
Edward Z. Yang [Thu, 10 Oct 2013 21:54:58 +0000 (14:54 -0700)] 
Clarify the TSO_SQUEEZED check.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agoUpdate `bytestring` to final 0.10.4.0 release
Herbert Valerio Riedel [Thu, 10 Oct 2013 08:48:44 +0000 (10:48 +0200)] 
Update `bytestring` to final 0.10.4.0 release

6 years agoUpdate and clean-up the implmenation of GHC.TypeLits
Iavor S. Diatchki [Thu, 10 Oct 2013 02:22:35 +0000 (19:22 -0700)] 
Update and clean-up the implmenation of GHC.TypeLits

* Replace class `SingI` with two separate classes: `KnownNat` and `KnownSymbol`

* Rename `magicSingId` to `magicDictId`.

* Simplify and clean-up the "magic" implementation.  This version makes
  a lot more sense, at least to me :-)

* Update notes about how it all works:

  Note [KnownNat & KnownSymbol and EvLit] explains the evidence for the
  built-in classes

  Note [magicDictId magic] explains how we coerce singleton values into
  dictionaries.  This is used to turn run-time integers and strings into
  Proxy singletons of unknwon type (using an existential).

6 years agoShow parentheses when printing type (forall x. T1) T2 (#8428)
Krzysztof Gogolewski [Wed, 9 Oct 2013 20:08:02 +0000 (22:08 +0200)] 
Show parentheses when printing type (forall x. T1) T2 (#8428)

Patch by klao

6 years agoTypos
Krzysztof Gogolewski [Wed, 9 Oct 2013 18:02:57 +0000 (20:02 +0200)] 
Typos

6 years agoNuke {save,restore}StaticFlagGlobals.
Austin Seipp [Wed, 9 Oct 2013 15:47:06 +0000 (10:47 -0500)] 
Nuke {save,restore}StaticFlagGlobals.

As discussed in #8276, this code was somewhat broken because while you
could always revert the actual argument list, you can never revert the
CAFs upon which they are based - so really this didn't buy you much.

However, Haddock in particular expects to be able to parse GHC flags,
including static flags, and used this code to do so. In its place, we
instead have discardStaticFlags, which will safely remove any of the
remaining 5 flags from a list of arguments. Haddock instead discards
these, as they aren't related to anything it does anyway (mostly
controlling debugging output and some basic optimizer phases.)

This fixes #8276. In the future, we will eventually completely remove
the remaining StaticFlags, removing the need for this fix. Unfortunately
these changes will be quite invasive and require more time.

Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoUse evaldUnfolding for proxyHashId
Austin Seipp [Wed, 9 Oct 2013 13:49:19 +0000 (08:49 -0500)] 
Use evaldUnfolding for proxyHashId

Edward and I noticed this - like realWorld#, we want things applied to
proxy# which are INLINE more likely to be inlined - we do this by
marking proxy# as having an evaldUnfolding, which in turn makes it look
like the primitive is evaluated and makes the simplifier more willing to
do so.

See Note [evaldUnfoldings] in MkId.

Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoTurn -H and -Rghc-timing into dynamic flags.
Austin Seipp [Wed, 9 Oct 2013 11:39:10 +0000 (06:39 -0500)] 
Turn -H and -Rghc-timing into dynamic flags.

Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoRelease note fix.
Austin Seipp [Wed, 9 Oct 2013 08:04:00 +0000 (03:04 -0500)] 
Release note fix.

Thanks to Gergely Risko for pointing this out.

Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoClean up some outdated comments (#8418)
Austin Seipp [Wed, 9 Oct 2013 08:02:29 +0000 (03:02 -0500)] 
Clean up some outdated comments (#8418)

Authored-by: Gergely Risko <gergely@risko.hu>
Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoGHCi: Expand ~ in :script command
Joachim Breitner [Sun, 6 Oct 2013 21:38:34 +0000 (23:38 +0200)] 
GHCi: Expand ~ in :script command

Fixes: #7685

6 years agoCatch some popular typos in comments
Gabor Greif [Tue, 8 Oct 2013 21:46:23 +0000 (23:46 +0200)] 
Catch some popular typos in comments

6 years agoFix grammar
Gabor Greif [Tue, 8 Oct 2013 21:35:35 +0000 (23:35 +0200)] 
Fix grammar

6 years agodocs for new layout behaviour with MultiWayIf (#7783)
Simon Marlow [Tue, 8 Oct 2013 18:29:21 +0000 (19:29 +0100)] 
docs for new layout behaviour with MultiWayIf (#7783)

6 years agoPrint (non-representational) roles when display TyCon information
Simon Peyton Jones [Tue, 8 Oct 2013 17:07:37 +0000 (18:07 +0100)] 
Print (non-representational) roles when display TyCon information

6 years agoChange backslash to vertical bar in comment
Simon Peyton Jones [Tue, 8 Oct 2013 13:05:08 +0000 (14:05 +0100)] 
Change backslash to vertical bar in comment

This is to avoid

  rts/sm/Storage.c: In function ‘allocate’:
  rts/sm/Storage.c:725:13:
       error: multi-line comment [-Werror=comment]
  cc1: all warnings being treated as errors

6 years agoMore clarity on CurrentAlloc docs.
Edward Z. Yang [Mon, 7 Oct 2013 04:31:52 +0000 (21:31 -0700)] 
More clarity on CurrentAlloc docs.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agoRemove deprecated _scc_ (#8170)
Krzysztof Gogolewski [Sat, 24 Aug 2013 14:40:06 +0000 (16:40 +0200)] 
Remove deprecated _scc_ (#8170)

6 years agoAdd release note item for new Monoid Const instance
Herbert Valerio Riedel [Sat, 5 Oct 2013 14:35:09 +0000 (16:35 +0200)] 
Add release note item for new Monoid Const instance

See [6f3a194accd2a1a75a3f86c1b4dca30521488110/base]

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoRemove tab.
Geoffrey Mainland [Fri, 4 Oct 2013 21:57:07 +0000 (17:57 -0400)] 
Remove tab.

6 years agoMerge New Template Haskell branch.
Geoffrey Mainland [Fri, 4 Oct 2013 21:52:52 +0000 (17:52 -0400)] 
Merge New Template Haskell branch.

6 years agoAdd support for Template Haskell state.
Geoffrey Mainland [Tue, 4 Jun 2013 15:29:11 +0000 (16:29 +0100)] 
Add support for Template Haskell state.

6 years agoAdd support for Template Haskell module finalizers.
Geoffrey Mainland [Tue, 4 Jun 2013 13:15:00 +0000 (14:15 +0100)] 
Add support for Template Haskell module finalizers.

Template Haskell module finalizers are run after a module is type checked.

6 years agoChange the types of typed brackets and splices.
Geoffrey Mainland [Tue, 21 May 2013 14:07:09 +0000 (15:07 +0100)] 
Change the types of typed brackets and splices.

The essence of this change is that a TExp a now wraps a TH.Exp instead of a
TH.ExpQ. This means:

 * A typed bracket [||...||] now has type Q (TExp tau), where tau is the type of
   the expression in the bracket.

 * A typed splice $(...)  must contain a value of type Q (TExp tau), and has
   type tau.

Previously, typed brackets had type TExp tau, and typed splices had to contain a
value of type TExp tau.

6 years agoAllow splices to add additional top-level declarations.
Geoffrey Mainland [Tue, 21 May 2013 12:38:15 +0000 (13:38 +0100)] 
Allow splices to add additional top-level declarations.

6 years agoCode formatting cleanup.
Geoffrey Mainland [Tue, 21 May 2013 12:26:02 +0000 (13:26 +0100)] 
Code formatting cleanup.

6 years agoAdd full support for declaration splices.
Geoffrey Mainland [Mon, 20 May 2013 10:37:59 +0000 (11:37 +0100)] 
Add full support for declaration splices.

Since declaration splices are now untyped, they can be used anywhere a
declaration is valid, including in declaration brackets.

6 years agoAdd support for pattern splices.
Geoffrey Mainland [Thu, 16 May 2013 16:18:22 +0000 (17:18 +0100)] 
Add support for pattern splices.

6 years agoClean up smart constructors for splices.
Geoffrey Mainland [Thu, 16 May 2013 15:47:06 +0000 (16:47 +0100)] 
Clean up smart constructors for splices.

6 years agoClean up error context when checking brackets/splices.
Geoffrey Mainland [Thu, 16 May 2013 14:11:36 +0000 (15:11 +0100)] 
Clean up error context when checking brackets/splices.

6 years agoAdd support for typed brackets and splices.
Geoffrey Mainland [Wed, 15 May 2013 16:43:36 +0000 (17:43 +0100)] 
Add support for typed brackets and splices.

6 years agoTrack TH stage in the renamer.
Geoffrey Mainland [Wed, 1 May 2013 16:45:22 +0000 (17:45 +0100)] 
Track TH stage in the renamer.

6 years agoCheck the staging restriction in the renamer.
Geoffrey Mainland [Thu, 25 Apr 2013 13:40:08 +0000 (14:40 +0100)] 
Check the staging restriction in the renamer.

6 years agoTrack the typed/untyped distinction in the current TH stage.
Geoffrey Mainland [Thu, 25 Apr 2013 12:11:23 +0000 (13:11 +0100)] 
Track the typed/untyped distinction in the current TH stage.

Also check for illegal typed/untyped bracket/splice combinations.

6 years agoDifferentiate typed and untyped splices and brackets in the abstract syntax.
Geoffrey Mainland [Wed, 24 Apr 2013 14:31:43 +0000 (15:31 +0100)] 
Differentiate typed and untyped splices and brackets in the abstract syntax.

6 years agoAdd names for TExp type constructor and unType.
Geoffrey Mainland [Wed, 24 Apr 2013 13:33:51 +0000 (14:33 +0100)] 
Add names for TExp type constructor and unType.

6 years agoAdd syntactic support for typed expression brackets and splices.
Geoffrey Mainland [Wed, 24 Apr 2013 12:57:35 +0000 (13:57 +0100)] 
Add syntactic support for typed expression brackets and splices.

Right now the syntax for typed expression brackets and splices maps to
conventional brackets and splices, i.e., they are not typed.

6 years agoConsolidate TH renaming.
Geoffrey Mainland [Wed, 24 Apr 2013 07:41:50 +0000 (08:41 +0100)] 
Consolidate TH renaming.

6 years agoMove renamer splice functionality into a separate module.
Geoffrey Mainland [Tue, 23 Apr 2013 21:10:48 +0000 (22:10 +0100)] 
Move renamer splice functionality into a separate module.

This structure now matches that of the type checker.

6 years agoSimplify the plumbing for checkValidTyCl
Simon Peyton Jones [Fri, 4 Oct 2013 17:50:08 +0000 (18:50 +0100)] 
Simplify the plumbing for checkValidTyCl

Instead of walking over the source decls, and looking up the Name
to find the TyCon or whatever, we just walk over the list of
TyThings that have been brought into scope.  This is much tidier.

The only wrinkle is that, since we don't have the original declaration,
we don't have its SrcSpan to put in the error message.  I fixed this
by making the SrcSpan for the TyCon itself be the span of the whole
declaration.  This actually makes sense anyway.

There are bunch of error message wibbles in consequence.

6 years agoComments and white space only
Simon Peyton Jones [Fri, 4 Oct 2013 17:47:15 +0000 (18:47 +0100)] 
Comments and white space only

6 years agoSimplify printing of boot-file mis-matches, by using PprTyThing.pprTyThing
Simon Peyton Jones [Fri, 4 Oct 2013 17:45:55 +0000 (18:45 +0100)] 
Simplify printing of boot-file mis-matches, by using PprTyThing.pprTyThing

6 years agoSimplify PprTyThing
Simon Peyton Jones [Fri, 4 Oct 2013 17:43:07 +0000 (18:43 +0100)] 
Simplify PprTyThing

In particular, don't import GHC (a historical hangover), which
makes this module live much lower down in the module hierarchy.

This in turn means we can call it from TcRnDriver

6 years agoImprove pretty-printing of IfaceSyn type families
Simon Peyton Jones [Fri, 4 Oct 2013 17:42:04 +0000 (18:42 +0100)] 
Improve pretty-printing of IfaceSyn type families