Re: [GHC] #5303: GHC crash (panic) with -O2 and nonexistent .hi

2011-08-01 Thread GHC
#5303: GHC crash (panic) with -O2 and nonexistent .hi
-+--
  Reporter:  mornfall|  Owner:
  Type:  bug | Status:  closed
  Priority:  high|  Milestone:  7.2.1 
 Component:  Compiler|Version:  7.0.3 
Resolution:  fixed   |   Keywords:
  Testcase:  simplCore/should_compile/T5303  |  Blockedby:
Difficulty:  | Os:  Linux 
  Blocking:  |   Architecture:  x86   
   Failure:  Compile-time crash  |  
-+--
Changes (by simonmar):

  * testcase:  simplCore/should_compile/T303 =
   simplCore/should_compile/T5303


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


Re: [GHC] #5303: GHC crash (panic) with -O2 and nonexistent .hi

2011-07-24 Thread GHC
#5303: GHC crash (panic) with -O2 and nonexistent .hi
-+--
Reporter:  mornfall  |Owner:   
Type:  bug   |   Status:  merge
Priority:  high  |Milestone:  7.2.1
   Component:  Compiler  |  Version:  7.0.3
Keywords:| Testcase:  simplCore/should_compile/T303
   Blockedby:|   Difficulty:   
  Os:  Linux | Blocking:   
Architecture:  x86   |  Failure:  Compile-time crash   
-+--
Description changed by igloo:

Old description:

 14:13:47 | morn@ald:~/dev/darcs/prims-v3 - ghc test.hs
 [1 of 1] Compiling Test ( test.hs, test.o )
 14:13:51 | morn@ald:~/dev/darcs/prims-v3 - ghc -O2 test.hs
 14:13:52 | morn@ald:~/dev/darcs/prims-v3 - rm test.{hi,o}
 14:14:03 | morn@ald:~/dev/darcs/prims-v3 - ghc -O2 test.hs
 [1 of 1] Compiling Test ( test.hs, test.o )
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.0.3 for i386-unknown-linux):
 funResultTy
 predmain:Test.ApplyState{tc rrv} p{tv aBn} [sk]
 ~
   hashed-storage-0.5.7:Storage.Hashed.Tree.Tree{tc r4Y}

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

 I am attaching the test.hs that causes this. It needs hashed-storage and
 mtl from hackage to build, but otherwise it should be fairly minimal. I
 suppose I could cut it down further to only need mtl, but I already spent
 an hour tracking this down instead of getting work done. If you do need a
 further cutdown, let me know though, and I can try.

 14:12:26 | morn@ald:~ - ghc --version
 The Glorious Glasgow Haskell Compilation System, version 7.0.3

 (GHC installed from Debian packages)

