Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Structural equality, ignoring the variable names.
Synopsis
- eqStmtAnnots :: Maybe ConstExprs -> [(StmtAnnot a, StmtAnnot a)] -> Bool
- eqStmtAnnot :: Maybe ConstExprs -> StmtAnnot a -> StmtAnnot a -> Bool
- eqStmt :: Maybe ConstExprs -> Stmt a -> Stmt a -> Bool
- eqExpr :: Maybe ConstExprs -> Expr -> Expr -> Bool
- eqExprAtom :: ExprAtom -> ExprAtom -> Bool
- eqNameExpr :: NameExpr -> NameExpr -> Bool
- eqLocalDecl :: Maybe ConstExprs -> LocalDecl -> LocalDecl -> Bool
- eqType :: Type -> Type -> Bool
- eqEmit :: Maybe ConstExprs -> Emit -> Emit -> Bool
- eqMaybe :: (a -> a -> Bool) -> Maybe a -> Maybe a -> Bool
Documentation
eqStmtAnnots :: Maybe ConstExprs -> [(StmtAnnot a, StmtAnnot a)] -> Bool Source #
eqStmtAnnot :: Maybe ConstExprs -> StmtAnnot a -> StmtAnnot a -> Bool Source #
eqNameExpr :: NameExpr -> NameExpr -> Bool Source #
All variable names are equal.
We used to ignore temporary names only, considering all other names as globals and a fixed part of the code. This check is quite expensive and it turns out that most of the time the global variables *are* the same. If they are not, we'll need to pass them as arguments to our new function, but this is rare enough so it won't increase the average function parameter list length too much.
eqLocalDecl :: Maybe ConstExprs -> LocalDecl -> LocalDecl -> Bool Source #