[GHC] #10654: Better error message regarding type synonyms and PolyKinds

#10654: Better error message regarding type synonyms and PolyKinds -------------------------------------+------------------------------------- Reporter: abbradar | Owner: Type: feature | Status: new request | Milestone: Priority: low | Version: 7.10.1 Component: Compiler | Operating System: Unknown/Multiple Keywords: | Type of failure: Other Architecture: | Blocked By: Unknown/Multiple | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Followup of https://mail.haskell.org/pipermail/haskell- cafe/2015-July/120505.html {{{ ghci> :set -XPolyKinds ghci> type Test a = a ghci> type Huh = Test <interactive>:6:1: Type synonym ‘Test’ should have 2 arguments, but has been given 1 In the type declaration for ‘Huh’ }}} (Notice the number of arguments reported) Jonas Scholl at haskell-cafe suggested that the additional invisible argument is a kind argument, which indeed looks to be the case, as he demonstrated: {{{ Prelude> :set -XPolyKinds -XDataKinds -XKindSignatures Prelude> type Test a = a Prelude> type Huh a = Test (a :: Bool) Prelude> type Bar = Huh <interactive>:5:1: Type synonym ‘Huh’ should have 1 argument, but has been given none In the type declaration for ‘Bar’ }}} A better error message may be desirable here. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10654 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10654: Better error message regarding type synonyms and PolyKinds -------------------------------------+------------------------------------- Reporter: abbradar | Owner: Type: feature request | Status: closed Priority: low | Milestone: Component: Compiler | Version: 7.10.1 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Other | Unknown/Multiple Blocked By: | Test Case: Related Tickets: #10516 | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * status: new => closed * resolution: => duplicate * related: => #10516 Comment: Thanks for the report. A fix is underway in #10516. {{{ λ:1> :set -XPolyKinds λ:2> type Test a = a λ:3> type Huh = Test <interactive>:3:1: error: The type synonym ‘Test’ should have 1 argument, but has been given none In the type synonym declaration for ‘Huh’ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10654#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10654: Better error message regarding type synonyms and PolyKinds -------------------------------------+------------------------------------- Reporter: abbradar | Owner: Type: feature request | Status: closed Priority: low | Milestone: Component: Compiler | Version: 7.10.1 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Other | Unknown/Multiple Blocked By: | Test Case: Related Tickets: #10516 | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by abbradar): Thanks and sorry for the duplicate, I will search better next time. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10654#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC