Ticket #2573 (closed bug: fixed)

Opened 3 months ago

Last modified 2 months ago

Illegal polymorphic or qualified type with generics

Reported by: igloo Assigned to:
Priority: normal Milestone: 6.10.1
Component: Compiler (Type checker) Version: 6.8.3
Severity: normal Keywords:
Cc: Difficulty: Unknown
Test Case: tcrun007, typecheck/should_compile/T2573 Operating System: Unknown/Multiple
Architecture: Unknown/Multiple

Description

A cut-down tcrun007:

{-# LANGUAGE Generics, TypeOperators #-}

import Data.Generics

class Tag a where
  nCons :: a -> Int
  nCons {| a :*: b |} _ = 1

is failing with:

tcrun007.hs:5:0:
    Illegal polymorphic or qualified type: forall a b. a :*: b
    In the type pattern of a generic definition:
      forall a b. a :*: b
    In the class declaration for `Tag'

Change History

09/10/08 02:02:14 changed by simonpj

  • testcase changed from tcrun007 to tcrun007, typecheck/should_compile/T2573.
  • status changed from new to closed.
  • resolution set to fixed.

Fixed by

Wed Sep 10 01:23:13 PDT 2008  simonpj@microsoft.com
  * Fix Trac #2573; and explanatory comment

09/30/08 08:40:43 changed by simonmar

  • architecture changed from Unknown to Unknown/Multiple.

09/30/08 08:51:58 changed by simonmar

  • os changed from Unknown to Unknown/Multiple.