lint_binds_help :: (Id, StgRhs) -> LintM ()
lint_binds_help (binder, rhs)
  = addLoc (RhsOf binder) $ do
        -- Check the rhs
        _maybe_rhs_ty <- lintStgRhs rhs

        -- Check binder doesn't have unlifted type
        checkL (not (isUnliftedType binder_ty))
               (mkUnliftedTyMsg binder rhs)

        -- Check match to RHS type
        -- Actually we *can't* check the RHS type, because
        -- unsafeCoerce means it really might not match at all
        -- notably;  eg x::Int = (error @Bool "urk") |> unsafeCoerce...
        -- case maybe_rhs_ty of
        --  Nothing     -> return ()
        --    Just rhs_ty -> checkTys binder_ty
        --                          rhs_ty
        ---                         (mkRhsMsg binder rhs_ty)

        return ()
  where
    binder_ty = idType binder
lint_binds_help :: (Id, StgRhs) -> LintM ()
lint_binds_help (binder, rhs)
  = addLoc (RhsOf binder) $ do
        -- Check the rhs
        _maybe_rhs_ty <- lintStgRhs rhs

        -- Check binder doesn't have unlifted type
        checkL (not (isUnliftedType binder_ty))
               (mkUnliftedTyMsg binder rhs)

        -- Check match to RHS type
        -- Actually we *can't* check the RHS type, because
        -- unsafeCoerce means it really might not match at all
        -- notably;  eg x::Int = (error @Bool "urk") |> unsafeCoerce...
        -- case maybe_rhs_ty of
        --  Nothing     -> return ()
        --    Just rhs_ty -> checkTys binder_ty
        --                          rhs_ty
        ---                         (mkRhsMsg binder rhs_ty)

        return ()
  where
    binder_ty = idType binder
lint_binds_help (binder, rhs)
  = addLoc (RhsOf binder) $ do
        -- Check the rhs
        _maybe_rhs_ty <- lintStgRhs rhs

        -- Check binder doesn't have unlifted type
        checkL (not (isUnliftedType binder_ty))
               (mkUnliftedTyMsg binder rhs)

        -- Check match to RHS type
        -- Actually we *can't* check the RHS type, because
        -- unsafeCoerce means it really might not match at all
        -- notably;  eg x::Int = (error @Bool "urk") |> unsafeCoerce...
        -- case maybe_rhs_ty of
        --  Nothing     -> return ()
        --    Just rhs_ty -> checkTys binder_ty
        --                          rhs_ty
        ---                         (mkRhsMsg binder rhs_ty)

        return ()
  where
    binder_ty = idType binder