# Safe coercions (Haskell Unfolder #48)

**URL:** <https://discourse.haskell.org/t/safe-coercions-haskell-unfolder-48/13060>\
**Category:** Links\
**Created:** [October 1, 2025, 4:58pm UTC](https://discourse.haskell.org/t/safe-coercions-haskell-unfolder-48/13060 "2025-10-01T16:58:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kosmikus](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/kosmikus/32/372_2.png) [@kosmikus](https://discourse.haskell.org/u/kosmikus)\
**Post date:** [October 1, 2025, 4:58pm UTC](https://discourse.haskell.org/t/safe-coercions-haskell-unfolder-48/13060/1 "2025-10-01T16:58:06Z")

</div>

https://www.youtube.com/embed/NC0wkFsVPDU?feature=oembed&wmode=opaque&list=PLD8gywOEY4HaG5VSrKVnHxCptlJv2GAn7

Will be streamed today, 2025-10-01, at 1830 UTC.

Abstract:

_When GHC knows that two types have the same run-time representation, it allows you to use coerce to go from a value of one to a value of the other in a safe and cost-free way. Primarily, the opportunity to coerce arises from the use of newtype, where the new type is guaranteed to have the same representation as the wrapped type. However, the implications of this are surprisingly complex, primarily due to interactions with other features such as type classes, type families and GADTs, and have led to the introduction of roles as an aspect of the type system intended to reason about run-time representations more precisely. In this episode, we will explain why coerce is useful and how roles can help you understand what works and what does not._

---

<div class="post-metadata">

**Author:** ![Ambrose](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/ambrose/32/5672_2.png) [@Ambrose](https://discourse.haskell.org/u/Ambrose)\
**Post date:** [October 2, 2025, 8:08pm UTC](https://discourse.haskell.org/t/safe-coercions-haskell-unfolder-48/13060/2 "2025-10-02T20:08:21Z")

</div>

I’m curious about the thumbnail prompt. Was the 6/9 joke in the prompt? Or did the AI decide to make it?

---

<div class="post-metadata">

**Author:** ![kosmikus](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/kosmikus/32/372_2.png) [@kosmikus](https://discourse.haskell.org/u/kosmikus)\
**Post date:** [October 15, 2025, 4:37pm UTC](https://discourse.haskell.org/t/safe-coercions-haskell-unfolder-48/13060/3 "2025-10-15T16:37:08Z")

</div>

Sorry for the late reply. It was part of the prompt.

---

<div class="post-metadata">

**Author:** ![kushagarr](https://avatars.discourse-cdn.com/v4/letter/k/f05b48/32.png) [@kushagarr](https://discourse.haskell.org/u/kushagarr)\
**Post date:** [October 16, 2025, 2:43am UTC](https://discourse.haskell.org/t/safe-coercions-haskell-unfolder-48/13060/4 "2025-10-16T02:43:33Z")

</div>

@kosmikus Just a request, could you do an episode on profiling an application.  
Different types of applications like clis and webapps.  
webapps are long running, how to profile them etc.

Thank you

---

<div class="post-metadata">

**Author:** ![edsko](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/edsko/32/3024_2.png) [@edsko](https://discourse.haskell.org/u/edsko)\
**Post date:** [October 16, 2025, 7:43am UTC](https://discourse.haskell.org/t/safe-coercions-haskell-unfolder-48/13060/5 "2025-10-16T07:43:37Z")

</div>

> [@kushagarr](#):
>
> @kosmikus Just a request, could you do an episode on profiling an application.  
> Different types of applications like clis and webapps.  
> webapps are long running, how to profile them etc.

I’ve added this to our long backlog of topics we might like to cover at some point. Thanks for the suggestion!
