Re: [GHC] #7364: `foo !f = id . f` becomes non-strict with -O2

2012-11-06 Thread GHC
#7364: `foo !f = id . f` becomes non-strict with -O2
--+-
  Reporter:  shachaf  |  Owner:  
  Type:  bug  | Status:  closed  
  Priority:  normal   |  Milestone:  _|_ 
 Component:  Compiler |Version:  7.6.1   
Resolution:  wontfix  |   Keywords:  
Os:  Unknown/Multiple |   Architecture:  Unknown/Multiple
   Failure:  Incorrect result at runtime  | Difficulty:  Unknown 
  Testcase:   |  Blockedby:  
  Blocking:   |Related:  
--+-
Changes (by simonmar):

  * status:  new => closed
  * resolution:  => wontfix


Comment:

 Yes, good idea - closing as wonfix (the closest we have to "not fixed")

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7364: `foo !f = id . f` becomes non-strict with -O2

2012-11-05 Thread GHC
#7364: `foo !f = id . f` becomes non-strict with -O2
-+--
Reporter:  shachaf   |   Owner: 
Type:  bug   |  Status:  new
Priority:  normal|   Milestone:  _|_
   Component:  Compiler  | Version:  7.6.1  
Keywords:|  Os:  Unknown/Multiple   
Architecture:  Unknown/Multiple  | Failure:  Incorrect result at runtime
  Difficulty:  Unknown   |Testcase: 
   Blockedby:|Blocking: 
 Related:|  
-+--

Comment(by simonpj):

 Or maybe we should mark both as not-fixed.  There is an underlying problem
 here; it's just that we don't know how to solve it.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7364: `foo !f = id . f` becomes non-strict with -O2

2012-11-05 Thread GHC
#7364: `foo !f = id . f` becomes non-strict with -O2
-+--
Reporter:  shachaf   |   Owner: 
Type:  bug   |  Status:  new
Priority:  normal|   Milestone:  _|_
   Component:  Compiler  | Version:  7.6.1  
Keywords:|  Os:  Unknown/Multiple   
Architecture:  Unknown/Multiple  | Failure:  Incorrect result at runtime
  Difficulty:  Unknown   |Testcase: 
   Blockedby:|Blocking: 
 Related:|  
-+--

Comment(by simonmar):

 #5587 is marked fixed; maybe we should do the same with this one?

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7364: `foo !f = id . f` becomes non-strict with -O2

2012-11-05 Thread GHC
#7364: `foo !f = id . f` becomes non-strict with -O2
-+--
Reporter:  shachaf   |   Owner: 
Type:  bug   |  Status:  new
Priority:  normal|   Milestone:  _|_
   Component:  Compiler  | Version:  7.6.1  
Keywords:|  Os:  Unknown/Multiple   
Architecture:  Unknown/Multiple  | Failure:  Incorrect result at runtime
  Difficulty:  Unknown   |Testcase: 
   Blockedby:|Blocking: 
 Related:|  
-+--
Changes (by simonpj):

  * difficulty:  => Unknown
  * milestone:  => _|_


