TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Is there any “Make you a Haskell” tutorial?

4 点作者 nudpiedo将近 3 年前
Hi all,<p>I would like to write a programming language with semantics compatible with Haskell alike languages like F# or OCaml. I would make the prototype in python for all its bindings as I hope I can be more productive even if it has not support for pattern matching and ADTs.<p>The only known guide I know about hundreds of &quot;Make you a Lisp&quot; tutorials and about a &quot;Make you a Haskell&quot; one which is not complete[0] and does not go much in detail on some aspects.<p>The only part that scares me a bit is the type system for what I would be afraid to have to recreate a Prolog or something similar (my first thought was to delegate this job to a separate engine during the first proofs of concept but I to report errors properly and advance I will end up having to implement my own, much more complex, system). Also in order to implement proper Effect Systems or Lazy Execution&#x2F;evaluation elegantly.<p>If that doesn&#x27;t exist I also would love some pointers in any other programming language, such as Python, Clojure or OCaml.<p>[0] https:&#x2F;&#x2F;smunix.github.io&#x2F;dev.stephendiehl.com&#x2F;fun&#x2F;index.html

2 条评论

floxy将近 3 年前
&gt;The only part that scares me a bit is the type system for what I would be afraid to have to recreate a Prolog or something similar<p>Creating the core of a Prolog interpreter isn&#x27;t much work. It is like a 30 line program in Haskell. See chapter 4 of &quot;The Art of Prolog&quot;:<p><a href="https:&#x2F;&#x2F;mitpress.mit.edu&#x2F;books&#x2F;art-prolog-second-edition" rel="nofollow">https:&#x2F;&#x2F;mitpress.mit.edu&#x2F;books&#x2F;art-prolog-second-edition</a><p>...there is a PDF available under the &quot;Open Access&quot; tab.
评论 #32109247 未加载
timfi将近 3 年前
To be quite honest: I don&#x27;t think there is anything along those lines. But if want to tackle it I recommend looking for PDF copy of Types and Programming Languages by Benjamin C. Pierce. It contains all necessary typing rules — barred the whole inference magic — be it System F, ADTs or Records.<p>EDIT: Oh and also contains the reduction rules ofcourse! Though the book assumes you now how to read inference rules. ;)<p>EDIT: I just found an official PDF source: <a href="http:&#x2F;&#x2F;basics.sjtu.edu.cn&#x2F;~xiaojuan&#x2F;tapl2016&#x2F;files&#x2F;Types+and+Programming+Languages.pdf" rel="nofollow">http:&#x2F;&#x2F;basics.sjtu.edu.cn&#x2F;~xiaojuan&#x2F;tapl2016&#x2F;files&#x2F;Types+and...</a>