Skip to content

Conversation

@igrep
Copy link
Member

@igrep igrep commented Sep 10, 2019

前の記事 #169 と同様、レビューは @kakkun61 に依頼します。

@igrep igrep changed the title 記事の追加: HIW 2019で発表された、GHCにこれから導入されるであろう機能 記事の追加: HIW 2019で発表された、GHC 8.10に導入されるであろう機能 Sep 11, 2019
@igrep igrep marked this pull request as ready for review September 11, 2019 05:53
@igrep igrep requested a review from kakkun61 September 11, 2019 05:53

といった具合に、アンダースコアで始まる識別子`_someFunc`の型を`Bool -> [a0]`と推論した上で[^type-hole]、実際にその型に該当する関数を、当該のスコープにおいてアクセスできる関数の中から探して教えてくれる、それが「Valid Hole Fits」という機能です。

[^type-hole]: 復習: この、「アンダースコアで始まる識別子、`_someFunc`の型を`Bool -> [a0]`と推論した上で」エラーメッセージにおいて`Found hole: _someFunc :: Bool -> [a0]`と教えてくれるのが「Type Hole」という機能なのでした。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「アンダースコアで始まる識別子、_someFuncの型をBool -> [a0]と推論した上で」

と括弧でくくってる意図がよく分かりませんでした。

Copy link
Member Author

@igrep igrep Sep 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本文中の「アンダースコアで始まる識別子_someFuncの型をBool -> [a0]と推論した上で」を指していることを明示するためのカギ括弧です。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

なるほど。個人的にはどちらかというと違う部分に括弧を付けた方がいいのではないかという気がしました。
どちらにするかはお任せします。

あと微妙に引用元と異なりますね。「、」を含むかどうか。

アンダースコアで始まる識別子 _someFuncの型をBool -> [a0]と推論した上で

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

擦れ違っちゃいましたが「、」については e73e4df で修正しました。

igrep and others added 3 commits September 17, 2019 11:33
> 「GHCが推論した型にマッチする関数を」が長めなので「エラーメッセージに」を後に置いた方が「付記する」にかかることが明示的になると思いました。

Co-Authored-By: Kazuki Okamoto <kakkun61@gmail.com>
Co-Authored-By: Kazuki Okamoto <kakkun61@gmail.com>
@kakkun61 kakkun61 self-requested a review September 17, 2019 03:55
@igrep
Copy link
Member Author

igrep commented Sep 17, 2019

半期末で忙しい中ありがとう!日付変えてマージします!

@igrep igrep merged commit 861224a into master Sep 17, 2019
@igrep igrep deleted the hiw2019-ghc-future branch September 17, 2019 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants