什么是XNoMomoMorphorphismRestriction? [英] What is XNoMonomorphismRestriction?
问题描述
此页用法
$ ghci -XNoMonomorphismRestriction
启动haskell解释器。
XNoMonomorphismRestriction
开关是什么意思?
它关闭 Monomorphism限制,限制值为没有使用函数表示法1定义为非多态类型。
1通过not using function notation我的意思是它们被定义为 foo = something
而不是 foo bar = something
,即定义不包含显式参数。
This page usages
$ ghci -XNoMonomorphismRestriction
to start the haskell interpreter.
What does XNoMonomorphismRestriction
switch mean?
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.
这篇关于什么是XNoMomoMorphorphismRestriction?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!