X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcBinds.lhs;h=0fee7ab3ce64ffd5bd27e4f1894ef8d689bdb0a1;hp=881c304da454469b548aa23b0c6d4418ca727307;hb=609940166562b6a5f2ff05fc9d00cf26d531c6dd;hpb=a8defd8a5c2efbff5093717449afe73abb5cd8f7 diff --git a/compiler/typecheck/TcBinds.lhs b/compiler/typecheck/TcBinds.lhs index 881c304..0fee7ab 100644 --- a/compiler/typecheck/TcBinds.lhs +++ b/compiler/typecheck/TcBinds.lhs @@ -591,7 +591,7 @@ impSpecErr name tcVectDecls :: [LVectDecl Name] -> TcM ([LVectDecl TcId]) tcVectDecls decls = do { decls' <- mapM (wrapLocM tcVect) decls - ; let ids = [unLoc id | L _ (HsVect id _) <- decls'] + ; let ids = map lvectDeclName decls' dups = findDupsEq (==) ids ; mapM_ reportVectDups dups ; traceTcConstraints "End of tcVectDecls" @@ -642,6 +642,11 @@ tcVect (HsVect name@(L loc _) (Just rhs)) -- to the vectoriser - see "Note [Typechecked vectorisation pragmas]" in HsDecls ; return $ HsVect (L loc id') (Just rhsWrapped) } +tcVect (HsNoVect name) + = addErrCtxt (vectCtxt name) $ + do { id <- wrapLocM tcLookupId name + ; return $ HsNoVect id + } vectCtxt :: Located Name -> SDoc vectCtxt name = ptext (sLit "When checking the vectorisation declaration for") <+> ppr name