在我通过Haskell进行的冒险中,我发现当我对代码中的类型犯了错误时,我很难去分析我做错了什么,编译器在抱怨什么。我认为这是因为在编译器发现错误之前的部分类型推断。, bi) -> ai * (x ** bi)) . zip a $ b[1 of 1] Compiling Main ( solution.hs, bi) -> ai * (x ** bi)) . zip a’
In the expression: sum .
然而,编译器的行为似乎很混乱:
- `as;` => no code generated, no warning- `ai;` => loads the value of `ai`;
- `as;` => no code generated; warning _expression result unused;- `ai;` => loads the value o