#1353: GHCi hangs when type checking
--------------------------------------+-------------------------------------
    Reporter:  [EMAIL PROTECTED]  |        Owner:         
        Type:  bug                    |       Status:  new    
    Priority:  normal                 |    Milestone:         
   Component:  GHCi                   |      Version:  6.6    
    Severity:  normal                 |   Resolution:         
    Keywords:                         |   Difficulty:  Unknown
          Os:  Linux                  |     Testcase:         
Architecture:  x86                    |  
--------------------------------------+-------------------------------------
Comment (by [EMAIL PROTECTED]):

 I've taken out the Mu. I then tried with a standard recursive data type
 and that produced no joy. I then replaced that with an infinite list
 (version attached).

 GHC 6.6:
 {{{
 *Session> :t mkLoop (recvLog >~> returnS ())
 mkLoop (recvLog >~> returnS ()) :: (Show t,
  JustSendsRecvs (SessionSpec (Loop (SessionSpec s)))
                 (SessionSpec (Loop (SessionSpec ol)))
                 (SessionSpec (Loop (SessionSpec il))),
  JustSendsRecvs (SessionSpec (RecvT t (Loop (SessionSpec s))))
                 (SessionSpec (Loop (SessionSpec ol)))
                 (SessionSpec (SessT t (Loop (SessionSpec il)))),
  UnrollLoop (SessionSpec (Loop (SessionSpec il)))
             (SessionSpec (SessT t (Loop (SessionSpec il)))),
  UnrollLoop (SessionSpec (Loop (SessionSpec ol)))
             (SessionSpec (Loop (SessionSpec ol))),
  UnrollLoop (SessionSpec (Loop (SessionSpec s)))
             (SessionSpec (RecvT t (Loop (SessionSpec s))))) =>
 SessionState (SessionSpec (Loop (SessionSpec s)))
              (Loop (SessionSpec ol))
              (Loop (SessionSpec il))
 -> IO ((), SessionState (SessionSpec EndT) EndT EndT)
 }}}

 ghc 20070514:

 {{{
 *Session> :t mkLoop (recvLog >~> returnS ())
 mkLoop (recvLog >~> returnS ()) :: (ReplaceLoopEnd
                                       (SessionSpec il)
                                       (SessionSpec (Loop (SessionSpec
 il)))
                                       (SessionSpec (SessT t (Loop
 (SessionSpec il)))),
                                     ReplaceLoopEnd
                                       (SessionSpec ol)
                                       (SessionSpec (Loop (SessionSpec
 ol)))
                                       (SessionSpec [SessionSpec ol]),
                                     ReplaceLoopEnd
                                       (SessionSpec s)
                                       (SessionSpec (Loop (SessionSpec s)))
                                       (SessionSpec (RecvT t (Loop
 (SessionSpec s)))),
                                     Show t,
                                     JustSendsRecvs (SessionSpec s)
 (SessionSpec ol) (SessionSpec il)) =>
                                    SessionState
                                      (SessionSpec (Loop (SessionSpec s)))
                                      (Loop (SessionSpec ol))
                                      (Loop (SessionSpec il))
                                    -> IO ((), SessionState (SessionSpec
 EndT) EndT EndT)
 }}}

 so the new one is expanding the UnrollLoop into ReplaceLoopEnd... but now,
 ghc 6.6:

 {{{
 *Session> :t Proc $ mkLoop (recvLog >~> returnS ())
 Proc $ mkLoop (recvLog >~> returnS ()) :: (ZeroOrMoreSteps (SessionSpec
 (Loop (SessionSpec s)))
                  (SessionSpec EndT),
  Show t,
  JustSendsRecvs (SessionSpec (Loop (SessionSpec s)))
                 (SessionSpec (Loop (SessionSpec ol)))
                 (SessionSpec (Loop (SessionSpec il))),
  JustSendsRecvs (SessionSpec (RecvT t (Loop (SessionSpec s))))
                 (SessionSpec (Loop (SessionSpec ol)))
                 (SessionSpec (SessT t (Loop (SessionSpec il)))),
  UnrollLoop (SessionSpec (Loop (SessionSpec il)))
             (SessionSpec (SessT t (Loop (SessionSpec il)))),
  UnrollLoop (SessionSpec (Loop (SessionSpec ol)))
             (SessionSpec (Loop (SessionSpec ol))),
  UnrollLoop (SessionSpec (Loop (SessionSpec s)))
             (SessionSpec (RecvT t (Loop (SessionSpec s))))) =>
 Proc (SessionSpec (Loop (SessionSpec s)))
      (SessionSpec EndT)
      (Loop (SessionSpec ol))
      EndT
      (Loop (SessionSpec il))
      EndT
 }}}

 but ghc 20070514:
 {{{
 *Session> :t Proc $ mkLoop (recvLog >~> returnS ())
 ...hang...
 }}}

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