--- | A function to wrap a builder-like function that expects its arguments to
--- be Literals
-genLitArgs ::
- (dst -> func -> [Literal.Literal] -> TranslatorSession [AST.ConcSm])
- -> (dst -> func -> [Either CoreSyn.CoreExpr AST.Expr] -> TranslatorSession [AST.ConcSm])
-genLitArgs wrap dst func args = do
- hscenv <- MonadState.lift tsType $ MonadState.get tsHscEnv
- let (exprargs, []) = Either.partitionEithers args
- -- FIXME: Check if we were passed an CoreSyn.App
- let litargs = concatMap (getLiterals hscenv) exprargs
- let args' = map exprToLit litargs
- wrap dst func args'
-