Comment:

 Indeed.  See #5587 and the
 [http://www.haskell.org/ghc/docs/latest/html/users_guide/bugs-and-
 infelicities.html#infelicities-exprs-pats user manual section].  I still
 don't know how to get good optimisation without accepting this infelicity.
 Better ideas welcome.

 Simon

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7364: `foo !f = id . f` becomes non-strict with -O2

2012-11-04 Thread GHC
#7364: `foo !f = id . f` becomes non-strict with -O2
-+--
 Reporter:  shachaf  |  Owner:  
 Type:  bug  | Status:  new 
 Priority:  normal   |  Component:  Compiler
  Version:  7.6.1|   Keywords:  
   Os:  Unknown/Multiple |   Architecture:  Unknown/Multiple
  Failure:  Incorrect result at runtime  |   Testcase:  
Blockedby:   |   Blocking:  
  Related:   |  
-+--

Comment(by ezyang):

 Oh, not true, I'm confused about pass ordering; it is a problem with the
 simplifier, not the specializer.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7364: `foo !f = id . f` becomes non-strict with -O2

2012-11-04 Thread GHC
#7364: `foo !f = id . f` becomes non-strict with -O2
-+--
 Reporter:  shachaf  |  Owner:  
 Type:  bug  | Status:  new 
 Priority:  normal   |  Component:  Compiler
  Version:  7.6.1|   Keywords:  
   Os:  Unknown/Multiple |   Architecture:  Unknown/Multiple
  Failure:  Incorrect result at runtime  |   Testcase:  
Blockedby:   |   Blocking:  
  Related:   |  
-+--

Comment(by ezyang):

 Looks like a bug in the specializer.

 {{{
 ezyang@javelin:~/Dev/haskell$ ../ghc-build-master/inplace/bin/ghc-stage2
 strict.hs -fforce-recomp -O -ddump-spec
 [1 of 1] Compiling Main ( strict.hs, strict.o )

  Specialise 
 Result size of Specialise = {terms: 19, types: 27, coercions: 10}

 a_sn2
   :: GHC.Prim.State# GHC.Prim.RealWorld
  -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)
 [LclId,
  Arity=1,
  Unf=Unf{Src=, TopLvl=True, Arity=1, Value=True,
  ConLike=True, WorkFree=True, Expandable=True,
  Guidance=IF_ARGS [0] 91 60}]
 a_sn2 =
   \ (eta_B1 :: GHC.Prim.State# GHC.Prim.RealWorld) ->
 ((System.IO.print
 @ [GHC.Types.Char]
 (GHC.Show.$fShow[] @ GHC.Types.Char GHC.Show.$fShowChar)
 (GHC.Base.build
@ GHC.Types.Char
(\ (@ b_amP) -> GHC.CString.unpackFoldrCString# @ b_amP
 "ok"#)))
  `cast` (GHC.Types.NTCo:IO <()>
  :: GHC.Types.IO ()
   ~#
 (GHC.Prim.State# GHC.Prim.RealWorld
  -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #
   eta_B1

 Main.main :: GHC.Types.IO ()
 [LclIdX,
  Arity=1,
  Unf=Unf{Src=, TopLvl=True, Arity=0, Value=True,
  ConLike=True, WorkFree=True, Expandable=True,
  Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)}]
 Main.main =
   a_sn2
   `cast` (Sym (GHC.Types.NTCo:IO <()>)
   :: (GHC.Prim.State# GHC.Prim.RealWorld
   -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #))
~#
  GHC.Types.IO ())

 a_sn4
   :: GHC.Prim.State# GHC.Prim.RealWorld
  -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)
 [LclId,
  Arity=1,
  Unf=Unf{Src=, TopLvl=True, Arity=1, Value=True,
  ConLike=True, WorkFree=True, Expandable=True,
  Guidance=IF_ARGS [0] 21 60}]
 a_sn4 =
   \ (eta_Xb :: GHC.Prim.State# GHC.Prim.RealWorld) ->
 ((GHC.TopHandler.runMainIO @ () Main.main)
  `cast` (GHC.Types.NTCo:IO <()>
  :: GHC.Types.IO ()
   ~#
 (GHC.Prim.State# GHC.Prim.RealWorld
  -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #
   eta_Xb

 :Main.main :: GHC.Types.IO ()
 [LclIdX,
  Arity=1,
  Unf=Unf{Src=, TopLvl=True, Arity=0, Value=True,
  ConLike=True, WorkFree=True, Expandable=True,
  Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)}]
 :Main.main =
   a_sn4
   `cast` (Sym (GHC.Types.NTCo:IO <()>)
   :: (GHC.Prim.State# GHC.Prim.RealWorld
   -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #))
~#
  GHC.Types.IO ())



 Linking strict ...

 }}}

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs