[GHC] #8993: Fold NullaryTypeClasses into MPTC
#8993: Fold NullaryTypeClasses into MPTC ------------------------------------+------------------------------------- Reporter: owst | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- NullaryTypeClasses are an instance of MultiParamTypeClasses, so make it so. Suggested by Austin [http://www.reddit.com/r/haskell/comments/22lw1b/ghc_781_released/cgoi79c on reddit] -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8993> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8993: Fold NullaryTypeClasses into MPTC -------------------------------------+------------------------------------ Reporter: owst | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by thoughtpolice): * status: new => patch -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8993#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8993: Fold NullaryTypeClasses into MPTC -------------------------------------+------------------------------------ Reporter: owst | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 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 fine with this, but I think the error message could be better. "Too many args" is better than "Invalid number of args". It would be easy to generate the same messages as before, by passing `arity` to `classArityErr`. Simon -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8993#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8993: Fold NullaryTypeClasses into MPTC -------------------------------------+------------------------------------ Reporter: owst | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 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 owst): I've uploaded a new patch, which preserves the original messages, as per Simon's suggestion. Owen. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8993#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8993: Fold NullaryTypeClasses into MPTC -------------------------------------+------------------------------------ Reporter: owst | Owner: Type: bug | Status: patch Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by thoughtpolice): * milestone: => 7.10.1 Comment: Awesome, thanks! -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8993#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8993: Fold NullaryTypeClasses into MPTC -------------------------------------+------------------------------------ Reporter: owst | Owner: Type: bug | Status: patch Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.8.2 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 Krzysztof Gogolewski <krz.gogolewski@…>): In [changeset:"c63a465011b99eeafbb957074e54c2e6bbf751d9/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="c63a465011b99eeafbb957074e54c2e6bbf751d9" Subsume NullaryTypeClasses by MultiParamTypeClasses (#8993) MPTC now also handles the nullary case }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8993#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8993: Fold NullaryTypeClasses into MPTC -------------------------------------+------------------------------------ Reporter: owst | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.8.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by monoidal): * status: patch => closed * resolution: => fixed Comment: I've pushed - thanks for the patch! -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8993#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8993: Fold NullaryTypeClasses into MPTC -------------------------------------+------------------------------------ Reporter: owst | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by hvr): * status: closed => new * resolution: fixed => Comment: It seems that currently `NullaryTypeClasses` has no effect anymore? Specifically, `make WAY=normal TEST=TcNullaryTC` fails with {{{ =====> TcNullaryTC(normal) 2009 of 4031 [0, 0, 0] cd ./typecheck/should_run && '/home/hvr/Haskell/GHC/ghc/inplace/bin/ghc- stage2' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user- package-db -rtsopts -fno-ghci-history -o TcNullaryTC TcNullaryTC.hs
TcNullaryTC.comp.stderr 2>&1 Compile failed (status 256) errors were:
TcNullaryTC.hs:1:14: Warning: -XNullaryTypeClasses is deprecated: use -XMultiParamTypeClasses or pragma {-# LANGUAGE MultiParamTypeClasses #-} instead [1 of 1] Compiling Main ( TcNullaryTC.hs, TcNullaryTC.o ) TcNullaryTC.hs:5:1: No parameters for class ‘R’ (Use MultiParamTypeClasses to allow no-parameter classes) In the class declaration for ‘R’ *** unexpected failure for TcNullaryTC(normal) }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8993#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8993: Fold NullaryTypeClasses into MPTC -------------------------------------+------------------------------------ Reporter: owst | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.8.2 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 Herbert Valerio Riedel <hvr@…>): In [changeset:"26f41922e8923185bc77ceb8ef44d23564d29bed/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="26f41922e8923185bc77ceb8ef44d23564d29bed" Promote TcNullaryTC and TcCoercible to fast tests I'm wondering whether it's sensible to omit so many typecheck testcases from the default validate test target. As for instance, TcNullaryTC has been failing since its introduction in c63a465011b99eeafbb957074e54c2e6bbf751d9 (re #8993) and it seems to have gone unnoticed so far. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org> }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8993#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8993: Fold NullaryTypeClasses into MPTC -------------------------------------+------------------------------------ Reporter: owst | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.8.2 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 monoidal): Sorry about that. Will fix. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8993#comment:9> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8993: Fold NullaryTypeClasses into MPTC -------------------------------------+------------------------------------ Reporter: owst | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.8.2 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 Krzysztof Gogolewski <krz.gogolewski@…>): In [changeset:"e7b9c4125321308a7f71cacf4c24b7d40261ccfd/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="e7b9c4125321308a7f71cacf4c24b7d40261ccfd" Fixup nullary typeclasses (Trac #8993) Summary: Fix test broken after Trac #8993 Test Plan: validate Reviewers: austin, simonpj, hvr Reviewed By: austin, hvr Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D34 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8993#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8993: Fold NullaryTypeClasses into MPTC -------------------------------------+------------------------------------ Reporter: owst | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.8.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by monoidal): * status: new => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8993#comment:11> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC