#3731: SYB gone wild - mysterious <<loop>> in code derived from an 
syb-with-class
example
---------------------------------+------------------------------------------
    Reporter:  dsf               |       Owner:                             
        Type:  bug               |      Status:  new                        
    Priority:  normal            |   Milestone:                             
   Component:  Compiler          |     Version:  6.12.1                     
  Resolution:                    |    Keywords:                             
          Os:  Unknown/Multiple  |    Testcase:                             
Architecture:  Unknown/Multiple  |     Failure:  Incorrect result at runtime
---------------------------------+------------------------------------------
Comment (by JeremyShaw):

 I compiled with:

 {{{ghc -S Bug.hs -ddump-simpl -dsuppress-uniques -dcore-lint}}}

 And I get this:
 {{{
 Main.e :: Main.Expression
 [GlobalId]
 []
 Main.e =
   case $dSat
        `cast` ((Main.:Co:TSat) (Main.DefaultD Main.Expression)
                :: (Main.:TSat) (Main.DefaultD Main.Expression)
                     ~
                   Main.DefaultD Main.Expression)
   of tpl { Main.DefaultD ipv ->
   ipv
   }

 Rec {
 $dSat :: Main.Sat (Main.DefaultD Main.Expression)
 [GlobalId]
 []
 $dSat = $dSat
 end Rec }
 }}}

 It seems clear that the loop is caused by:

 {{{$dSat = $dSat}}}

 The question is whether the simplifier is causing the bug, or if the bug
 already exists after desugaring/type checking, and the simplifier is doing
 the right thing.

 I also tried dumping the output after {{{-ddump-ds}}}. But I have not
 studied it enough to figure out if it is doing the right thing or not.

 This bug has popped up several different ways in our code base. :( Is
 there something we can do to get it looked at by someone who might
 understand what is going on?

 thanks!
 - jeremy

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3731#comment:3>
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

Reply via email to