[GHC] #15354: QuantifiedConstraints not fully described in manual

#15354: QuantifiedConstraints not fully described in manual -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Documentation | Version: 8.5 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- As pointed out in comment:4:ticket:15351, the section in the manual on `-XQuantifiedConstraints` says that an `=>` is essential in a quantified constraint. However, the following is accepted: {{{#!hs class C a foo :: (forall x. C x) => () foo = () }}} Note that there is no `=>` in the quantified constraint. We need to update the manual accordingly. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15354 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15354: QuantifiedConstraints not fully described in manual
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Documentation | Version: 8.5
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#15354: QuantifiedConstraints not fully described in manual
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Documentation | Version: 8.5
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by AntC):
Replying to [comment:1 Simon Peyton Jones
{{{ This is a documentation-only fix, addressing Trac #15354. }}}
Thanks Simon, is there a typo? {{{ class ::= ... | [forall tyavrs .] [context =>] qtycls inst1 ... instn | [forall tyavrs .] [context =>] tyvar inst1 ... instn }}} should be `| [forall tyvars .] ...`? (I think this has come through from the github proposal.) So to know if some code is using `QuantifiedConstraints`: either there's a `context =>` or a `forall` (or both). If neither appear (despite having `{-# LANGUAGE QuantifiedConstraints #-}`), then it's a regular class appearing in a context, whatever "regular" means ;-). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15354#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15354: QuantifiedConstraints not fully described in manual -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Documentation | Version: 8.5 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Yes there's some overlap (with the existing productions) in the grammar. I considered having rules for all combinations of with and without foralls and context (for each of the two forms of head) leading to six productions instead of two, but I decided against. The grammar isn't trying to tell you which extension you are using, just what forms are legal. I don't feel strongly; it does not seem v important. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15354#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC