generated at
2/18/2025, 11:45:16 AM
Closed Type Synonym Family
TypeFamilies
での
Synonym Family
の定義方法の一つ
>
#WIP
where
を使って型の型と実装を同じ場所に書く
上から評価される
一般的な書き方
hs
type family If c t e where If 'True t e = t If 'False t e = e
外部から拡張されないことを強制できる
つまりclosed
https://qiita.com/lotz/items/6c038698c8f04f57113a#closed-type-families
https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#closed-type-families