Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#8999 closed bug (duplicate)

Type synonym not normalized in instance head

Reported by: edsko Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.8.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:



{-# LANGUAGE ConstraintKinds, KindSignatures #-}

type Foo (m :: * -> *) = Monad m

data T a = T (Maybe a)

instance Foo T where
  return = T Nothing

this gives the bogus error

T.hs:8:3: ‘return’ is not a (visible) method of class ‘Foo’

incidentally, it works okay when giving no where clause.

Change History (2)

comment:1 Changed 3 years ago by monoidal

Resolution: duplicate
Status: newclosed

See #7543.

comment:2 Changed 3 years ago by edsko

Ah, apologies!

Note: See TracTickets for help on using tickets.