I mostly think this is a good idea. However, some care is required to
prevent performance problems, especially in recursive functions. Watch out
in implementation! Also, these partial functions are sometimes used in
non-obviously total contexts, such as the implementation of mfix for lists.
We should refrain from introducing code bloat for nothing.
Post by Daniel Cartwright
I propose to add `HasCallStack` to all partial functions in base, e.g.
`fromJust`, `fromRight`, `fromLeft`, etc.
Relevant discussion here: https://ghc.haskell.org/trac/ghc/ticket/15559
Libraries mailing list