The Haskell Programming Language

The best way today to write robust, maintainable, and efficient software

Haskell is an advanced, purely-functional programming language. Haskell's combination of static and strong typing, declarative style, user-friendly syntax, wide collection of real-world libraries, top-notch tooling, and great educational and support resources, make it a great choice for creating robust, high-performance applications with quick time-to-market.

FP Complete is ready to help you take advantage of this wonderful technology with our consulting offerings and custom training, as well as many online learning resources.

Why Choose Haskell

FP Complete's CEO, Aaron Contorer, explains Haskell's strengths

There are many case studies from companies that have successfully used Haskell for scientific software, distributed computing, and user-facing web applications.

Haskell Case Studies

The Haskell Language website contains more information, including getting start guides, tooling links, tutorials, and community information.

Haskell's Big Three Benefits

At FP Complete, we've chosen Haskell as the cornerstone of most of our technology decisions…

because it works

… and it works better than other software out there. While there are many benefits to this language, we believe that it is a great choice for commercial development for primarily three reasons:

Time to Market

Regardless of your industry, odds are pretty good that the faster you can deliver results, the better. Haskell delivers on this by providing a high level, expressive language. Leveraging the extensive set of libraries available, you can quickly build a working prototype application.

Typical Haskell applications are about the same number of lines of code as equivalent Python or Ruby applications. But unlike those other languages, Haskell prototypes are typically easily converted to production applications due to their higher maintainability and better performance.

In contrast to other languages like C++, Java, and C#, Haskell applications are typically much shorter. You can avoid much of the boilerplate necessary in these languages to get basic functionality, and express your programs declaratively thanks to the combination of functional programming and Haskell's type-first approach.

And while Haskell gives you the option to have fine-grained, low level control, by default you can write at the high level you'd like to in order to elegantly express your solution.

More Maintainable Software

Like most modern languages, Haskell has a strong ecosystem and culture around tested software. It features common paradigms like unit, functional, and integration testing, together with comprehensive test suite libraries. However, Haskell takes this a step further with a few types-first features:

  • Using the QuickCheck library, we can automatically generate test cases for your software. With this kind of approach, you write one line of test code, and your test suite will generate hundreds of test cases for you automatically. This is a great way to test corner cases that developers often overlook.
  • Haskell's type system is what we call strongly typed, meaning you can express more invariants in it. For example, the Yesod web framework for Haskell is able to prevent many Cross Site Scripting (XSS) attacks and broken links with strong typing features. And unlike test cases, when you ensure something with the type system, you know you've covered all cases.

Many people experienced with languages like Java and C++ are used to the worst of a type system: a weakly typed system that forces the developer to do a lot of busywork. Haskell features type inference, letting the developer avoid explicit work around typing, while using its stronger type system to give you better guarantees.

Besides typing features, Haskell uses well thought out solutions to complicated problems:

  • Like many newer languages, Haskell features garbage collection by default. This automatically avoids common mistakes like buffer overruns and double-free errors, which are both common sources of software crashes and security vulnerabilities.
  • Haskell is a purely functional programming language, which enforces a separation between pure code and impure code. Generally speaking, impure code is more error prone and security sensitive. By cordoning off such code, it becomes easier to review and identify programming errors.
  • Over its years of development, Haskell has developed elegant solutions to complicated problems. Asynchronous exceptions, green threads, Software Transactional Memory (STM), and much more lets you solve problems the right way.

All this put together gives you the ability to produce code with less bugs, and evolve that code for new features and changing requirements with more confidence.

Performance

Idiomatic, high-level Haskell code is typically quite fast, on average about half the speed of highly tuned C++ code. This is due to highly optimized libraries like vector and techniques like stream fusion, as well as mature native code generation. Sophisticated profiling techniques like us zero in on performance hot spots, and easy access to low-level techniques and an elegant Foreign Function Interface let us speed up those hot spots quickly.

Beyond this unique mixture of elegance and speed, Haskell also offers a best-in-class multicore experience. Haskell's purity makes many parallelism problems trivial. And for non-trivial problems, well designed libraries like async and concurrency primitives like STM can knock down problems from complicated and error prone to easily verified as correct.

Finally, Haskell's green thread based runtime makes it simple to implement highly concurrent network services. Green threads are significantly faster than system threads due to their avoidance of kernel context switches. And unlike callback-based systems found in other languages, code remains simple and avoids accidental blocking of the entire system due to long-running computations.

What we do

FP Complete is the world’s #1 provider of Haskell expertise, consulting, and commercial-grade tools. Our team contributes prolifically to the open source Haskell world, and FP Complete has developed and continues to maintain many important aspects of the Haskell ecosystem, including:

Learn more about FP Complete consulting

Powered by Devops

We've created a world-class devops platform to host our Haskell code. Learn more about our devops platform and what it can do for you.

Learn more about our devops platform


Copyright © 2013-2017 FP Complete Corp. All rights reserved