Skip to content

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.

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