import OccName
import Id
import MkId
-import BasicTypes ( StrictnessMark(..), boolToRecFlag,
- dfunInlinePragma )
+import BasicTypes ( HsBang(..), boolToRecFlag,
+ alwaysInlinePragma, dfunInlinePragma )
import Var ( Var, TyVar, varType )
import Name ( Name, getOccName )
import NameEnv
liftDs $ buildDataCon name'
False -- not infix
- (map (const NotMarkedStrict) arg_tys)
+ (map (const HsNoBang) arg_tys)
[] -- no labelled fields
univ_tvs
[] -- no existential tvs for now
liftDs $ buildDataCon dc_name
False -- not infix
- (map (const NotMarkedStrict) comp_tys)
+ (map (const HsNoBang) comp_tys)
[] -- no field labels
tvs
[] -- no existentials
raw_worker <- cloneId mkVectOcc orig_worker (exprType body)
let vect_worker = raw_worker `setIdUnfolding`
- mkInlineRule InlSat body arity
+ mkInlineRule body (Just arity)
defGlobalVar orig_worker vect_worker
return (vect_worker, body)
where
let body = mkLams (tvs ++ args) expr
raw_var <- newExportedVar (method_name name) (exprType body)
let var = raw_var
- `setIdUnfolding` mkInlineRule InlSat body (length args)
+ `setIdUnfolding` mkInlineRule body (Just (length args))
+ `setInlinePragma` alwaysInlinePragma
hoistBinding var body
return var