glsl-0.0.1.1: Parser and optimizer for a small subset of GLSL
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.GLSL.StructuralEquality

Description

Structural equality, ignoring the variable names.

Synopsis

Documentation

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.

eqMaybe :: (a -> a -> Bool) -> Maybe a -> Maybe a -> Bool Source #