Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : type-nats

http://hackage.haskell.org/trac/ghc/changeset/813c0437d716c9e68fa3866314558e06c71f2569

>---------------------------------------------------------------

commit 813c0437d716c9e68fa3866314558e06c71f2569
Author: Iavor S. Diatchki <[email protected]>
Date:   Sun May 13 19:06:11 2012 -0700

    Add a function to fold the inert function equalities.
    
    It is used to extract and group the propositions relevant for
    the type-nat solver.

>---------------------------------------------------------------

 compiler/typecheck/TcSMonad.lhs |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/compiler/typecheck/TcSMonad.lhs b/compiler/typecheck/TcSMonad.lhs
index 287783c..044b4a6 100644
--- a/compiler/typecheck/TcSMonad.lhs
+++ b/compiler/typecheck/TcSMonad.lhs
@@ -75,7 +75,7 @@ module TcSMonad (
     CCanMap(..), CtTypeMap, CtFamHeadMap, CtPredMap,
     PredMap, FamHeadMap,
     partCtFamHeadMap, lookupFamHead,
-
+    foldFamHeadMap,
 
     instDFunType,                              -- Instantiation
     newFlexiTcSTy, instFlexiTcS,
@@ -406,6 +406,9 @@ partCtFamHeadMap f ctmap
                       = ty1 
                       | otherwise 
                       = panic "partCtFamHeadMap, encountered non equality!"
+
+foldFamHeadMap :: (a -> b -> b) -> b -> FamHeadMap a -> b
+foldFamHeadMap f a (FamHeadMap m) = foldTypeMap f a m
 \end{code}
 
 %************************************************************************



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to