GHC has an extra (inner) layer that simply wraps the primitive known in accordance with the requirements of Intabstraction.
data {-# CTYPE "HsInt" #-} Int = I# Int#
As a GHC user, have I ever expected to use it other than understanding that STG will generate type code -# 1#?
Are there any known cases where the GHC generates wrapper code? If so, why?
source
share