What is XNoMonomorphismRestriction?

纵然是瞬间 提交于 2019-12-06 17:38:54

问题


This page usages

$ ghci -XNoMonomorphismRestriction

to start the haskell interpreter.

What does XNoMonomorphismRestriction switch mean?


回答1:


It turns off the Monomorphism restriction, which restricts values which are not defined using "function notation"¹ to have a non-polymorphic type.


¹ By "not using function notation" I mean that they're defined as foo = something and not foo bar = something, i.e. the definition does not contain explicit arguments.



来源:https://stackoverflow.com/questions/4575040/what-is-xnomonomorphismrestriction

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