Dependent types are a hot topic in the Haskell community. Many voices advocate for adding dependent types to Haskell, and a lot of effort is being invested towards that end. At the same time, the sceptics raise various concerns, one being that dependent types are more of a research project than a tool applicable in industrial software development. That is, however, a false dichotomy. While depende
Surface syntax Core syntax Safe and fast phantom typed De Bruijn indices Evaluation Inlining of globals Readback Parsing Indentation-sensitivity Pretty printing Scope-aware name printing Unification and meta variables Pruning The "same meta variable" intersection rule Solution inlining Elaboration of meta variable solutions to local definitions Case expression inversion Basic type checking Elabora
I enjoy using a type system to help make sure my term level code is unimpeachably correct. This is where my interest in writing the singletons library came from. This library allows you to write some dependently typed code in Haskell, using singleton types. I didn’t invent this idea, but I did write a nice library to remove some of the pain of using this encoding. SHE can be considered an ancestor
Hi, I’m Vladislav Zavialov. For the last couple of months, my job at Serokell has been to lead our efforts to improve our primary tool – the Glasgow Haskell Compiler (GHC). I’m focusing on making the type system more powerful, inspired by Richard Eisenberg’s thesis that introduces Dependent Haskell. Dependent types are a feature I’d love to see in Haskell the most. Let’s talk why. There’s a tensio
Nikita Sobolev for wemake.services Posted on Jan 31, 2019 • Updated on Feb 9, 2019 Originally published in my blog: https://sobolevn.me/2019/01/simple-dependent-types-in-python I am quite excited about this new feature in python: simple dependent types. "Dependent types" might sound complex, but it is not. Instead, it is a useful feature and I am going to show how it works and when you should rely
I don’t know about you, but quite frankly I’m tired of seeing the same tired vector example being used to demonstrate why dependent types are useful. Recently, I had the opportunity to use current Haskell’s dependently-typed facilities to solve a somewhat contrived, yet real-world problem. Below I will go through the steps I took in moving from an untyped free-for-all to having GHC reject more bad
新しい記事を書きました. 本記事を包含します. amaya382.hatenablog.jp Dottyで何ができるようになるのかとその使い方を簡単にまとめたいと思います. 理論的な部分は深掘りしません. 以下ちょっと長め. 調べきれてない点も多々あるので, 抜けや間違いがあったら教えてください. そもそもDottyとは Dependent Object Types (DOT) に基づいた新しいScalaコンパイラです. たまにScala3とか呼ばれたりもしています. DOT計算理論の詳細は省きます (まとめるほど理解できていないとも言う…). 現行のコンパイラと比べ, コンパイラサイズの減少・コンパイル速度向上・様々な機能追加の他, コンパイラ自体の開発安定性も増すパワフルなアップグレードが期待できます. 現行のScalaとの互換性は切れていますが, 勿論重要な機能がなくなるといったこと
目的 19番目の Advent Calender 2017 Haskell(その2)です。 依存型とは何か、何に役に立つのか、その応用としてのClashと Clashを用いた論理回路の実装のトライアルの紹介をします。 依存型とは何か Wikipediaの依存型のリンク先に他の型の値に依存する型が依存型とあります。例えば、Boolの値はTrue,Falseがありますが、Boolが型なのはもちろんですが、TrueやFalseも型として扱えるようになります。 その代表的なものとして、リストの要素数を埋め込んだ型があります。例えば、普通のBoolのリストは[Bool]な感じで長さに決まりはないですが、Vector 5 Boolのように長さ5のBool型のリストが作れます。(vector-sizedパッケージで実際に作れます。) 型に値を埋め込むだけだとありがたみがないですが、カリー=ハワード同型対
Haskell Srbija Grupa posvećena ucenju i popularizaciji Haskell programskog jezika "Pure mathematics is, in its way, the poetry of logical ideas." Albert Einstein "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." Linus Torvalds This topic is considered as advanced and some prior knowledge of Haskell is assume
私は時折、コーディングに対する考え方を変えさせられるような、従来と非常に異なるプログラミング言語に出会います。本記事では、その中でも特に気に入っている発見をいくつかご紹介したいと思います。 これは、先賢による「関数型プログラミングは世界を変える!」的な投稿ではありません。本記事で挙げるのは、もっと「知る人ぞ知る」的なリストです。多くの読者の方にとって、以下の言語やパラダイムは聞いたことのないものが大半だと思いますので、私が経験したように、これらの新しい概念を学ぶ楽しさを感じていただければ幸いです。 注:私は以下の言語の多くに関して最低限の経験しかありません。その発想に引き込まれたのであって、専門的知識は持ち合わせていないため、訂正すべき点や誤りがあればどうぞご指摘ください。また、本記事で取り上げていない新しいパラダイムや概念に出会った方は、ぜひお知らせください。 最新情報:本記事が r/p
依存型ならさらに安全にプログラミングできちまうんだ!と言ったところで,「無料で遊べちまうんだ!」とか「3000円払えば無料で10連まわせる」みたいな感があり, 依存型使わない場合とどう違ってくるのか 入出力から扱い始めるとどういった形のプログラムになるのか 大概どういう流れでプログラミングすることになるのか とか,そういった話を通しではそんなに見ないかなーという気がしたので,ごく基本的なものを一通りまとめておこうと思って. まず,説明に使う問題設定について.行列演算,特に行列積を考えてみる.ただし,行列の形(行はいくつ,列はいくつ)についてはプログラムの外から入力によって決定するような状況とする.これ自体は普通の問題設定だと思われる. 依存型を使わなければ特にどうということも無い.恐らく行列の型を次のように定義し, -- 形のみ持っておき,中身の数値については簡単のため省略 data Ma
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く