Warning on specialisations when compiling Haskell Code with ghc

可紊 提交于 2019-12-04 04:54:02

These are just (annoying) warnings, indicating that GHC could do further specializations to your code if you really want to. Future versions of GHC will likely not emit this data by default, since there's nothing you can do about it anyway.

They are harmless, and are not errors. Don't worry about them.


To directly address the problem, you can use -w (suppress warnings) instead of -Wall.

E.g. in a file {-# OPTIONS_GHC -w #-} will disable warnings.

Alternately, increasing the specialization threshold will make the warning go away, e.g. -fspec-constr-count=16

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!