X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=Generate.hs;h=23e4a2c7195c6b37cfb8980e174a795c436989cb;hb=77d347006ced194e77aee0f66da98a2028cb259e;hp=26c04480f21c385001b81540985668ab4b209b70;hpb=0c9640079a295e972d4c0a8857faeefcad2fc15d;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/Generate.hs b/Generate.hs index 26c0448..23e4a2c 100644 --- a/Generate.hs +++ b/Generate.hs @@ -7,12 +7,10 @@ import Constants -- constructor from the AST.Expr type, e.g. AST.And. genExprOp2 :: (AST.Expr -> AST.Expr -> AST.Expr) -> [AST.Expr] -> AST.Expr genExprOp2 op [arg1, arg2] = op arg1 arg2 -genExprOp2 _ _ = error "Generate.genExprOp2 wrong number of argumetns" -- | Generate a unary operator application genExprOp1 :: (AST.Expr -> AST.Expr) -> [AST.Expr] -> AST.Expr genExprOp1 op [arg] = op arg -genExprOp1 _ _ = error "Generate.genExprOp1 wrong number of argumetns" -- | Generate a function call from the Function Name and a list of expressions -- (its arguments) @@ -21,16 +19,6 @@ genExprFCall fName args = AST.PrimFCall $ AST.FCall (AST.NSimple fName) $ map (\exp -> Nothing AST.:=>: AST.ADExpr exp) args --- | List version of genExprFCall1 -genExprFCall1L :: AST.VHDLId -> [AST.Expr] -> AST.Expr -genExprFCall1L fName [arg] = genExprFCall fName [arg] -genExprFCall1L _ _ = error "Generate.genExprFCall1L incorrect length" - --- | List version of genExprFCall2 -genExprFCall2L :: AST.VHDLId -> [AST.Expr] -> AST.Expr -genExprFCall2L fName [arg1, arg2] = genExprFCall fName [arg1,arg2] -genExprFCall2L _ _ = error "Generate.genExprFCall2L incorrect length" - genUnconsVectorFuns :: AST.TypeMark -- ^ type of the vector elements -> AST.TypeMark -- ^ type of the vector -> [AST.SubProgBody]