# New method for reporting TypeErrors on stuck type families

**URL:** <https://discourse.haskell.org/t/new-method-for-reporting-typeerrors-on-stuck-type-families/13527>\
**Category:** Learn\
**Created:** [January 14, 2026, 4:52am UTC](https://discourse.haskell.org/t/new-method-for-reporting-typeerrors-on-stuck-type-families/13527 "2026-01-14T04:52:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashokkimmel](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/ashokkimmel/32/5111_2.png) [@ashokkimmel](https://discourse.haskell.org/u/ashokkimmel)\
**Post date:** [January 14, 2026, 4:52am UTC](https://discourse.haskell.org/t/new-method-for-reporting-typeerrors-on-stuck-type-families/13527/1 "2026-01-14T04:52:22Z")

</div>

The blog post  
[Report stuck type families](https://blog.csongor.co.uk/report-stuck-families/) gives a method for giving type errors when a type family is stuck, however it seems hacky and ad-hoc.

```haskell
type Any :: k
type family Any where

type Assert :: Constraint -> Type -> k -> k
type family Assert err break a :: k where
  Assert _ () _ = Any
  Assert _ _ k = k

```

Is there a better way, like ErrorIfStuck or something, or do open type families make this impossible?

---

<div class="post-metadata">

**Author:** ![adamgundry](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@adamgundry](https://discourse.haskell.org/u/adamgundry)\
**Post date:** [January 14, 2026, 7:37am UTC](https://discourse.haskell.org/t/new-method-for-reporting-typeerrors-on-stuck-type-families/13527/2 "2026-01-14T07:37:40Z")

</div>

I’m not aware of any better way given current GHC, but this ghc-proposal aims at adding one:

> <https://github.com/ghc-proposals/ghc-proposals/pull/735>
>
> This proposes a way to customise error messages reported for unsolved Wanted con…straints, in order to improve error messages and avoid internal library implementation details from leaking.
> 
> \[Rendered\](https://github.com/sheaf/ghc-proposals/blob/custom-unsolved-errs/proposals/0735-custom-unsolved-errors.rst)
> 
> Related material:
> 
> - \[\_Detecting the undetectable\_ (blog post by Csongor Kiss)\](https://blog.csongor.co.uk/report-stuck-families)
> - \[GHC ticket #26190\](https://gitlab.haskell.org/ghc/ghc/-/issues/26190)
