History of DH (Dependent Types in Haskell) contributions
Haskell Community [Unofficial]
March 29, 2026
Here’s a probably stupid idea I had for unification:
HsTerm would contain some form of these fields.
HsVar/HsTyVar
HsOverLit, HsLit/HsTyLit
HsApp/HsAppTy
HsAppType/HsAppKindTy
OpApp/HsOpTy
HsPar/HsParTy
ExplicitTuple/HsExplicitTupleTy
ExplicitList/HsExplicitListTy
ExprWithTySig/HsKindSig
HsUntypedSplice/HsSpliceTy
HsHole/HsWildCardTy
HsForAll/HsForAllTy
HsQual/HsQualTy
HsFunArr/HsFunTy
There would also be a type family that would redirect the term specific things. E.g.
data HsTerm s p =
-- Constructors listed above
HsExprType !(XHsExprType s p) (ExprType s p)
data TermParam = Ty | Ex | Unknown -- like this to avoid name collisions in GHC, qualified imports would probably be used.
type family ExprType where
ExprType Ty = OtherHsType
ExprType Ex = OtherHsExpr
ExprType Unknown= DataCannotHappen
type HsExpr = HsTerm Ex
type HsType = HsTerm Ty
Where OtherHsType and OtherHsExpr contain fields not mentioned above. I mainly propose this, as I think that with PatternSynonyms, this needn’t even be a breaking change.
Discussion in the ATmosphere