Ticket #1456 (closed bug: fixed)

Opened 5 years ago

Last modified 3 years ago

Wrong type being derived

Reported by: iampure@… Owned by: simonpj
Priority: high Milestone:
Component: Compiler Version: 6.6.1
Keywords: Cc: iampure@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: tc231 Blocked By:
Blocking: Related Tickets:

Description

In the complete small example attached there is some weird behaviour, since () gets derived in one of the cases, but there is no basic for doing so, AFAIK.

Attachments

Odd.hs Download (0.6 KB) - added by iampure@… 5 years ago.
Complete example with some small remarks

Change History

Changed 5 years ago by iampure@…

Complete example with some small remarks

Changed 5 years ago by from an irc discussion

<Heffalump> ahah, here's some interesting behaviour <Heffalump> instance Zork s (Z [Char]) Int <Heffalump> stick that in the same module as your code, and it

type checks fine.

Heffalump> stick it in a different module and import your

existing one, and looking at type of foo results in a type error

Changed 5 years ago by igloo

  • owner set to simonpj

With the HEAD and the binding uncommented I get:

foo :: (Zork t (Z [Char]) GHC.Prim.Any) =>
       STRef t (Q t (Z [Char]) t1) -> ST t ()

Simon, can you confirm whether or not that's the expected behaviour please?

Changed 5 years ago by iampure@…

I encountered this situation today again with the code from bug #1485 in the HEAD of today.

Changed 5 years ago by guest

  • cc iampure@… added

Changed 5 years ago by simonpj

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

Good bug, thank you. Fixed. There was a rather subtle bug in the way 'oclose' works when generalising top-level function definitions. See Note [Important subtlety in oclose] in FunDeps for details.

Simon

Changed 5 years ago by simonpj

  • testcase set to tc231

Changed 3 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 3 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.