Opened 5 years ago

Closed 5 years ago

#3014 closed bug (wontfix)

Any type being derived in Haskell 98 module

Reported by: fasta Owned by:
Priority: normal Milestone:
Component: Compiler (Type checker) Version: 6.10.1
Keywords: any type Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Load the attached module with ghci -ignore-dot-ghci, do :browse and observe the type of z, z :: GHC.Prim.Any -> Double


Attachments (1)

BreakCompiler.hs (119 bytes) - added by fasta 5 years ago.
Minimal test case

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by fasta

Minimal test case

comment:1 Changed 5 years ago by duncan

Hugs says:

z :: a -> Double

ghci-6.6.1 says:

z :: () -> Double

ghci-6.8.2 and ghci-6.10.1 say:

z :: GHC.Prim.Any -> Double

comment:2 Changed 5 years ago by simonmar

  • Difficulty set to Unknown
  • Resolution set to wontfix
  • Status changed from new to closed

As we discussed on IRC, this is due to monomorphic pattern bindings; use -XNoMonoPatBinds to turn them off.

Arguably its an infelicity to see the Any type exposed. However I think we're agreed that the right fix is to implement the Haskell' static semantics for pattern bindings, see #2357.

Note: See TracTickets for help on using tickets.