hsExprType returns incorrect type for static forms
hsExprType
has the clause:
hsExprType (HsStatic _ e) = lhsExprType e
but this is wrong, the type of static 0
is not Int
but StaticPtr Int
.
The fix is morally to instead have
hsExprType (HsStatic _ e) = mkTyConApp staticPtrTyCon (lhsExprType e)
but right now StaticPtr
is not wired-in so this is a bit awkward.