collectAnnValBinders :: AnnExpr Var ann -> ([Var], AnnExpr Var ann)
collectAnnValBinders expr = go [] expr
where
collectAnnValBinders :: AnnExpr Var ann -> ([Var], AnnExpr Var ann)
collectAnnValBinders expr = go [] expr
where
- go bs (_, AnnLam b e) | isId b = go (b:bs) e
- go bs e = (reverse bs, e)
+ go bs (_, AnnLam b e) | isIdVar b = go (b:bs) e
+ go bs e = (reverse bs, e)
isAnnTypeArg :: AnnExpr b ann -> Bool
isAnnTypeArg (_, AnnType _) = True
isAnnTypeArg :: AnnExpr b ann -> Bool
isAnnTypeArg (_, AnnType _) = True
- arr <- traceMaybeV "mkPArrayType" (ppr tycon)
- $ lookupPrimPArray tycon
- return $ mkTyConApp arr []
+ r <- lookupPrimPArray tycon
+ case r of
+ Just arr -> return $ mkTyConApp arr []
+ Nothing -> cantVectorise "Primitive tycon not vectorised" (ppr tycon)
mkPArrayType ty = mkBuiltinTyConApp parrayTyCon [ty]
mkBuiltinCo :: (Builtins -> TyCon) -> VM Coercion
mkPArrayType ty = mkBuiltinTyConApp parrayTyCon [ty]
mkBuiltinCo :: (Builtins -> TyCon) -> VM Coercion
paMethod :: PAMethod -> Type -> VM CoreExpr
paMethod (_method, name) ty
| Just tycon <- splitPrimTyCon ty
paMethod :: PAMethod -> Type -> VM CoreExpr
paMethod (_method, name) ty
| Just tycon <- splitPrimTyCon ty