gksato
https://haskell-jp.slack.com/archives/CL3AXB1AL/p1680155886899719 の関係で ) を読んでたんですが,ここの
のようなことをしており,これって
strict-wrapper のコード (strict と unstrict 関数が怖いことをしていると思うので,皆様のご意見を伺いたいです.参照先のコードは大体data SPair a b = SPair !a !b strict :: (a, b) -> SPair a b strict x = case x of (!_, !_) -> unsafeCoerce x unstrict :: SPair a b -> (a, b) unstrict = unsafeCoerce
のようなことをしており,これって
SPair a b と (a, b) の runtime representation が完全に一致しているということを主張している気がするんですが,そんな保証ってありましたっけ…?