<p dir="ltr">Thank you Theodore.</p>
<p dir="ltr">> Data.Coerce</p>
<p dir="ltr">Could you hint the name of the package, please? Does it coerce safely?<br></p>
<p dir="ltr">If Coercible does not type check, another option could be to define a class and a function that works similar to if statement, constrained to instances of this class.</p>
<p dir="ltr">class Newtype_base nt base where<br>
  base_t::nt -> base</p>
<p dir="ltr">if_::Newtype_base nt Bool =><br>
   nt -> then -> else</p>
<p dir="ltr">Standard if is clearer of course but with a few newtypes being passed around, this may save some key strokes.</p>