Timeline


and

Dec 27, 2012:

9:46 AM Ticket #7534 (allocateRegsAndSpill: Cannot read from uninitialized register) created by erikd
Building git HEAD on linux-powerpc64 and I get: […]

Dec 26, 2012:

11:29 PM Ticket #7533 (References to very old GHC in the docs) created by benmachine
It's probably safe not to warn people that things are new in GHC 6.6 these …
7:00 PM Ticket #7527 (Couldn't match kind `*' with `*' with PolyKinds & GADTs.) closed by goldfire
fixed: Fixed in HEAD: […] Are you claiming that this should type check? Or, …
5:49 PM Ticket #7532 (-ddump-splices output doesn't match generated code for data instances ...) created by Aninhumer
Using the following code: […] […] When compiling the second file in …
5:05 AM Changeset in ghc [f557bf3]type-nats by Iavor S. Diatchki <iavor.diatchki@…>
Fixes to restore proper operation of widening function. We need to be careful when we use BRules in interaction: unlike axiom rules, using them does not always result in useful information---in fact often it results in trivial facts. Furthermore, we have to be careful not to disable an interaction with an existing assumption (i.e., if we apply a rule to bRule, we should also keep a copy around in case the same slot might be filled by an assumption). At present, we only interact the BRules after we've tried all assumptions: this reduces the number of useless facts we construct, but is sufficient for the main use case of interacting with BRules, namely improvements of the form: a + 0 ~ b => a ~ b.
4:59 AM Changeset in ghc [240cd84]type-nats by Iavor S. Diatchki <iavor.diatchki@…>
A function to get all constraints (unused at the moment)
4:58 AM Changeset in ghc [c19c2fa]type-nats by Iavor S. Diatchki <iavor.diatchki@…>
Update debug functions for new name/location of unsafeGlobalDynFlags
4:57 AM Changeset in ghc [3cbfe4fe]type-nats by Iavor S. Diatchki <iavor.diatchki@…>
Limit debugging output to when there's something to report.

Dec 25, 2012:

9:53 PM Changeset in ghc [7c7328bb]type-nats by Iavor S. Diatchki <iavor.diatchki@…>
Add support for improving with basic rules, and simplify things a bit.
9:14 PM Changeset in ghc [520d502d]type-nats by Iavor S. Diatchki <iavor.diatchki@…>
Add TyThing entries for all rules.
7:51 PM Changeset in ghc [4e6f3e87]type-nats by Iavor S. Diatchki <iavor.diatchki@…>
Add `TnExp0L` to iff rules.
7:43 PM Changeset in ghc [f200e2e]type-nats by Iavor S. Diatchki <iavor.diatchki@…>
Add the second half of the rules for subtraction (SubE/SubI).
6:37 PM Ticket #7531 (after manualy installing array-0.4.0.1) created by guest
After manually installing array-0.4.0.1 installation manually of Cabal …
6:10 PM Ticket #7529 (Crash when using (->) instead of (=>) in a typeclass instance) closed by monoidal
duplicate: Thanks for the report, the bug is already fixed in GHC 7.6.1, see #5951. …
4:05 PM Ticket #7530 (Proposal: Add isLeft/isRight to Data.Either) created by SimonHengel
I propose to add isLeft/isRight to Data.Either. The …
2:50 PM Ticket #7529 (Crash when using (->) instead of (=>) in a typeclass instance) created by Helkafen
import qualified Data.Vector as V import Test.QuickCheck? import …
2:32 PM Ticket #7528 (Non terminating thunk resolution blocks world, even in the case of forkOS) created by timthelion
Please see: http://comments.gmane.org/gmane.comp.lang.haskell.cafe/102479
6:15 AM Ticket #7527 (Couldn't match kind `*' with `*' with PolyKinds & GADTs.) created by Ashley Yakeley
[…] […]

Dec 24, 2012:

