Skip to content

Instantly share code, notes, and snippets.

View aoiroaoino's full-sized avatar
🏠
Working from home

Naoki Aoyama aoiroaoino

🏠
Working from home
View GitHub Profile

Explaining Miles's Magic

Miles Sabin recently opened a pull request fixing the infamous SI-2712. First off, this is remarkable and, if merged, will make everyone's life enormously easier. This is a bug that a lot of people hit often without even realizing it, and they just assume that either they did something wrong or the compiler is broken in some weird way. It is especially common for users of scalaz or cats.

Miles Sabin 氏は、最近悪名高き SI-2712 を修正する pull req を出した。第一に、これは注目すべきものであり、もし merge されたら全ての人々の生活が非常に楽になるだろう。このバグは、何か間違っているか、変な使い方によって compiler が壊れてしまったかのどちらかと仮定され、多くの人々がしばしば意図せず遭遇した。これは"特に" scalaz または cats ユーザーの間で一般的だ。

But that's not what I wanted to write about. What I want to write about is the exact semantics of Miles's fix, because it does impose some very specific assumptions about the way that type constructors work, and understanding those assumptions is the key to getting the most of it his fix.

しかし、私が書きたいのはそれではありません。私が書きたいのは Miles 氏の修正の正確な意味論で、(wip