[GHC] #8449: Core lint error with data families and promotion across modules
#8449: Core lint error with data families and promotion across modules ------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- I have these files: {{{ {-# LANGUAGE GADTs, PolyKinds, DataKinds, TypeFamilies #-} module A where data family SList (a :: k) data instance SList (a :: [k]) where SNil :: SList '[] }}} {{{ module B where import A foo = SNil }}} If I compile them together, with `-dcore-lint` on, all is well. But, if I compile `A` and then `B` (both with `-dcore-lint`), I get this: {{{ *** Core Lint errors : in result of Desugar (after optimization) *** <no location info>: Warning: In the type ‛A.SList '[]’ Kind application error in type ‛[*]’ Function kind = * -> * Arg kinds = [(*, BOX)] <no location info>: Warning: In the type ‛A.SList '[]’ Kind application error in type ‛A.SList '[]’ Function kind = k_izi -> * Arg kinds = [([*], *), ('[], [*])] *** Offending Program *** B.foo :: A.SList '[] [LclIdX, Str=DmdType] B.foo = A.$WSNil @ * *** End of Offense *** <no location info>: Compilation had errors }}} This was tested on a very recent HEAD (Oct 11). The error does not happen if `SList` is a normal datatype, as opposed to a data family. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8449> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8449: Core lint error with data families and promotion across modules -------------------------------------+------------------------------------ Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by simonpj): I'm on this -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8449#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8449: Core lint error with data families and promotion across modules -------------------------------------+------------------------------------ Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"f7e7948b63be5a4be884f0e71ca9b3e7b4b3be91/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="f7e7948b63be5a4be884f0e71ca9b3e7b4b3be91" 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 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8449#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8449: Core lint error with data families and promotion across modules -------------------------------------+------------------------------------ Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"c315e2681e98147f53b022bbe5b68cc92fbb4dae/testsuite"]: {{{ #!CommitTicketReference repository="testsuite" revision="c315e2681e98147f53b022bbe5b68cc92fbb4dae" Test Trac #8449 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8449#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8449: Core lint error with data families and promotion across modules -------------------------------------+------------------------------------ Reporter: goldfire | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: polykinds/T8449 | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by simonpj): * status: new => closed * testcase: => polykinds/T8449 * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8449#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8449: Core lint error with data families and promotion across modules -------------------------------------+------------------------------------ Reporter: goldfire | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: polykinds/T8449 | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"712302987cee0a30dd4ae89d43dcfc3a0119ac4e/base"]: {{{ #!CommitTicketReference repository="base" revision="712302987cee0a30dd4ae89d43dcfc3a0119ac4e" Remove now-unnecessary NOINLINE pragmas The NOINLINEs were a work-around for a bug that was fixed by patch f7e7948 to ghc, which also fixed Trac #8449 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8449#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC