#2722: <<loop> when compiling with -O option with ghc-6.10.0.20081019
-------------------------------+--------------------------------------------
 Reporter:  uwe                |          Owner:         
     Type:  bug                |         Status:  new    
 Priority:  normal             |      Milestone:  Not GHC
Component:  libraries (other)  |        Version:  6.10.1 
 Severity:  normal             |     Resolution:         
 Keywords:  arrows             |     Difficulty:  Unknown
 Testcase:                     |   Architecture:  x86    
       Os:  Linux              |  
-------------------------------+--------------------------------------------
Comment (by simonpj):

 Well the `Arrow` class in `Control.Arrow` is immediately followed by a
 whole bunch of rules:
 {{{
 {-# RULES
 "identity"
                 arr id = id
 "compose/arr"   forall f g .
                 (arr f) . (arr g) = arr (f . g)
 "first/arr"     forall f .
                 first (arr f) = arr (first f)
 "second/arr"    forall f .
                 second (arr f) = arr (second f)
 "product/arr"   forall f g .
                 arr f *** arr g = arr (f *** g)
 "fanout/arr"    forall f g .
                 arr f &&& arr g = arr (f &&& g)
 "compose/first" forall f g .
                 (first f) . (first g) = first (f . g)
 "compose/second" forall f g .
                 (second f) . (second g) = second (f . g)
  #-}
 }}}
 If you are saying that they are not valid in general (eg you say the first
 is valid only for `(->)`), then these rules had better be speicialised for
 the types they work for.

 Can you and Ross discuss this, and figure out what to do? It's not a GHC
 issue any more: rather a question of the Arrow/Category library design.

 Simon

 PS: Yes if you define `id` explicitly that ought to be ok.  But remember
 that the RULE `arr id ---> id` is still going to apply (perhaps bogusly?)
 at all arrows.  So you want to do more than work around the problem.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2722#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to