-
Notifications
You must be signed in to change notification settings - Fork 18
記事の追加: HIW 2019で発表された、GHC 8.10に導入されるであろう機能 #170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0c8cdb1 to
54f7916
Compare
|
|
||
| といった具合に、アンダースコアで始まる識別子`_someFunc`の型を`Bool -> [a0]`と推論した上で[^type-hole]、実際にその型に該当する関数を、当該のスコープにおいてアクセスできる関数の中から探して教えてくれる、それが「Valid Hole Fits」という機能です。 | ||
|
|
||
| [^type-hole]: 復習: この、「アンダースコアで始まる識別子、`_someFunc`の型を`Bool -> [a0]`と推論した上で」エラーメッセージにおいて`Found hole: _someFunc :: Bool -> [a0]`と教えてくれるのが「Type Hole」という機能なのでした。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
「アンダースコアで始まる識別子、
_someFuncの型をBool -> [a0]と推論した上で」
と括弧でくくってる意図がよく分かりませんでした。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
本文中の「アンダースコアで始まる識別子_someFuncの型をBool -> [a0]と推論した上で」を指していることを明示するためのカギ括弧です。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なるほど。個人的にはどちらかというと違う部分に括弧を付けた方がいいのではないかという気がしました。
どちらにするかはお任せします。
あと微妙に引用元と異なりますね。「、」を含むかどうか。
アンダースコアで始まる識別子 、
_someFuncの型をBool -> [a0]と推論した上で
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
擦れ違っちゃいましたが「、」については e73e4df で修正しました。
> 「GHCが推論した型にマッチする関数を」が長めなので「エラーメッセージに」を後に置いた方が「付記する」にかかることが明示的になると思いました。 Co-Authored-By: Kazuki Okamoto <kakkun61@gmail.com>
Co-Authored-By: Kazuki Okamoto <kakkun61@gmail.com>
|
半期末で忙しい中ありがとう!日付変えてマージします! |
前の記事 #169 と同様、レビューは @kakkun61 に依頼します。