Ross I've pushed a new branch, tc-arrows, for the new typechecking of arrows, based on the discussion we had last week.
It all compiles, but won't work because I have done nothing to the desugaring. It uses our new representation with (env, nested-tuple-with-unit-at-end) rather than (nested-tuple-with-env-at-the-end), so desugaring needs significant attention. Would you like to work on the desugarer? I'm out of my depth, but happy to advise. Thanks Simon | -----Original Message----- | From: [email protected] [mailto:ghc-commits- | [email protected]] On Behalf Of Simon Peyton Jones | Sent: 14 February 2013 16:08 | To: [email protected] | Subject: [commit: ghc] tc-arrows: Rearrange the typechecking of arrows, | especially arrow "forms" (49badc9) | | Repository : ssh://darcs.haskell.org//srv/darcs/ghc | | On branch : tc-arrows | | http://hackage.haskell.org/trac/ghc/changeset/49badc91c52fc1f65a3ff5bfb3 | edaecbd617de61 | | >--------------------------------------------------------------- | | commit 49badc91c52fc1f65a3ff5bfb3edaecbd617de61 | Author: Simon Peyton Jones <[email protected]> | Date: Thu Feb 14 15:25:23 2013 +0000 | | Rearrange the typechecking of arrows, especially arrow "forms" | | The typechecking of arrow forms (in GHC 7.6) is known to be bogus, | because it marches down tuple types that may not yet be fully worked | out, depending on when constraint solving happens. Moreover, | coercions are generated and simply discarded. The fact that it | works | at all is a miracle. | | This refactoring is based on a conversation with Ross, where we | rearranged the typing of the argument stack, so that the arrows | have the form | a (env, (arg1, (arg2, ...(argn, ())))) res | rather than | a (arg1, (arg2, ...(argn, env))) res | as it was before. | | This is vastly simpler to typecheck; just look at the beautiful, | simple type checking of arrow forms now! | | We need a new HsCmdCast to capture the coercions generated from | the argument stack. | | Current state of play: | * syntax done | * renamer done | * typechecker done | * desugarer NOT DONE | | So nothing will work yet, hence on a branch | | compiler/deSugar/Coverage.lhs | 3 + | compiler/deSugar/DsArrows.lhs | 6 +- | compiler/hsSyn/HsExpr.lhs | 13 ++- | compiler/hsSyn/HsUtils.lhs | 7 +- | compiler/parser/Parser.y.pp | 4 +- | compiler/parser/RdrHsSyn.lhs | 4 +- | compiler/rename/RnExpr.lhs | 4 +- | compiler/rename/RnTypes.lhs | 2 +- | compiler/typecheck/TcArrows.lhs | 270 ++++++++++++++++++-------------- | ------- | compiler/typecheck/TcHsSyn.lhs | 6 +- | 10 files changed, 156 insertions(+), 163 deletions(-) | | | Diff suppressed because of size. To see it, use: | | git show 49badc91c52fc1f65a3ff5bfb3edaecbd617de61 | | _______________________________________________ | ghc-commits mailing list | [email protected] | http://www.haskell.org/mailman/listinfo/ghc-commits _______________________________________________ ghc-devs mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-devs
