[GHC] #11195: New pattern-match check can be non-performant

GHC ghc-devs at haskell.org
Fri Dec 11 23:22:46 UTC 2015


#11195: New pattern-match check can be non-performant
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:  goldfire
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.11
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash                              |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Richard Eisenberg <eir@…>):

 In [changeset:"6746549772c5cc0ac66c0fce562f297f4d4b80a2/ghc"
 67465497/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="6746549772c5cc0ac66c0fce562f297f4d4b80a2"
 Add kind equalities to GHC.

 This implements the ideas originally put forward in
 "System FC with Explicit Kind Equality" (ICFP'13).

 There are several noteworthy changes with this patch:
  * We now have casts in types. These change the kind
    of a type. See new constructor `CastTy`.

  * All types and all constructors can be promoted.
    This includes GADT constructors. GADT pattern matches
    take place in type family equations. In Core,
    types can now be applied to coercions via the
    `CoercionTy` constructor.

  * Coercions can now be heterogeneous, relating types
    of different kinds. A coercion proving `t1 :: k1 ~ t2 :: k2`
    proves both that `t1` and `t2` are the same and also that
    `k1` and `k2` are the same.

  * The `Coercion` type has been significantly enhanced.
    The documentation in `docs/core-spec/core-spec.pdf` reflects
    the new reality.

  * The type of `*` is now `*`. No more `BOX`.

  * Users can write explicit kind variables in their code,
    anywhere they can write type variables. For backward compatibility,
    automatic inference of kind-variable binding is still permitted.

  * The new extension `TypeInType` turns on the new user-facing
    features.

  * Type families and synonyms are now promoted to kinds. This causes
    trouble with parsing `*`, leading to the somewhat awkward new
    `HsAppsTy` constructor for `HsType`. This is dispatched with in
    the renamer, where the kind `*` can be told apart from a
    type-level multiplication operator. Without `-XTypeInType` the
    old behavior persists. With `-XTypeInType`, you need to import
    `Data.Kind` to get `*`, also known as `Type`.

  * The kind-checking algorithms in TcHsType have been significantly
    rewritten to allow for enhanced kinds.

  * The new features are still quite experimental and may be in flux.

  * TODO: Several open tickets: #11195, #11196, #11197, #11198, #11203.

  * TODO: Update user manual.

 Tickets addressed: #9017, #9173, #7961, #10524, #8566, #11142.
 Updates Haddock submodule.
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11195#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list