Haskell Basic Notes
Platform
apt-get install haskell-Platform
apt-get install ghc-mod
atom plugins : language-haskell autocomplete-haskell ide-haskell haskell-ghc-mod
ghci
:l
: load file.:r
: reload file.:cd
.:edit
:$EDITOR
.:m
: module.:q
: quit.:?
.:k
: kind.:t
: type function.:info
: data/TypeClass.
ghc
runghc *.hs/*.lhs
Unique Mark
:+
: 复数符,2 :+ 3 -> 2+3i
._
: 泛匹配符, 表示不关心此部分具体内容.<-
: 属于符号, 用于 ListRange 中.=>
: 类型约束分隔符
Expression
if 语句也是表达式
doubleSmallNumber' x = (if x > 100 then x else x*2) + 1