[commit: ghc] supercompiler: Pretty print on instance match (fbe7ad2)
Max Bolingbroke <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.cvs.ghc |
|---|---|
| Message-ID | <[email protected]> |
Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : supercompiler http://hackage.haskell.org/trac/ghc/changeset/fbe7ad27c409ab0cdc58111ee6ff7220f0c43c4e >--------------------------------------------------------------- commit fbe7ad27c409ab0cdc58111ee6ff7220f0c43c4e Author: Max Bolingbroke <[email protected]> Date: Thu Feb 2 09:49:17 2012 +0000 Pretty print on instance match >--------------------------------------------------------------- compiler/supercompile/Supercompile/Drive/Match.hs | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/supercompile/Supercompile/Drive/Match.hs b/compiler/supercompile/Supercompile/Drive/Match.hs index 9795a0d..abc0b46 100644 --- a/compiler/supercompile/Supercompile/Drive/Match.hs +++ b/compiler/supercompile/Supercompile/Drive/Match.hs @@ -135,8 +135,10 @@ match' (_deeds_l, Heap h_l ids_l, k_l, qa_l) (_deeds_r, Heap h_r ids_r, k_r, qa_ free_eqs1 <- pprTraceSC "match0" (rn2 `seq` empty) $ matchAnned (matchQA rn2) qa_l qa_r free_eqs2 <- pprTraceSC "match1" empty $ mfree_eqs2 (Heap h_inst _, mr) <- pprTraceSC "match2" (ppr free_eqs1) $ matchPureHeap rn2 k_inst (free_eqs1 ++ free_eqs2) h_l (Heap h_r ids_r) - guard "match': instance" (null k_inst && M.null h_inst) -- FIXME - return mr + if null k_inst && M.null h_inst -- FIXME + then return mr + else pprTrace "instance found" (ppr (length k_inst, M.keysSet h_inst)) $ + fail "match': instance" matchAnned :: (Tag -> a -> Tag -> a -> b) -> Anned a -> Anned a -> b