[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

#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

#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

#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