Idris
https://gyazo.com/3822ca006166090b85b3dc9dc0fbe3a2
依存型をもつ汎用言語
Haskellに似たシンタックス
正格評価
Lazy型を使えば遅延評価できる ref
バックエンドもいろいろ
C, LLVM, Java, JavaScript
Idrisの型
Idrisで依存型に触れる
Idrisのinterface
型クラス的なやつ
https://keens.github.io/blog/2020/12/09/idrisnointafe_sutomonadonadonado/
github
Haskell実装
Idris2
website
tutorial
入門記事
@mandel59氏のブログシリーズ
2013年のもの
こわくない Idris (1) - Ryusei’s Notes (a.k.a. M59のブログ)
http://wkwkes.hatenablog.com/entry/2016/12/17/000000
https://github.com/joaomilho/awesome-idris
https://zenn.dev/blackenedgold/books/introduction-to-idris
repl
$ idris
:load hoge.idr
ファイル読み込み
:watch hoge.idr
監視読み込み
:exec main
main関数を実行
ライブラリのimportは?
:t
型の確認
:quit
終了
https://keens.github.io/blog/2020/12/07/repldeidrisshouryokou/
compile
$ idris hoge.idr -o hoge
そして、遅い
run
$ ./hoge
型クラスやdo構文もあるが、遅延評価ではない
Haskell実装コンパイラでCにコンパイルして、gccなどでコンパイル
IdrisのIDE Protocol
IdrisのEffects
IO
Haskellとだいたいおなじ
インタプリタで実行すると変な感じになる
code:idr
greet : IO ()
greet = do putStr "What is your name? "
name <- getLine
putStrLn ("Hello " ++ name)
Holes
mutualブロック
http://docs.idris-lang.org/en/latest/tutorial/typesfuns.html#note-declaration-order-and-mutual-blocks
Idrisでは宣言の順番によって使える関数が変わる
自分より下に書いた関数は使えない
mutualブロックを書けばそれを回避できる
なんでdefaultでしてないんだろうmrsekut.icon
Haskellはdefaultでできる
コンパイルが遅くなるとかあるのかな #??
IO
http://docs.idris-lang.org/en/latest/tutorial/typesfuns.html#i-o
だいたいHSと同じ
Idrisのパターンマッチ、with, view
https://keens.github.io/blog/2020/12/22/idrisomoshirokinou_withkoubuntoview/
https://zenn.dev/hiropon21/articles/d9331813644265
遅延評価
http://docs.idris-lang.org/en/latest/tutorial/typesfuns.html#laziness
ネタ
https://zenn.dev/hiropon21/articles/b81cd6cd96afb9
参考
『Type-Driven Development with Idris』
Misreading Chat 41
Idris Systems Programming Meets Full Dependent Types pdf
2011?
作者が書いた?
http://yoda-jp.hatenablog.com/entry/2017/12/21/002226
http://yoda-jp.hatenablog.com/entry/2018/12/04/233848
https://www.slideshare.net/tanakh/idrisweb
/ymtszw/Idris勉強会
https://qiita.com/philopon/items/1451f6b8c5ccec41479d#fn1
https://keens.github.io/slide/idrisnohanashitoidris2nouwasa/
https://qiita.com/mandel59/items/d726249e8f371a7ea966
https://qiita.com/advent-calendar/2020/idris
あどかれ
/yubrot/Rosetta Lisp in Idris
#プログラミング言語