Skip to content

Fixity declaration for associated type rejected

When I say

{-# LANGUAGE TypeOperators, TypeFamilies #-}

module Bug where

class C a where
  type a # b
  infix 4 #

I get

Bug.hs:7:11: ‘#’ is not a (visible) method of class ‘C’

But it really should just assign a fixity to the type #. It works if the fixity declaration is outside of the class.

Trac metadata
Trac field Value
Version 7.10.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information