欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
Haskell
来自开放百科 - 灰狐
(版本间的差异)
小 (→图书) |
小 (→文档) |
||
第57行: | 第57行: | ||
==文档== | ==文档== | ||
+ | *[http://docs.huihoo.com/erlang/conference/euc2016/Into-the-Core-Squeezing-Haskell-into-Nine-Constructors.pdf Into the Core Squeezing Haskell into nine constructors] | ||
*[http://docs.huihoo.com/infoq/qconshanghai/2015/%e6%96%b0%e8%af%ad%e8%a8%80%e4%b8%8e%e6%96%b0%e5%8f%91%e5%b1%95/QCon%e4%b8%8a%e6%b5%b72015-Haskell%e4%b8%ad%e7%9a%84%e5%87%bd%e6%95%b0%e4%b8%8e%e7%b1%bb%e5%9e%8b%e7%b3%bb%e7%bb%9f-%e5%bc%a0%e6%b7%9e.pdf Haskell中的类型与类型系统] | *[http://docs.huihoo.com/infoq/qconshanghai/2015/%e6%96%b0%e8%af%ad%e8%a8%80%e4%b8%8e%e6%96%b0%e5%8f%91%e5%b1%95/QCon%e4%b8%8a%e6%b5%b72015-Haskell%e4%b8%ad%e7%9a%84%e5%87%bd%e6%95%b0%e4%b8%8e%e7%b1%bb%e5%9e%8b%e7%b3%bb%e7%bb%9f-%e5%bc%a0%e6%b7%9e.pdf Haskell中的类型与类型系统] | ||
*[http://docs.huihoo.com/cufp/2013/High-Availability-A-Development-Experience-Report.pdf High Availability - A Development Experience Report] | *[http://docs.huihoo.com/cufp/2013/High-Availability-A-Development-Experience-Report.pdf High Availability - A Development Experience Report] |
2017年10月12日 (四) 14:22的版本
您可以在Wikipedia上了解到此条目的英文信息 Haskell Thanks, Wikipedia. |
Haskell,一门通用型纯粹函数式编程语言。其特性有:静态类型,高阶函数,多态,型别类,以及单子式副作用等。Haskell编译器几乎在每一种计算机上都可以运行。
C++11的Concepts、C#的LINQ、Java中的泛型、Scala、CoffeeScript、F#、Python、Swift 等语言都从中受到启发和得到灵感。
Haskell在工业界有不少应用,最集中的是在金融界的高频交易。
目录 |
安装
OS X
OS X安装包安装后,会创建:
/Library/Frameworks/GHC.framework /Library/Haskell
运行 /Library/Haskell/bin/activate-hs
Haskell now set to: GHC 7.10.2 Arch. x86_64 Platform 7.10.2-a
运行 /Library/Haskell/bin/cabal
/Users/huihoo/.cabal/config /Users/huihoo/Library/Haskell/bin
vim ~/.bash_profile
export PATH="$HOME/Library/Haskell/bin:$PATH"
指南
输入ghci进入GHC交互模式
ghci> [2,4..20] [2,4,6,8,10,12,14,16,18,20] ghci> [x * 2 | x <- [1..10]] // 列表推导式(list comprehension) [2,4,6,8,10,12,14,16,18,20] ghci> [x | x <- [10..20], x /= 13, x /= 15, x /= 19] // 多个谓词(predicate) [10,11,12,14,16,17,18,20] ghci> [0.1, 0.3 .. 1] [0.1,0.3,0.5,0.7,0.8999999999999999,1.0999999999999999] ghci> [x | x <- [50..100], x `mod` 7 == 3] [52,59,66,73,80,87,94]
vim factorial.hs // 创建一个函数并保存文件
factorial :: Integer -> Integer factorial n = product [1..n] ghci> :l factorial ghci> factorial 50 30414093201713378043612608166064768844377641568960512000000000000
项目
- ImplicitCAD
- Frege is a Haskell for the JVM
- BlockApps
- Galois, Inc.
- Elm语言
- haskoin Bitcoin协议实现
- Language & DSL
- Berp an implementation of Python 3
- Potential x86-64 assembly as a Haskell EDSL
- Hos A Haskell operating system
- Shake build system
- Frames Data Frames for Haskell
文档
- Into the Core Squeezing Haskell into nine constructors
- Haskell中的类型与类型系统
- High Availability - A Development Experience Report
- Redesigning the Computer for Security
- Functional Reporting
- Bringing Haskell to the World
- Common Pitfalls of Functional Programming and How to Avoid Them:A Mobile Gaming Platform Case Study
- Enterprise Scheduling with Haskell
图书
链接
分享您的观点