dollarId :: Id  -- Note [dollarId magic]
dollarId = pcMiscPrelId dollarName ty
             (noCafIdInfo `setUnfoldingInfo` unf)
  where
    fun_ty = mkFunTy alphaTy openBetaTy
    ty     = mkForAllTys [alphaTyVar, openBetaTyVar] $
             mkFunTy fun_ty fun_ty
    unf    = mkInlineUnfolding (Just 2) rhs
    [f,x]  = mkTemplateLocals [fun_ty, alphaTy]
    rhs    = mkLams [alphaTyVar, openBetaTyVar, f, x] $
             App (Var f) (Var x)

------------------------------------------------
-- proxy# :: forall a. Proxy# a
dollarId :: Id
dollarId = pcMiscPrelId dollarName ty
             (noCafIdInfo `setUnfoldingInfo` unf)
  where
    fun_ty = mkFunTy alphaTy openBetaTy
    ty     = mkForAllTys [alphaTyVar, openBetaTyVar] $
             mkFunTy fun_ty fun_ty
    unf    = mkInlineUnfolding (Just 2) rhs
    [f,x]  = mkTemplateLocals [fun_ty, alphaTy]
    rhs    = mkLams [alphaTyVar, openBetaTyVar, f, x] $
             App (Var f) (Var x)

------------------------------------------------
-- proxy# :: forall a. Proxy# a
dollarId = pcMiscPrelId dollarName ty
             (noCafIdInfo `setUnfoldingInfo` unf)
  where
    fun_ty = mkFunTy alphaTy openBetaTy
    ty     = mkForAllTys [alphaTyVar, openBetaTyVar] $
             mkFunTy fun_ty fun_ty
    unf    = mkInlineUnfolding (Just 2) rhs
    [f,x]  = mkTemplateLocals [fun_ty, alphaTy]
    rhs    = mkLams [alphaTyVar, openBetaTyVar, f, x] $
             App (Var f) (Var x)

------------------------------------------------
-- proxy# :: forall a. Proxy# a