Ticket #7529 (closed bug: duplicate)

Opened 5 months ago

Last modified 5 months ago

Crash when using (->) instead of (=>) in a typeclass instance

Reported by: Helkafen Owned by:
Priority: normal Milestone:
Component: Compiler (Parser) Version: 7.4.1
Keywords: Cc:
Operating System: Linux Architecture: x86
Type of failure: Compile-time crash Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

import qualified Data.Vector as V import Test.QuickCheck? import Control.Monad (liftM)

instance (Arbitrary a) -> Arbitrary (V.Vector a) where

arbitrary = fmap V.fromList arbitrary

main = do

print "bla"

The arrow is obviously incorrect.

runghc <thisfile> tells me: *** Exception: compiler/rename/RnSource.lhs:429:14-81: Irrefutable pattern failed for pattern Data.Maybe.Just (inst_tyvars,

_, SrcLoc?.L _ cls, _)

Change History

Changed 5 months ago by monoidal

  • status changed from new to closed
  • resolution set to duplicate

Thanks for the report, the bug is already fixed in GHC 7.6.1, see #5951. Now you get

T.hs:5:10:
    Malformed instance: (Arbitrary a) -> Arbitrary (V.Vector a)
Note: See TracTickets for help on using tickets.