6:03 PM Ticket #7526 (Minor typo in error message) created by parcs
Compiling the following snippet […] gives the following error message …
4:01 PM Changeset in ghc [2f784e3b]ghc-7.8wip/Cabal-1.20wip/T8545-ghc-7.8wip/T8776wip/T8995-level-generalisationwip/nested-cprwip/pattern-synonymswip/recurs-compat by Simon Peyton Jones <simonpj@…>
Don't run T7507 in ghci
4:01 PM Changeset in testsuite [cc59fbaf]atomicsdata-kind-syntaxoverlapping-tyfamsth-newtype-natstype-nats-simplewip/nested-cprwip/pattern-synonymswip/th-new by Simon Peyton Jones <simonpj@…>
Don't run T7507 in ghci
3:57 PM Ticket #4321 (Unexpected stack overflow prevented by superfluous type annotation) closed by simonpj
fixed: In the end, the patch to #7507 fixed this too. Simon
3:55 PM Ticket #7507 (loop fusion not working for Int32, Int64 as it does for Int ?) closed by simonpj
fixed: See also #4321. Fixed by this patch to base: […]
3:53 PM Changeset in ghc [77dc694]ghc-7.8wip/Cabal-1.20wip/T8545-ghc-7.8wip/T8776wip/T8995-level-generalisationwip/nested-cprwip/pattern-synonymswip/recurs-compat by Simon Peyton Jones <simonpj@…>
Test Trac #7507
3:53 PM Changeset in testsuite [c271ee47]atomicsdata-kind-syntaxoverlapping-tyfamsth-newtype-natstype-nats-simplewip/nested-cprwip/pattern-synonymswip/th-new by Simon Peyton Jones <simonpj@…>
Test Trac #7507
2:44 PM Changeset in base [06e36c6]data-proxydbcsghc-7.8type-reasoning by Simon Peyton Jones <simonpj@…>
Make sum and product INLINABLE This was causing the bad behaviour in Trac #7507, because 'sum' wasn't getting specialised to Int64. It also deals with Trac #4321, which had the same cause. This has a big effect on some nofib programs too: -------------------------------------------------------------------------------- Program Allocs Runtime Elapsed TotalMem ------------------------------------------------------------------------ bernouilli -2.6% -2.0% -2.0% +0.0% fft2 -23.8% 0.09 0.09 -16.7% fluid -4.4% 0.01 0.01 +0.0% hidden -3.2% +2.1% +1.8% +0.0% integrate -38.0% -47.7% -47.7% -1.0% x2n1 -30.2% 0.01 0.01 -50.0% ------------------------------------------------------------------------ Min -38.0% -47.7% -47.7% -50.0% Max +0.4% +11.2% +11.8% +6.9% Geometric Mean -1.3% +0.2% +0.2% -0.8%
2:07 PM Changeset in ghc [3a2ce0b]ghc-7.8wip/Cabal-1.20wip/T8545-ghc-7.8wip/T8776wip/T8995-level-generalisationwip/nested-cprwip/pattern-synonymswip/recurs-compat by Simon Peyton Jones <simonpj@…>
Merge branch 'master' of http://darcs.haskell.org/testsuite Conflicts: tests/typecheck/should_fail/all.T
2:07 PM Changeset in testsuite [d961a51]atomicsdata-kind-syntaxoverlapping-tyfamsth-newtype-natstype-nats-simplewip/nested-cprwip/pattern-synonymswip/th-new by Simon Peyton Jones <simonpj@…>
Merge branch 'master' of http://darcs.haskell.org/testsuite Conflicts: tests/typecheck/should_fail/all.T
2:04 PM Changeset in ghc [53a3f0d]ghc-7.8wip/Cabal-1.20wip/T8545-ghc-7.8wip/T8776wip/T8995-level-generalisationwip/nested-cprwip/pattern-synonymswip/recurs-compat by Simon Peyton Jones <simonpj@…>
Bump the residency of T4801 Residency is a very wobbly number; it depends on GC sampling time. So I don't think this is a real regression.
2:04 PM Changeset in testsuite [349493e]atomicsdata-kind-syntaxoverlapping-tyfamsth-newtype-natstype-nats-simplewip/nested-cprwip/pattern-synonymswip/th-new by Simon Peyton Jones <simonpj@…>
Bump the residency of T4801 Residency is a very wobbly number; it depends on GC sampling time. So I don't think this is a real regression.
1:43 PM Changeset in ghc [545fd8b]atomicsbetter-ho-cardinalitycardinalitycoercibledata-kind-syntaxdecision-procedureghc-7.8ghc-lwc2ghc-parmake-gsoclate-dmdlate-lam-liftnew-demand-to-mergeoverlapping-tyfamssimdtc-arrowsth-newticky-for-all-letstype-natstype-nats-simplewip/Cabal-1.20wip/T7704wip/T8545-ghc-7.8wip/T8592wip/T8776wip/T8995-level-generalisationwip/cbv-conv-thunkwip/common-contextwip/cpr-vs-jpwip/exprAritywip/nested-cprwip/pattern-synonymswip/recurs-compatwip/simdwip/th-new by Simon Peyton Jones <simonpj@…>
Make the treatment of addAltUnfoldings handle casts This minor refactoring re-attaches Note [Add unfolding for scrutinee]. It had become detached, which led me on a bit of a wild goose chase. While I was at it, I made the code work right for the case where the scrutinee is of form (x |> co); I don't think this is an important improvement. I also make simplAlt unconditionally zap occurrence information on case-alternative binders (see Note [Case alternative occ info]); it was almost always being zapped and the additional complexity seems not worth it.
1:25 PM Changeset in ghc [bacf7ca0]atomicsbetter-ho-cardinalitycardinalitycoercibledata-kind-syntaxdecision-procedureghc-7.8ghc-lwc2ghc-parmake-gsoclate-dmdlate-lam-liftnew-demand-to-mergeoverlapping-tyfamssimdtc-arrowsth-newticky-for-all-letstype-natstype-nats-simplewip/Cabal-1.20wip/T7704wip/T8545-ghc-7.8wip/T8592wip/T8776wip/T8995-level-generalisationwip/cbv-conv-thunkwip/common-contextwip/cpr-vs-jpwip/exprAritywip/nested-cprwip/pattern-synonymswip/recurs-compatwip/simdwip/th-new by Simon Peyton Jones <simonpj@…>
Make combine-identical-alternatives work again (Trac #7360) Move the "combine indentical alternatives" transformation *before* simplifying the alternatives. For example case x of y [] -> length y (_:_) -> length y } If we look *post* simplification, since 'y' is used in the alterantives, the case binders *might* be (see the keep_occ_info test in Simplify.simplAlt); and hence the combination of the two alteranatives does not happen. But if we do it *pre* simplification there is no problem. This fixes Trac #7360.
1:20 PM Changeset in ghc [89eb9e9]atomicsbetter-ho-cardinalitycardinalitycoercibledata-kind-syntaxdecision-procedureghc-7.8ghc-lwc2ghc-parmake-gsoclate-dmdlate-lam-liftnew-demand-to-mergeoverlapping-tyfamssimdtc-arrowsth-newticky-for-all-letstype-natstype-nats-simplewip/Cabal-1.20wip/T7704wip/T8545-ghc-7.8wip/T8592wip/T8776wip/T8995-level-generalisationwip/cbv-conv-thunkwip/common-contextwip/cpr-vs-jpwip/exprAritywip/nested-cprwip/pattern-synonymswip/recurs-compatwip/simdwip/th-new by Simon Peyton Jones <simonpj@…>
Add traceSmpl for simplifier tracing, now that the simplifier has the IO monad
11:34 AM Changeset in ghc [9ea2b66]atomicsbetter-ho-cardinalitycardinalitycoercibledata-kind-syntaxdecision-procedureghc-7.8ghc-lwc2ghc-parmake-gsoclate-dmdlate-lam-liftnew-demand-to-mergeoverlapping-tyfamssimdtc-arrowsth-newticky-for-all-letstype-natstype-nats-simplewip/Cabal-1.20wip/T7704wip/T8545-ghc-7.8wip/T8592wip/T8776wip/T8995-level-generalisationwip/cbv-conv-thunkwip/common-contextwip/cpr-vs-jpwip/exprAritywip/nested-cprwip/pattern-synonymswip/recurs-compatwip/simdwip/th-new by Simon Peyton Jones <simonpj@…>
Simplify the binder-swap transformation The occurrence analyser implements the "binder-swap" transformation, described in Note [Binder swap] in OccAnal. For some reason I had implemeted an extremely complicated version, I believe intended to get as much as possible done in single simplifier pass. But it turned out (Trac #7258) that the 'getProxies' bit of this complicated code scaled rather non-linearly, and all by itself could consume half of the entire compile time. The patch dramatically simplifies the transformation, so that we simply swizzle case x of y { I# v -> e } to case x of y { I# v -> let x = y in e } I can't see any reason not to do this * Compiler allocation for #7258 with 200 fields goes down by 25% and compile time by 20% * The nofib figures do not budge * Quite a bit of complicated code goes away
11:20 AM Changeset in ghc [e661e290]atomicsbetter-ho-cardinalitycardinalitycoercibledata-kind-syntaxdecision-procedureghc-7.8ghc-lwc2ghc-parmake-gsoclate-dmdlate-lam-liftnew-demand-to-mergeoverlapping-tyfamssimdtc-arrowsth-newticky-for-all-letstype-natstype-nats-simplewip/Cabal-1.20wip/T7704wip/T8545-ghc-7.8wip/T8592wip/T8776wip/T8995-level-generalisationwip/cbv-conv-thunkwip/common-contextwip/cpr-vs-jpwip/exprAritywip/nested-cprwip/pattern-synonymswip/recurs-compatwip/simdwip/th-new by Simon Peyton Jones <simonpj@…>
Comment typo only
10:55 AM Changeset in ghc [49bfb631]ghc-7.8wip/Cabal-1.20wip/T8545-ghc-7.8wip/T8776wip/T8995-level-generalisationwip/nested-cprwip/pattern-synonymswip/recurs-compat by Simon Peyton Jones <simonpj@…>
Wibble to debug output
10:55 AM Changeset in testsuite [7f9bd37]atomicsdata-kind-syntaxoverlapping-tyfamsth-newtype-natstype-nats-simplewip/nested-cprwip/pattern-synonymswip/th-new by Simon Peyton Jones <simonpj@…>
Wibble to debug output
10:08 AM Commentary/Compiler/CodeGen edited by ezyang
(diff)
10:06 AM Commentary/Compiler/CodeGen edited by ezyang
old is gone (diff)
9:50 AM Changeset in ghc [1f7d26b2]ghc-7.8wip/Cabal-1.20wip/T8545-ghc-7.8wip/T8776wip/T8995-level-generalisationwip/nested-cprwip/pattern-synonymswip/recurs-compat by Simon Peyton Jones <simonpj@…>
Merge branch 'master' of http://darcs.haskell.org/testsuite
9:50 AM Changeset in testsuite [07c0058]atomicsdata-kind-syntaxoverlapping-tyfamsth-newtype-natstype-nats-simplewip/nested-cprwip/pattern-synonymswip/th-new by Simon Peyton Jones <simonpj@…>
Merge branch 'master' of http://darcs.haskell.org/testsuite
9:50 AM Changeset in base [f07215b]data-proxydbcsghc-7.8type-reasoning by Simon Peyton Jones <simonpj@…>
Merge branch 'master' of http://darcs.haskell.org/packages/base
9:49 AM Changeset in ghc [7cc8a3c]atomicsbetter-ho-cardinalitycardinalitycoercibledata-kind-syntaxdecision-procedureghc-7.8ghc-lwc2ghc-parmake-gsoclate-dmdlate-lam-liftnew-demand-to-mergeoverlapping-tyfamssimdtc-arrowsth-newticky-for-all-letstype-natstype-nats-simplewip/Cabal-1.20wip/T7704wip/T8545-ghc-7.8wip/T8592wip/T8776wip/T8995-level-generalisationwip/cbv-conv-thunkwip/common-contextwip/cpr-vs-jpwip/exprAritywip/nested-cprwip/pattern-synonymswip/recurs-compatwip/simdwip/th-new by Simon Peyton Jones <simonpj@…>
Merge branch 'master' of http://darcs.haskell.org/ghc
9:49 AM Changeset in ghc [62a3c50a]ghc-7.8wip/Cabal-1.20wip/T8545-ghc-7.8wip/T8776wip/T8995-level-generalisationwip/nested-cprwip/pattern-synonymswip/recurs-compat by Simon Peyton Jones <simonpj@…>
Test Trac #7525
9:49 AM Changeset in testsuite [fb2d741]atomicsdata-kind-syntaxoverlapping-tyfamsth-newtype-natstype-nats-simplewip/nested-cprwip/pattern-synonymswip/th-new by Simon Peyton Jones <simonpj@…>
Test Trac #7525
9:46 AM Changeset in ghc [1d07cc0]atomicsbetter-ho-cardinalitycardinalitycoercibledata-kind-syntaxdecision-procedureghc-7.8ghc-lwc2ghc-parmake-gsoclate-dmdlate-lam-liftnew-demand-to-mergeoverlapping-tyfamssimdtc-arrowsth-newticky-for-all-letstype-natstype-nats-simplewip/Cabal-1.20wip/T7704wip/T8545-ghc-7.8wip/T8592wip/T8776wip/T8995-level-generalisationwip/cbv-conv-thunkwip/common-contextwip/cpr-vs-jpwip/exprAritywip/nested-cprwip/pattern-synonymswip/recurs-compatwip/simdwip/th-new by Simon Peyton Jones <simonpj@…>
Remember to zonk when taking free variables in simpl_top Forgetting this meant that we were upating the same meta-tyvar twice. Fixes Trac #7525.
9:38 AM Changeset in ghc [e9e650d]atomicsbetter-ho-cardinalitycardinalitycoercibledata-kind-syntaxdecision-procedureghc-7.8ghc-lwc2ghc-parmake-gsoclate-dmdlate-lam-liftnew-demand-to-mergeoverlapping-tyfamssimdtc-arrowsth-newticky-for-all-letstype-natstype-nats-simplewip/Cabal-1.20wip/T7704wip/T8545-ghc-7.8wip/T8592wip/T8776wip/T8995-level-generalisationwip/cbv-conv-thunkwip/common-contextwip/cpr-vs-jpwip/exprAritywip/nested-cprwip/pattern-synonymswip/recurs-compatwip/simdwip/th-new by Simon Peyton Jones <simonpj@…>
A bit more tracing

Dec 23, 2012:

3:51 PM Changeset in ghc [29696e3]ghc-7.8wip/Cabal-1.20wip/T8545-ghc-7.8wip/T8776wip/T8995-level-generalisationwip/nested-cprwip/pattern-synonymswip/recurs-compat by Simon Peyton Jones <simonpj@…>
Merge branch 'master' of http://darcs.haskell.org/testsuite
3:51 PM Changeset in testsuite [b14391f]atomicsdata-kind-syntaxoverlapping-tyfamsth-newtype-natstype-nats-simplewip/nested-cprwip/pattern-synonymswip/th-new by Simon Peyton Jones <simonpj@…>
Merge branch 'master' of http://darcs.haskell.org/testsuite
3:49 PM Changeset in ghc [e5ccb4ee]atomicsbetter-ho-cardinalitycardinalitycoercibledata-kind-syntaxdecision-procedureghc-7.8ghc-lwc2ghc-parmake-gsoclate-dmdlate-lam-liftnew-demand-to-mergeoverlapping-tyfamssimdtc-arrowsth-newticky-for-all-letstype-natstype-nats-simplewip/Cabal-1.20wip/T7704wip/T8545-ghc-7.8wip/T8592wip/T8776wip/T8995-level-generalisationwip/cbv-conv-thunkwip/common-contextwip/cpr-vs-jpwip/exprAritywip/nested-cprwip/pattern-synonymswip/recurs-compatwip/simdwip/th-new by Simon Peyton Jones <simonpj@…>
Merge branch 'master' of http://darcs.haskell.org/ghc Conflicts: compiler/basicTypes/MkId.lhs compiler/iface/IfaceSyn.lhs
3:44 PM Ticket #7525 (Compiler panic with ill-typed code using implicit parameters) created by parcs
The following snippet produces a compiler panic with GHC 7.7.20121221: …
3:38 PM Changeset in ghc [1ee1cd4]atomicsbetter-ho-cardinalitycardinalitycoercibledata-kind-syntaxdecision-procedureghc-7.8ghc-lwc2ghc-parmake-gsoclate-dmdlate-lam-liftnew-demand-to-mergeoverlapping-tyfamssimdtc-arrowsth-newticky-for-all-letstype-natstype-nats-simplewip/Cabal-1.20wip/T7704wip/T8545-ghc-7.8wip/T8592wip/T8776wip/T8995-level-generalisationwip/cbv-conv-thunkwip/common-contextwip/cpr-vs-jpwip/exprAritywip/nested-cprwip/pattern-synonymswip/recurs-compatwip/simdwip/th-new by Simon Peyton Jones <simonpj@…>
Make {-# UNPACK #-} work for type/data family invocations This fixes most of Trac #3990. Consider data family D a data instance D Double = CD Int Int data T = T {-# UNPACK #-} !(D Double) Then we want the (D Double unpacked). To do this we need to construct a suitable coercion, and it's much safer to record that coercion in the interface file, lest the in-scope instances differ somehow. That in turn means elaborating the HsBang type to include a coercion. To do that I moved HsBang from BasicTypes to DataCon, which caused quite a few minor knock-on changes. Interface-file format has changed! Still to do: need to do knot-tying to allow instances to take effect within the same module.
12:59 PM Changeset in ghc [d2a5a9cf]atomicsbetter-ho-cardinalitycardinalitycoercibledata-kind-syntaxdecision-procedureghc-7.8ghc-lwc2ghc-parmake-gsoclate-dmdlate-lam-liftnew-demand-to-mergeoverlapping-tyfamssimdtc-arrowsth-newticky-for-all-letstype-natstype-nats-simplewip/Cabal-1.20wip/T7704wip/T8545-ghc-7.8wip/T8592wip/T8776wip/T8995-level-generalisationwip/cbv-conv-thunkwip/common-contextwip/cpr-vs-jpwip/exprAritywip/nested-cprwip/pattern-synonymswip/recurs-compatwip/simdwip/th-new by Ross Paterson <ross@…>
rename do_map_arrow as do_premap (no semantic change)
5:22 AM NewAxioms edited by goldfire
(diff)
4:07 AM Ticket #7524 (Erroneous repeated kind variable in conflicting type family instance error ...) created by goldfire
Consider the following code: […] GHC correctly complains that these …
1:39 AM Changeset in ghc [b03bc4a]type-nats by Iavor S. Diatchki <iavor.diatchki@…>
Merge remote-tracking branch 'origin/master' into type-nats Conflicts: compiler/coreSyn/TrieMap.lhs compiler/iface/IfaceSyn.lhs compiler/iface/IfaceType.lhs compiler/iface/TcIface.lhs compiler/prelude/PrelNames.lhs compiler/prelude/TysPrim.lhs compiler/prelude/TysWiredIn.lhs compiler/typecheck/TcEvidence.lhs compiler/types/Type.lhs compiler/types/TypeRep.lhs

Dec 22, 2012:

11:22 PM Changeset in base [85bda3d]data-proxydbcsghc-7.8type-reasoning by Iavor S. Diatchki <iavor.diatchki@…>
Add functions that compare singletons for equality (with evidence)
8:07 PM Ticket #7523 (segfault when ignoring invalid byte sequence when decoding UTF8//IGNORE) closed by ganesh
duplicate: Duplicate of #7522 - accidentally submitted twice after a timeout.
8:06 PM Ticket #7523 (segfault when ignoring invalid byte sequence when decoding UTF8//IGNORE) closed by ganesh
wontfix
8:05 PM Ticket #7523 (segfault when ignoring invalid byte sequence when decoding UTF8//IGNORE) created by ganesh
The code below segfaults on a variety of platforms and GHC versions - I've …
7:52 PM Ticket #7522 (segfault when ignoring invalid byte sequence when decoding UTF8//IGNORE) created by ganesh
The code below segfaults on a variety of platforms and GHC versions - I've …
1:55 AM Changeset in ghc [7a42cf6]ghc-7.8wip/Cabal-1.20wip/T8545-ghc-7.8wip/T8776wip/T8995-level-generalisationwip/nested-cprwip/pattern-synonymswip/recurs-compat by Richard Eisenberg <eir@…>
Implement overlapping type family instances. An ordered, overlapping type family instance is introduced by 'type instance where', followed by equations. See the new section in the user manual (7.7.2.2) for details. The canonical example is Boolean equality at the type level: type family Equals (a :: k) (b :: k) :: Bool type instance where Equals a a = True Equals a b = False A branched family instance, such as this one, checks its equations in order and applies only the first the matches. As explained in the note [Instance checking within groups] in FamInstEnv.lhs, we must be careful not to simplify, say, (Equals Int b) to False, because b might later unify with Int. This commit includes all of the commits on the overlapping-tyfams branch. SPJ requested that I combine all my commits over the past several months into one monolithic commit. The following GHC repos are affected: ghc, testsuite, utils/haddock, libraries/template-haskell, and libraries/dph. Here are some details for the interested: - The definition of CoAxiom has been moved from TyCon.lhs to a new file CoAxiom.lhs. I made this decision because of the number of definitions necessary to support BranchList. - BranchList is a GADT whose type tracks whether it is a singleton list or not-necessarily-a-singleton-list. The reason I introduced this type is to increase static checking of places where GHC code assumes that a FamInst or CoAxiom is indeed a singleton. This assumption takes place roughly 10 times throughout the code. I was worried that a future change to GHC would invalidate the assumption, and GHC might subtly fail to do the right thing. By explicitly labeling CoAxioms and FamInsts as being Unbranched (singleton) or Branched (not-necessarily-singleton), we make this assumption explicit and checkable. Furthermore, to enforce the accuracy of this label, the list of branches of a CoAxiom or FamInst is stored using a BranchList, whose constructors constrain its type index appropriately. I think that the decision to use BranchList is probably the most controversial decision I made from a code design point of view. Although I provide conversions to/from ordinary lists, it is more efficient to use the brList... functions provided in CoAxiom than always to convert. The use of these functions does not wander far from the core CoAxiom/FamInst logic. BranchLists are motivated and explained in the note [Branched axioms] in CoAxiom.lhs. - The CoAxiom type has changed significantly. You can see the new type in CoAxiom.lhs. It uses a CoAxBranch type to track branches of the CoAxiom. Correspondingly various functions producing and consuming CoAxioms had to change, including the binary layout of interface files. - To get branched axioms to work correctly, it is important to have a notion of type "apartness": two types are apart if they cannot unify, and no substitution of variables can ever get them to unify, even after type family simplification. (This is different than the normal failure to unify because of the type family bit.) This notion in encoded in tcApartTys, in Unify.lhs. Because apartness is finer-grained than unification, the tcUnifyTys now calls tcApartTys. - CoreLinting axioms has been updated, both to reflect the new form of CoAxiom and to enforce the apartness rules of branch application. The formalization of the new rules is in docs/core-spec/core-spec.pdf. - The FamInst type (in types/FamInstEnv.lhs) has changed significantly, paralleling the changes to CoAxiom. Of course, this forced minor changes in many files. - There are several new Notes in FamInstEnv.lhs, including one discussing confluent overlap and why we're not doing it. - lookupFamInstEnv, lookupFamInstEnvConflicts, and lookup_fam_inst_env' (the function that actually does the work) have all been more-or-less completely rewritten. There is a Note [lookup_fam_inst_env' implementation] describing the implementation. One of the changes that affects other files is to change the type of matches from a pair of (FamInst, [Type]) to a new datatype (which now includes the index of the matching branch). This seemed a better design. - The TySynInstD constructor in Template Haskell was updated to use the new datatype TySynEqn. I also bumped the TH version number, requiring changes to DPH cabal files. (That's why the DPH repo has an overlapping-tyfams branch.) - As SPJ requested, I refactored some of the code in HsDecls: * splitting up TyDecl into SynDecl and DataDecl, correspondingly changing HsTyDefn to HsDataDefn (with only one constructor) * splitting FamInstD into TyFamInstD and DataFamInstD and splitting FamInstDecl into DataFamInstDecl and TyFamInstDecl * making the ClsInstD take a ClsInstDecl, for parallelism with InstDecl's other constructors * changing constructor TyFamily into FamDecl * creating a FamilyDecl type that stores the details for a family declaration; this is useful because FamilyDecls can appear in classes but other decls cannot * restricting the associated types and associated type defaults for a * class to be the new, more restrictive types * splitting cid_fam_insts into cid_tyfam_insts and cid_datafam_insts, according to the new types * perhaps one or two more that I'm overlooking None of these changes has far-reaching implications. - The user manual, section 7.7.2.2, is updated to describe the new type family instances.
1:55 AM Changeset in testsuite [80cac93]atomicsdata-kind-syntaxoverlapping-tyfamsth-newtype-natstype-nats-simplewip/nested-cprwip/pattern-synonymswip/th-new by Richard Eisenberg <eir@…>
Implement overlapping type family instances. An ordered, overlapping type family instance is introduced by 'type instance where', followed by equations. See the new section in the user manual (7.7.2.2) for details. The canonical example is Boolean equality at the type level: type family Equals (a :: k) (b :: k) :: Bool type instance where Equals a a = True Equals a b = False A branched family instance, such as this one, checks its equations in order and applies only the first the matches. As explained in the note [Instance checking within groups] in FamInstEnv.lhs, we must be careful not to simplify, say, (Equals Int b) to False, because b might later unify with Int. This commit includes all of the commits on the overlapping-tyfams branch. SPJ requested that I combine all my commits over the past several months into one monolithic commit. The following GHC repos are affected: ghc, testsuite, utils/haddock, libraries/template-haskell, and libraries/dph. Here are some details for the interested: - The definition of CoAxiom has been moved from TyCon.lhs to a new file CoAxiom.lhs. I made this decision because of the number of definitions necessary to support BranchList. - BranchList is a GADT whose type tracks whether it is a singleton list or not-necessarily-a-singleton-list. The reason I introduced this type is to increase static checking of places where GHC code assumes that a FamInst or CoAxiom is indeed a singleton. This assumption takes place roughly 10 times throughout the code. I was worried that a future change to GHC would invalidate the assumption, and GHC might subtly fail to do the right thing. By explicitly labeling CoAxioms and FamInsts as being Unbranched (singleton) or Branched (not-necessarily-singleton), we make this assumption explicit and checkable. Furthermore, to enforce the accuracy of this label, the list of branches of a CoAxiom or FamInst is stored using a BranchList, whose constructors constrain its type index appropriately. I think that the decision to use BranchList is probably the most controversial decision I made from a code design point of view. Although I provide conversions to/from ordinary lists, it is more efficient to use the brList... functions provided in CoAxiom than always to convert. The use of these functions does not wander far from the core CoAxiom/FamInst logic. BranchLists are motivated and explained in the note [Branched axioms] in CoAxiom.lhs. - The CoAxiom type has changed significantly. You can see the new type in CoAxiom.lhs. It uses a CoAxBranch type to track branches of the CoAxiom. Correspondingly various functions producing and consuming CoAxioms had to change, including the binary layout of interface files. - To get branched axioms to work correctly, it is important to have a notion of type "apartness": two types are apart if they cannot unify, and no substitution of variables can ever get them to unify, even after type family simplification. (This is different than the normal failure to unify because of the type family bit.) This notion in encoded in tcApartTys, in Unify.lhs. Because apartness is finer-grained than unification, the tcUnifyTys now calls tcApartTys. - CoreLinting axioms has been updated, both to reflect the new form of CoAxiom and to enforce the apartness rules of branch application. The formalization of the new rules is in docs/core-spec/core-spec.pdf. - The FamInst type (in types/FamInstEnv.lhs) has changed significantly, paralleling the changes to CoAxiom. Of course, this forced minor changes in many files. - There are several new Notes in FamInstEnv.lhs, including one discussing confluent overlap and why we're not doing it. - lookupFamInstEnv, lookupFamInstEnvConflicts, and lookup_fam_inst_env' (the function that actually does the work) have all been more-or-less completely rewritten. There is a Note [lookup_fam_inst_env' implementation] describing the implementation. One of the changes that affects other files is to change the type of matches from a pair of (FamInst, [Type]) to a new datatype (which now includes the index of the matching branch). This seemed a better design. - The TySynInstD constructor in Template Haskell was updated to use the new datatype TySynEqn. I also bumped the TH version number, requiring changes to DPH cabal files. (That's why the DPH repo has an overlapping-tyfams branch.) - As SPJ requested, I refactored some of the code in HsDecls: * splitting up TyDecl into SynDecl and DataDecl, correspondingly changing HsTyDefn to HsDataDefn (with only one constructor) * splitting FamInstD into TyFamInstD and DataFamInstD and splitting FamInstDecl into DataFamInstDecl and TyFamInstDecl * making the ClsInstD take a ClsInstDecl, for parallelism with InstDecl's other constructors * changing constructor TyFamily into FamDecl * creating a FamilyDecl type that stores the details for a family declaration; this is useful because FamilyDecls can appear in classes but other decls cannot * restricting the associated types and associated type defaults for a * class to be the new, more restrictive types * splitting cid_fam_insts into cid_tyfam_insts and cid_datafam_insts, according to the new types * perhaps one or two more that I'm overlooking None of these changes has far-reaching implications. - The user manual, section 7.7.2.2, is updated to describe the new type family instances.
1:54 AM Changeset in ghc [8366792]atomicsbetter-ho-cardinalitycardinalitycoercibledata-kind-syntaxdecision-procedureghc-7.8ghc-lwc2ghc-parmake-gsoclate-dmdlate-lam-liftnew-demand-to-mergeoverlapping-tyfamssimdtc-arrowsth-newticky-for-all-letstype-natstype-nats-simplewip/Cabal-1.20wip/T7704wip/T8545-ghc-7.8wip/T8592wip/T8776wip/T8995-level-generalisationwip/cbv-conv-thunkwip/common-contextwip/cpr-vs-jpwip/exprAritywip/nested-cprwip/pattern-synonymswip/recurs-compatwip/simdwip/th-new by Richard Eisenberg <eir@…>
Implement overlapping type family instances. An ordered, overlapping type family instance is introduced by 'type instance where', followed by equations. See the new section in the user manual (7.7.2.2) for details. The canonical example is Boolean equality at the type level: type family Equals (a :: k) (b :: k) :: Bool type instance where Equals a a = True Equals a b = False A branched family instance, such as this one, checks its equations in order and applies only the first the matches. As explained in the note [Instance checking within groups] in FamInstEnv.lhs, we must be careful not to simplify, say, (Equals Int b) to False, because b might later unify with Int. This commit includes all of the commits on the overlapping-tyfams branch. SPJ requested that I combine all my commits over the past several months into one monolithic commit. The following GHC repos are affected: ghc, testsuite, utils/haddock, libraries/template-haskell, and libraries/dph. Here are some details for the interested: - The definition of CoAxiom has been moved from TyCon.lhs to a new file CoAxiom.lhs. I made this decision because of the number of definitions necessary to support BranchList. - BranchList is a GADT whose type tracks whether it is a singleton list or not-necessarily-a-singleton-list. The reason I introduced this type is to increase static checking of places where GHC code assumes that a FamInst or CoAxiom is indeed a singleton. This assumption takes place roughly 10 times throughout the code. I was worried that a future change to GHC would invalidate the assumption, and GHC might subtly fail to do the right thing. By explicitly labeling CoAxioms and FamInsts as being Unbranched (singleton) or Branched (not-necessarily-singleton), we make this assumption explicit and checkable. Furthermore, to enforce the accuracy of this label, the list of branches of a CoAxiom or FamInst is stored using a BranchList, whose constructors constrain its type index appropriately. I think that the decision to use BranchList is probably the most controversial decision I made from a code design point of view. Although I provide conversions to/from ordinary lists, it is more efficient to use the brList... functions provided in CoAxiom than always to convert. The use of these functions does not wander far from the core CoAxiom/FamInst logic. BranchLists are motivated and explained in the note [Branched axioms] in CoAxiom.lhs. - The CoAxiom type has changed significantly. You can see the new type in CoAxiom.lhs. It uses a CoAxBranch type to track branches of the CoAxiom. Correspondingly various functions producing and consuming CoAxioms had to change, including the binary layout of interface files. - To get branched axioms to work correctly, it is important to have a notion of type "apartness": two types are apart if they cannot unify, and no substitution of variables can ever get them to unify, even after type family simplification. (This is different than the normal failure to unify because of the type family bit.) This notion in encoded in tcApartTys, in Unify.lhs. Because apartness is finer-grained than unification, the tcUnifyTys now calls tcApartTys. - CoreLinting axioms has been updated, both to reflect the new form of CoAxiom and to enforce the apartness rules of branch application. The formalization of the new rules is in docs/core-spec/core-spec.pdf. - The FamInst type (in types/FamInstEnv.lhs) has changed significantly, paralleling the changes to CoAxiom. Of course, this forced minor changes in many files. - There are several new Notes in FamInstEnv.lhs, including one discussing confluent overlap and why we're not doing it. - lookupFamInstEnv, lookupFamInstEnvConflicts, and lookup_fam_inst_env' (the function that actually does the work) have all been more-or-less completely rewritten. There is a Note [lookup_fam_inst_env' implementation] describing the implementation. One of the changes that affects other files is to change the type of matches from a pair of (FamInst, [Type]) to a new datatype (which now includes the index of the matching branch). This seemed a better design. - The TySynInstD constructor in Template Haskell was updated to use the new datatype TySynEqn. I also bumped the TH version number, requiring changes to DPH cabal files. (That's why the DPH repo has an overlapping-tyfams branch.) - As SPJ requested, I refactored some of the code in HsDecls: * splitting up TyDecl into SynDecl and DataDecl, correspondingly changing HsTyDefn to HsDataDefn (with only one constructor) * splitting FamInstD into TyFamInstD and DataFamInstD and splitting FamInstDecl into DataFamInstDecl and TyFamInstDecl * making the ClsInstD take a ClsInstDecl, for parallelism with InstDecl's other constructors * changing constructor TyFamily into FamDecl * creating a FamilyDecl type that stores the details for a family declaration; this is useful because FamilyDecls can appear in classes but other decls cannot * restricting the associated types and associated type defaults for a * class to be the new, more restrictive types * splitting cid_fam_insts into cid_tyfam_insts and cid_datafam_insts, according to the new types * perhaps one or two more that I'm overlooking None of these changes has far-reaching implications. - The user manual, section 7.7.2.2, is updated to describe the new type family instances.
1:36 AM Changeset in ghc [566237c0]overlapping-tyfams by Richard Eisenberg <eir@…>
Edited added code to work with overlapping tyfams.
12:11 AM Changeset in testsuite [d2e05e4]overlapping-tyfams by Richard Eisenberg <eir@…>
Merge branch 'master' into overlapping-tyfams Conflicts: tests/th/all.T
12:10 AM Changeset in ghc [0cd7e7b]overlapping-tyfams by Richard Eisenberg <eir@…>
Merge branch 'master' into overlapping-tyfams Conflicts: compiler/basicTypes/MkId.lhs compiler/hsSyn/Convert.lhs compiler/types/FamInstEnv.lhs
Note: See TracTimeline for information about the timeline view.