Skip to content

Primitive constant unfolding

Examining the core generated by ghc with -O2 on a numerical code, I saw things like :

case GHC.Prim.<## x_aB9 (GHC.Prim.**## 2.0 -1021.0) of _  {...

This code being executed each time my code performs an addition ! GHC does not seem to unfold the constants right with at least **##. By the way, it should definitely be possible to specify a Double# constant in hexadecimal.

Edited by Ian Lynagh -
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information