Haskell 开发环境搭建

来源:互联网 发布:xp 数据执行保护 编辑:程序博客网 时间:2024/06/05 18:21

haskell,一种函数编程语言,既是解释型语言又是编译型语言。

相对Haskell来说,传统的Basic,Pascal,C++,C#,Java,Python等都是命令(imperative)编程语言程序语句有一定的执行次序函数(functional)编程语言则给出执行的内容关注于更高层次的"做什么"而不是"怎么做", 这就是二者最明显的一个区别。函数编程语言的语法功能非常强,使编程的效率大幅提高。 

开发环境

下载去官网即可。http://www.haskell.org/。 有WindowsMacLinux版本。

官网上对Haskell的简介:

Haskell is an advanced purely-functional programming language. An open-source product of more than twenty years of cutting-edge research, it allows rapid development of robust, concise, correct software. With strong support for integration with other languages, built-in concurrency and parallelism, debuggers, profilers, rich libraries and an active community, Haskell makes it easier to produce flexible, maintainable, high-quality software.

解释器为ghci.exe,编译器为ghc.exe,见下图。



HelloWorld编写

源文件main.hs   下行为整个文件的内容。

main = putStrLn "Hello World"

然后编译为exe文件:


0 0
原创粉丝点击