-
This commit adds support for testing floating-point expressions. The Expr datatype is separated into IExpr (integer expressions) and FExpr (floating-point expressions). We use a coarser notion of equality for floating-point expression, wherein any two NaN values compare equal. This is because GHC does not (yet) preserve NaN signs or payloads according to the IEEE754 specification. It is hoped that this workaround can be lifted in the future after the appropriate improvements are made to GHC's support of floating point. Also adds some simple parser round-tripping tests that check that the Show instance of Expr is compatible with the parser. Co-authored-by:sheaf <sam.derbyshire@gmail.com>
This commit adds support for testing floating-point expressions. The Expr datatype is separated into IExpr (integer expressions) and FExpr (floating-point expressions). We use a coarser notion of equality for floating-point expression, wherein any two NaN values compare equal. This is because GHC does not (yet) preserve NaN signs or payloads according to the IEEE754 specification. It is hoped that this workaround can be lifted in the future after the appropriate improvements are made to GHC's support of floating point. Also adds some simple parser round-tripping tests that check that the Show instance of Expr is compatible with the parser. Co-authored-by:sheaf <sam.derbyshire@gmail.com>
Loading