几种语言原生开发环境构建之--Haskell语言
2016-08-03 15:08
405 查看
构建工具安装stack
文档说明快捷安装
$ wget -qO- https://get.haskellstack.org/ | sh
或者下载压缩包安装
$ cd /home/someuser/haskell $ wget -O stack.tar.gz https://www.stackage.org/stack/linux-i386 #这里以linux32位系统为例 $ tar zxvf *gz $ cd stack $ cp stack ~/bin # 这里 ~/bin是用户的指令路径 $ stack --help
项目构建
$ stack new hellworld #产生~/.stack全局配置目录 $ cd hellworld $ stack setup #安装编译环境,如果之前没安装的话,使用lts-7.3 $ stack build # 编译,当前目录产生.stack-work工作目录 $ stack exec hellworld-exe #执行编译后的文件,以-exe结尾 $ stack test #测试 $ stack ghci #开启一个ghc 的repl命令行 $ stack install others-package # 安装其他的包
环境参数配置
全局~/.stack/config.yamlpackage-indices: - name: Tsinghua download-prefix: http://mirrors.tuna.tsinghua.edu.cn/hackage/package/ http: http://mirrors.tuna.tsinghua.edu.cn/hackage/00-index.tar.gz templates: params: author-name: Your Name author-email: youremail@example.com category: Your Projects Category copyright: 'Copyright: (c) 2016 Your Name' github-username: yourusername
具体配置
默认仓库
清华仓库源镜像
相关文章推荐
- 几种语言原生开发环境构建之--Lua语言
- 几种语言原生开发环境构建之--Elm语言
- 几种语言原生开发环境构建之--Typescript语言
- 几种语言原生开发环境构建之--Go语言
- 几种语言原生开发环境构建之--Python语言
- 在ubuntu下构建go语言开发环境的方法
- Idea基于scala语言构建spark开发环境搭建
- 配置EditPlus与NAnt构建轻型的.NET开发环境
- 让PHP支持大型项目-构建JSP、PHP与JAVA融为一体的开发环境[转载]
- 几种主流网页开发语言的思考(下)
- 开发国际化程序,在不同语言环境中显示对应的语言
- 在Windows下构建Qt4开发环境(Qt4+Vim)
- [经验]实际构建Symbian开发环境
- 配置EditPlus与NAnt构建轻型的.NET开发环境
- 构建自己的.NET Framework3.0开发环境
- 在多语言环境中构建基于MOSS2007的解决方案
- Asp,PHP,JSP,.Net几种网站开发语言比较
- [转载]让PHP支持大型项目-构建JSP、PHP与JAVA融为一体的开发环境
- 敏捷软件开发基础: 持续集成环境的构建
- 构建Python的桌面开发环境 于2005年07月26日