X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcBinds.lhs;fp=compiler%2Ftypecheck%2FTcBinds.lhs;h=2eefb8ca9d90ae8f288d319d5d06dc27cd26c2a0;hp=8462403813df07474831eec2088e0be14b536467;hb=a1fae73a83665d7b9134509e80d34ff69a009cc7;hpb=75f9f3559b9959f067c893ae3f7c89da7fd18813 diff --git a/compiler/typecheck/TcBinds.lhs b/compiler/typecheck/TcBinds.lhs index 8462403..2eefb8c 100644 --- a/compiler/typecheck/TcBinds.lhs +++ b/compiler/typecheck/TcBinds.lhs @@ -575,12 +575,13 @@ impSpecErr name , ptext (sLit "(or you compiled its defining module without -O)")]) -------------- -tcVectDecls :: [LVectDecl Name] -> TcM [LVectDecl TcId] +tcVectDecls :: [LVectDecl Name] -> TcM ([LVectDecl TcId]) tcVectDecls decls = do { decls' <- mapM (wrapLocM tcVect) decls ; let ids = [unLoc id | L _ (HsVect id _) <- decls'] dups = findDupsEq (==) ids ; mapM_ reportVectDups dups + ; traceTcConstraints "End of tcVectDecls" ; return decls' } where @@ -598,7 +599,7 @@ tcVect :: VectDecl Name -> TcM (VectDecl TcId) tcVect (HsVect name Nothing) = addErrCtxt (vectCtxt name) $ do { id <- wrapLocM tcLookupId name - ; return (HsVect id Nothing) + ; return $ HsVect id Nothing } tcVect (HsVect name@(L loc _) (Just rhs)) = addErrCtxt (vectCtxt name) $ @@ -613,9 +614,10 @@ tcVect (HsVect name@(L loc _) (Just rhs)) ; (binds, [id']) <- tcPolyInfer TopLevel False sigFun pragFun NonRecursive [bind] ; traceTc "tcVect inferred type" $ ppr (varType id') + ; traceTc "tcVect bindings" $ ppr binds - -- add the type variable and dictionary bindings produced by type generalisation to the - -- right-hand side of the vectorisation declaration + -- add all bindings, including the type variable and dictionary bindings produced by type + -- generalisation to the right-hand side of the vectorisation declaration ; let [AbsBinds tvs evs _ evBinds actualBinds] = (map unLoc . bagToList) binds ; let [bind'] = bagToList actualBinds MatchGroup