This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
因为
regiuleishon
不是reguleishon
,所以reguleishon(false,x)...
是一种新功能声明,导致代码具有2个不同函数两者都没有详尽的模式。正确命名第二种模式:
Because
regiuleishon
is notreguleishon
, soreguleishon (False, x) ...
is a new function declaration leading to the code having 2 different functions neither of which have exhaustive patterns.Name the second pattern correctly:
您有一个错别字:第二行说
regiuleishon
,但第三行说geguleishon
- 缺少i
g 。因此,对于编译器而言,看起来您已经完成了定义名为
regiuleishon
的函数,然后移动到定义一个完全不同的函数,名为reguleishon
。第一个功能仅涵盖true
案例,因此模式匹配不完整。第二个功能仅涵盖false
案例,因此其匹配也不完整。You have a typo: the second line says
regiuleishon
, but the third line saysreguleishon
- missing ani
afterg
.So to the compiler, it looks like you're done defining the function named
regiuleishon
and moved on to defining a totally different function namedreguleishon
. The first function only covers theTrue
case, so the pattern match is incomplete. And the second function only covers theFalse
case, so its match is incomplete as well.