GHC言語拡張勉強会 -Parametric polymorphism- #7
イベント内容
概要
Glasgow Haskell Compiler (以下 GHC) には、様々な言語拡張機能が存在します。
この勉強会では "Glasgow Haskell Compiler User's Guide" (以下 "GHC User's Guide") をベースに、 主に Parametric polymorphism (Rank) に関する言語拡張の理解を深めることを目的としています。
目的
GHC 言語拡張の主に Parametric polymorphism (Rank) に関する拡張 (?) の理解:
ExplicitForAllLiberalTypeSynonymsExistentialQuantificationScopedTypeVariableRankNTypesImpredicativeTypes
想定する参加者
- Haskell (GHC) のソースコードにおいて
forall ...というものを見たことがある方 - "GHC User's Guide" の 'GHC Language Features' を読んでいない方
進め方
主に Discord のグループDM (10人まで) の音声通話と画面共有を用いて、"GHC User's Guide" (GHC 8.8.1) の PDF などを管理者が読み進めます。
その他、連絡事項や相談内容があれば、Discordのテキストチャットや connpass のイベント案内にてお伝え致します。
第07回の内容
(注意) ここに掲載している全て (特に、参考の事項) を読み進める訳ではありません
"GHC User's Guide" (以下 GHC 8.8.1 に準拠):
-
'9.21 Arbitrary-rank polymorphism':
RankNTypes-
その他の参考:
-
'GHC 8.10.x Migration Guide: GHC is pickier about inferred type signatures':
ghc-wiki-mirrorRankNTypesは例示として記述されているだけ- 関連(?): 'Note [Correctness and performance of type synonym validity checking]':
ghc/compiler/typecheck/TcValidity.hs
-
Simon Peyton Jones, Dimitrios Vytiniotis, Stephanie C. Weirich, and Mark Shields, "Practical type inference for arbitrary-rank types", . July 2007. (The online version): Microsoft
- The GHC reading list に掲載されているものの一つ
- いずれ読む可能性あり(?)
-
-
'9.22 Impredicative polymorphism':
ImpredicativeTypes-
参考:
- "Impredicative polymorphism":
ghc-wiki-mirror
-
"GHC 8.8.x Migration Guide" - 'Stricter type synonym validity-checking' の
2.:ghc-wiki-mirror -
"GHC 8.10.x Migration Guide" - 'GHC is pickier about impredicative uses of constraints':
ghc-wiki-mirror- (関連) issues #11514: "Impredicativity is still sneaking in":
ghc
- (関連) issues #11514: "Impredicativity is still sneaking in":
-
request #274: "Quick Look Impredicativity":
ghc-proposals(Needs revision,dormant)- Alejandro Serrano, JurriaanHage, Dimitrios Vytiniotis, and Simon Peyton Jones. 2018.Guarded Impredicative Polymorphism (Extended Version): Microsoft, 一連の request の元となった Paper
In this paper, we propose a new point in the design space, which we call guarded impredicativity. Its key idea is that impredicative instantiation in an application is allowed for type variables that occur under a type constructor.
- A Quick Look at Impredicativity, Step by Step : dropbox (注意) PDFファイル, 上記の Paper を簡略化したもの (?)
This working draft records our work on the so-called Quick Look type inference algorithm, aimed at supporting programmign with impredicative types. It’s a development the general ideas in our PLDI’18 paper Guarded impredicative polymoprhism, but it is dramatically simpler, both to specify and to implement.
-
request !1659: "WIP: Impredicativity based on quick look":
ghc/ghc, 一連の request はこれが起点 -
(関連) request #287: "Simplify subsumption": "Quick Look Impredicativity" よりも、こちらが優先される可能性があります (?)
- "Impredicative polymorphism":
-
注意事項
-
内容について
- 主催者は Parametric polymorphism に関する内容に 精通しているわけではありません
- "GHC User's Guide" などにおいて、「目的」欄に記述していない言語拡張に関して言及されていることがあります。その場合は、後にそれらの言語拡張について理解を深める際に振り返ることを予定しているため、その 言語拡張に関しては流し読み します(例:
TypeApplications,GADTs,TypeFamiles)
-
進め方について
- 毎回模範的に準備して進めるつもりはありません。読みながら内容を理解していくというスタンスです。
- 模範的なプランがあり、それに基づいて進行するわけではありません (場当たり的になると思います)
- 切りが良いと判断した場合は、早めに終える ことがあります。 切りが悪いと判断した場合は、切りが良いと判断できるところに到達するまで 延長 することがあります。
日時
-
毎週金曜日 22:00 ~ 23:30
- 2019-10-11 (#1) ~ 2019-12-20 (#10)
-
次回の開催日が翌週ではない場合、改めて連絡します。
年明け
年明け (2020-01-1X ~) は、TypeApplications に関する内容を読む予定です。
履歴
| 回数 | 内容 |
|---|---|
| 2019-10-11 | #1: ExplicitForAll, LiberalTypeSynonyms |
| 2019-10-18 | #2: ExistentialQuantification |
| 2019-10-25 | #3: ScopedTypeVariables |
| 2019-11-01 | #4: ScopedTypeVariables |
| 2019-11-15 | #5: ScopedTypeVariables |
| 2019-11-22 | #6: RankNTypes |
注意事項
※ 掲載タイミングや更新頻度によっては、情報提供元ページの内容と差異が発生しますので予めご了承ください。
※ 最新情報の確認や参加申込手続き、イベントに関するお問い合わせ等は情報提供元ページにてお願いします。
新規会員登録
このイベントに申し込むには会員登録が必要です。
アカウント登録済みの方はログインしてください。
※ ソーシャルアカウントで登録するとログインが簡単に行えます。
※ 連携したソーシャルアカウントは、会員登録完了後にいつでも変更できます。