New description:

 {{{
 14:13:47 | morn@ald:~/dev/darcs/prims-v3 - ghc test.hs
 [1 of 1] Compiling Test ( test.hs, test.o )
 14:13:51 | morn@ald:~/dev/darcs/prims-v3 - ghc -O2 test.hs
 14:13:52 | morn@ald:~/dev/darcs/prims-v3 - rm test.{hi,o}
 14:14:03 | morn@ald:~/dev/darcs/prims-v3 - ghc -O2 test.hs
 [1 of 1] Compiling Test ( test.hs, test.o )
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.0.3 for i386-unknown-linux):
 funResultTy
 predmain:Test.ApplyState{tc rrv} p{tv aBn} [sk]
 ~
   hashed-storage-0.5.7:Storage.Hashed.Tree.Tree{tc r4Y}

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}
 I am attaching the test.hs that causes this. It needs hashed-storage and
 mtl from hackage to build, but otherwise it should be fairly minimal. I
 suppose I could cut it down further to only need mtl, but I already spent
 an hour tracking this down instead of getting work done. If you do need a
 further cutdown, let me know though, and I can try.
 {{{
 14:12:26 | morn@ald:~ - ghc --version
 The Glorious Glasgow Haskell Compilation System, version 7.0.3
 }}}
 (GHC installed from Debian packages)

--

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


Re: [GHC] #5303: GHC crash (panic) with -O2 and nonexistent .hi

2011-07-24 Thread GHC
#5303: GHC crash (panic) with -O2 and nonexistent .hi
+---
  Reporter:  mornfall   |  Owner:
  Type:  bug| Status:  closed
  Priority:  high   |  Milestone:  7.2.1 
 Component:  Compiler   |Version:  7.0.3 
Resolution:  fixed  |   Keywords:
  Testcase:  simplCore/should_compile/T303  |  Blockedby:
Difficulty: | Os:  Linux 
  Blocking: |   Architecture:  x86   
   Failure:  Compile-time crash |  
+---
Changes (by igloo):

  * status:  merge = closed
  * resolution:  = fixed


Comment:

 Merged as changeset:2b6a6e88dfea7aa7f9372683e618ee73d0790c1b.

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


Re: [GHC] #5303: GHC crash (panic) with -O2 and nonexistent .hi

2011-07-22 Thread GHC
#5303: GHC crash (panic) with -O2 and nonexistent .hi
-+--
Reporter:  mornfall  |Owner:   
Type:  bug   |   Status:  merge
Priority:  high  |Milestone:  7.2.1
   Component:  Compiler  |  Version:  7.0.3
Keywords:| Testcase:  simplCore/should_compile/T303
   Blockedby:|   Difficulty:   
  Os:  Linux | Blocking:   
Architecture:  x86   |  Failure:  Compile-time crash   
-+--
Changes (by simonpj):

  * status:  new = merge
  * testcase:  = simplCore/should_compile/T303


Comment:

 I believe that, despite the commit message, this patch fixes the bug
 {{{
 commit e91c7ea8afb81f0ed184437f3eef840e5faf047c
 Author: Simon Peyton Jones simo...@microsoft.com
 Date:   Fri Jul 15 17:14:10 2011 +0100

 A bit more work to to keep the right in-scope set around

 This change gets rid of a debug WARNING; it wasn't
 actually making anything go wrong, but it's best to
 have the correct in-scope set.

  compiler/typecheck/TcInstDcls.lhs |6 ++-
  compiler/types/Coercion.lhs   |   18 +++
  compiler/types/OptCoercion.lhs|   98
 +++--
  3 files changed, 61 insertions(+), 61 deletions(-)
 }}}
 I think I just forgot what I had fixed!  Anyway, it certainly works now,
 and I've added a test. Thanks for reporting it.

 Pls merge to 7.2

 Simon

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


Re: [GHC] #5303: GHC crash (panic) with -O2 and nonexistent .hi

2011-07-13 Thread GHC
#5303: GHC crash (panic) with -O2 and nonexistent .hi
-+--
Reporter:  mornfall  |Owner:
Type:  bug   |   Status:  new   
Priority:  high  |Milestone:  7.2.1 
   Component:  Compiler  |  Version:  7.0.3 
Keywords:| Testcase:
   Blockedby:|   Difficulty:
  Os:  Linux | Blocking:
Architecture:  x86   |  Failure:  Compile-time crash
-+--
Changes (by simonpj):

 * cc: dimitris@… (added)


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


Re: [GHC] #5303: GHC crash (panic) with -O2 and nonexistent .hi

2011-07-12 Thread GHC
#5303: GHC crash (panic) with -O2 and nonexistent .hi
-+--
Reporter:  mornfall  |Owner:
Type:  bug   |   Status:  new   
Priority:  high  |Milestone:  7.2.1 
   Component:  Compiler  |  Version:  7.0.3 
Keywords:| Testcase:
   Blockedby:|   Difficulty:
  Os:  Linux | Blocking:
Architecture:  x86   |  Failure:  Compile-time crash
-+--

Comment(by simonmar):

 confirmed:

 {{{
 $ ghc -O2 5303.hs
 [1 of 1] Compiling Test ( 5303.hs, 5303.o )
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.0.3 for x86_64-unknown-linux):
 funResultTy
 predmain:Test.ApplyState{tc rrv} p{tv aBn} [sk]
 ~
   hashed-storage-0.5.6:Storage.Hashed.Tree.Tree{tc r4V}
 }}}

 unfortunately I can't test with HEAD because hashed-storage doesn't
 install:

 {{{
 $ cabal install hashed-storage
 Resolving dependencies...
 cabal: cannot configure dataenc-0.14. It requires base =3.0.0  4.4
 For the dependency on base =3.0.0  4.4 there are these packages:
 base-3.0.3.1, base-3.0.3.2, base-4.0.0.0, base-4.1.0.0, base-4.2.0.0,
 base-4.2.0.1, base-4.2.0.2, base-4.3.0.0 and base-4.3.1.0. However none of
 them are available.
 }}}

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


Re: [GHC] #5303: GHC crash (panic) with -O2 and nonexistent .hi

2011-07-12 Thread GHC
#5303: GHC crash (panic) with -O2 and nonexistent .hi
-+--
Reporter:  mornfall  |Owner:
Type:  bug   |   Status:  new   
Priority:  high  |Milestone:  7.2.1 
   Component:  Compiler  |  Version:  7.0.3 
Keywords:| Testcase:
   Blockedby:|   Difficulty:
  Os:  Linux | Blocking:
Architecture:  x86   |  Failure:  Compile-time crash
-+--

Comment(by mornfall):

 Ok, I distilled the test case further (still crashing for me):

 {{{
 {-# LANGUAGE KindSignatures, GADTs, TypeFamilies, MultiParamTypeClasses,
 FlexibleContexts, ScopedTypeVariables, TypeSynonymInstances,
 FlexibleInstances #-}
 module Test( showContextSeries ) where

 import Control.Monad.State.Strict( StateT )
 import Control.Monad.Trans ( lift )

 data Tree m = Tree {}

 data FL (a :: * - * - *) x z where
 (::) :: a x y - FL a y z - FL a x z
 NilFL :: FL a x x

 class (Functor m, Monad m) = ApplyMonad m (state :: (* - *) - *)

 class Apply (p :: * - * - *) where
 type ApplyState p :: (* - *) - *
 apply :: ApplyMonad m (ApplyState p) = p x y - m ()

 class (Functor m, Monad m, ApplyMonad (ApplyMonadOver m state) state)
   = ApplyMonadTrans m (state :: (* - *) - *) where
   type ApplyMonadOver m state :: * - *
   runApplyMonad :: (ApplyMonadOver m state) x - state m - m (x, state m)

 instance (Functor m, Monad m) = ApplyMonadTrans m Tree where
   type ApplyMonadOver m Tree = TreeMonad m
   runApplyMonad = virtualTreeMonad

 instance (Functor m, Monad m) = ApplyMonad (TreeMonad m) Tree

 -- | Internal state of the 'TreeIO' monad. Keeps track of the current Tree
 -- content, unsync'd changes and a current working directory (of the
 monad).
 data TreeState m = TreeState { tree :: !(Tree m) }
 type TreeMonad m = StateT (TreeState m) m
 type TreeIO = TreeMonad IO

 virtualTreeMonad :: (Functor m, Monad m) = TreeMonad m a - Tree m - m
 (a, Tree m)
 virtualTreeMonad action t = undefined

 applyToState :: forall p m x y. (Apply p, ApplyMonadTrans m (ApplyState
 p))
  = p x y - (ApplyState p) m - m ((ApplyState p) m)
 applyToState _ _ = snd `fmap` runApplyMonad undefined undefined

 showContextSeries :: (Apply p, ApplyState p ~ Tree) = FL p x y - TreeIO
 ()
 showContextSeries (p::_) = (undefined = lift . applyToState p) 
 return ()

 }}}

 Still needs MTL, but you could at least in theory get rid of that as well.
 Whether it is practical, I can't say without trying.

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


Re: [GHC] #5303: GHC crash (panic) with -O2 and nonexistent .hi

2011-07-05 Thread GHC
#5303: GHC crash (panic) with -O2 and nonexistent .hi
-+--
Reporter:  mornfall  |   Owner:
Type:  bug   |  Status:  new   
Priority:  normal|   Component:  Compiler  
 Version:  7.0.3 |Keywords:
Testcase:|   Blockedby:
  Os:  Linux |Blocking:
Architecture:  x86   | Failure:  Compile-time crash
-+--

Comment(by mornfall):

 (sorry about the formatting, but trac won't let me edit it now... let me
 try again)
 {{{

 14:13:51 | morn@ald:~/dev/darcs/prims-v3 - ghc -O2 test.hs
 14:13:52 | morn@ald:~/dev/darcs/prims-v3 - rm test.{hi,o}
 14:14:03 | morn@ald:~/dev/darcs/prims-v3 - ghc -O2 test.hs
 [1 of 1] Compiling Test ( test.hs, test.o )
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.0.3 for i386-unknown-linux):
 funResultTy
 predmain:Test.ApplyState{tc rrv} p{tv aBn} [sk]
 ~
   hashed-storage-0.5.7:Storage.Hashed.Tree.Tree{tc r4Y}

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}

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