Ticket #3731 (closed bug: fixed)
SYB gone wild - mysterious <<loop>> in code derived from an syb-with-class example
| Reported by: | dsf | Owned by: | igloo |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.0.1 |
| Component: | Compiler | Version: | 6.13 |
| Keywords: | Cc: | dsf@…, jeremy@… | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Incorrect result at runtime | Difficulty: | |
| Test Case: | T3731 | Blocked By: | |
| Blocking: | Related Tickets: |
Description
(From http://www.haskell.org/pipermail/haskell-cafe/2009-December/070193.html)
In the attached code,
- if you load the code into ghci and evaluate e it will hang, but (defaultValueD dict) :: Expression returns fine
- if you change the gunfold instance for Proposition to, error "gunfold" it stops hanging -- even though this code is never called.
- if you change, ( Data ctx [Expression], Sat (ctx Expression) => Data ctx Expression, to (Data ctx Expression, ....) => ... it stops hanging.
If someone could explain why each of these cases perform as they do, that would be awesome! Right now it is a big mystery to me.. e calls dict .. and there is only one instance of dict available, which should call error right away. I can't see how something could get in the way there...
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

