#3731: SYB gone wild - mysterious <<loop>> in code derived from an
syb-with-class
example
---------------------------------+------------------------------------------
Reporter: dsf | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.12.1 RC1 | Keywords:
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: Incorrect result at runtime
---------------------------------+------------------------------------------
(From http://www.haskell.org/pipermail/haskell-
cafe/2009-December/070193.html)
In the attached code,
1. if you load the code into ghci and evaluate e it will hang, but
(defaultValueD dict) :: Expression returns fine
2. if you change the gunfold instance for Proposition to, error "gunfold"
it stops hanging -- even though this code is never called.
3. 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...
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3731>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs