UndecidableInstances
決定不能性を指摘するエラーを無視するためのGHC拡張
UndecidableInstancesを指定していないときは、GHCが決定不能性をを解決できなさそうなとき(?)に、エラーを吐く
(Use UndecidableInstances to permit this)みたいなの
このときにこの拡張を与えることでそのエラーを無視する
つまり、コンパイラは完全ではないので、UndecidableInstancesしているときでもエラーにならないことはある。そういうときにつかう。
逆に言えば危険なので無闇矢鱈に使うものではない
微妙に逸れるが指定していないときの、決定不能性を何で判断しているのか気になるmrsekut.icon*2
https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#extension-UndecidableInstances
https://functor.tokyo/blog/2017-04-07-undecidable-instances