[GHC] #7825: Class used as a type parameter typechecks

#7825: Class used as a type parameter typechecks -----------------------------+---------------------------------------------- Reporter: mojojojo | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.6.2 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- {{{ class SomeClass a someValue :: Maybe (SomeClass a) someValue = undefined }}} This code compiles without any errors. The issue originates from [http://stackoverflow.com/questions/15903490 /why-can-classes-be-used-as-type-parameters-and-what-for this stackoverflow question]. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7825 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7825: Class used as a type parameter typechecks ---------------------------------+------------------------------------------ Reporter: mojojojo | Owner: Type: bug | Status: closed Priority: normal | Component: Compiler Version: 7.6.2 | Resolution: fixed Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by monoidal): * status: new => closed * resolution: => fixed Comment: Thanks for the report. The bug is already fixed in HEAD. {{{ The first argument of ‛Maybe’ should have kind ‛*’, but ‛SomeClass a’ has kind ‛Constraint’ In the type signature for ‛someValue’: someValue :: Maybe (SomeClass a) }}} See also #7697. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7825#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC