#4420: T3851 fails because of untouchable type variables and escaping skolems
----------------------------------+-----------------------------------------
    Reporter:  daniel.is.fischer  |       Owner:              
        Type:  bug                |      Status:  new         
    Priority:  normal             |   Component:  Test Suite  
     Version:  7.1                |    Keywords:              
    Testcase:                     |   Blockedby:              
          Os:  Unknown/Multiple   |    Blocking:              
Architecture:  Unknown/Multiple   |     Failure:  None/Unknown
----------------------------------+-----------------------------------------
 {{{
 =====> T3851(normal) 1990 of 2612 [0, 7, 0]
 cd ./indexed-types/should_compile &&
 '/home/dafis/Haskell/Hacking/testTree/bindisttest/install dir/bin/ghc'
 -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-
 conf -rtsopts  -c T3851.hs    >T3851.comp.stderr 2>&1
 Wrong exit code (expected 0 , actual 2 )
 Stdout:

 Stderr:

 IndTypesPerfMerge.hs:90:5:
     Couldn't match type `a1' with `UnmergedLeft (MergerType a1 b1)'
     because a1 is untouchable
     inside the constraints (Merger (DiscardRightHead h1 t1 h2 t2),
                             t1 ~ UnmergedLeft (MergerType t1 t2),
                             t2 ~ UnmergedRight (MergerType t1 t2),
                             Mergeable t1 t2,
                             Merger (MergerType t1 t2))
       bound at the instance declaration
     In the instance declaration for `Merger
                                        (DiscardRightHead h1 t1 h2 t2)'

 IndTypesPerfMerge.hs:90:5:
     Couldn't match type `b1' with `UnmergedRight (MergerType a1 b1)'
     because b1 is untouchable
     inside the constraints (Merger (DiscardRightHead h1 t1 h2 t2),
                             t1 ~ UnmergedLeft (MergerType t1 t2),
                             t2 ~ UnmergedRight (MergerType t1 t2),
                             Mergeable t1 t2,
                             Merger (MergerType t1 t2))
       bound at the instance declaration
     In the instance declaration for `Merger
                                        (DiscardRightHead h1 t1 h2 t2)'

 IndTypesPerfMerge.hs:98:16:
     Couldn't match type `t1' with `UnmergedLeft (MergerType a1 b1)'
       `t1' is a rigid type variable bound by
            the instance declaration at IndTypesPerfMerge.hs:90:16
     In the pattern: h1 :* t1
     In an equation for `mkMerge':
         mkMerge _ (h1 :* t1) (h2 :* t2)
           = h1 :* mkMerge (merger t1 t2) t1 t2
     In the instance declaration for `Merger
                                        (DiscardRightHead h1 t1 h2 t2)'

 IndTypesPerfMerge.hs:98:27:
     Couldn't match type `t2' with `UnmergedRight (MergerType a1 b1)'
       `t2' is a rigid type variable bound by
            the instance declaration at IndTypesPerfMerge.hs:90:19
     In the pattern: h2 :* t2
     In an equation for `mkMerge':
         mkMerge _ (h1 :* t1) (h2 :* t2)
           = h1 :* mkMerge (merger t1 t2) t1 t2
     In the instance declaration for `Merger
                                        (DiscardRightHead h1 t1 h2 t2)'

 IndTypesPerfMerge.hs:101:5:
     Couldn't match type `a'
                    with `UnmergedLeft (MergerType a (h2 :* t2))'
       because these skolem type variables would escape: `h2', `t2'
     These skolems are bound by the instance declaration
     In the instance declaration for `Merger
                                        (LeftHeadFirst h1 t1 h2 t2)'

 IndTypesPerfMerge.hs:109:16:
     Couldn't match type `t1'
                    with `UnmergedLeft (MergerType a (h2 :* t2))'
       `t1' is a rigid type variable bound by
            the instance declaration at IndTypesPerfMerge.hs:101:16
     In the pattern: h1 :* t1
     In an equation for `mkMerge':
         mkMerge _ (h1 :* t1) (h2 :* t2)
           = h1 :* mkMerge (merger t1 (h2 :* t2)) t1 (h2 :* t2)
     In the instance declaration for `Merger
                                        (LeftHeadFirst h1 t1 h2 t2)'

 IndTypesPerfMerge.hs:112:5:
     Couldn't match type `b'
                    with `UnmergedRight (MergerType (h1 :* t1) b)'
       because these skolem type variables would escape: `h1', `t1'
     These skolems are bound by the instance declaration
     In the instance declaration for `Merger
                                        (RightHeadFirst h1 t1 h2 t2)'

 IndTypesPerfMerge.hs:120:27:
     Couldn't match type `t2'
                    with `UnmergedRight (MergerType (h1 :* t1) b)'
       `t2' is a rigid type variable bound by
            the instance declaration at IndTypesPerfMerge.hs:112:27
     In the pattern: h2 :* t2
     In an equation for `mkMerge':
         mkMerge _ (h1 :* t1) (h2 :* t2)
           = h2 :* mkMerge (merger (h1 :* t1) t2) (h1 :* t1) t2
     In the instance declaration for `Merger
                                        (RightHeadFirst h1 t1 h2 t2)'
 gmake[3]: *** [IndTypesPerf] Fehler 1

 *** unexpected failure for IndTypesPerf(normal)
 }}}

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