+ Vectorisation information
+%* *
+%************************************************************************
+
+\begin{code}
+tcIfaceVectInfo :: Module -> TypeEnv -> IfaceVectInfo -> IfL VectInfo
+tcIfaceVectInfo mod typeEnv (IfaceVectInfo names)
+ = do { ccVars <- mapM ccMapping names
+ ; return $ VectInfo (mkVarEnv ccVars)
+ }
+ where
+ ccMapping name
+ = do { ccName <- lookupOrig mod (mkCloOcc (nameOccName name))
+ ; let { var = lookup name
+ ; ccVar = lookup ccName
+ }
+ ; return (var, (var, ccVar))
+ }
+ lookup name = case lookupTypeEnv typeEnv name of
+ Just (AnId var) -> var
+ Just _ ->
+ panic "TcIface.tcIfaceVectInfo: wrong TyThing"
+ Nothing ->
+ panic "TcIface.tcIfaceVectInfo: unknown name"
+\end{code}
+
+%************************************************************************
+%* *