Haskell is a powerful, purely functional programming language that allows developers to express their designs elegantly and succinctly. Modern Haskell tools such as Cabal and Stack also allow developers to build and manage large and complex systems and to consume a vast array of high-quality open source libraries.
First we will start this course by learning how to edit , build and test our Haskell code. Then we will learn how to create modules in Haskell. We will learn about the various Haskell repositories and how to use them.Once we have our Haskell package in place we will end by testing our package using third-party ecosystems.
This course builds on the foundations provided by the Fundamentals of Practical Haskell Programming course and helps to bridge the gap between introductory and advanced Haskell by teaching you how to manage and develop complex programs. We'll also dispel the myth that Haskell is only useful for toy programs.
This course covers the important parts of the Haskell development process that are frequently neglected by beginner-level tutorials.
About the Author
Richard Cook is a staff software engineer at Tableau Software and works on high-performance relational database systems. He works primarily in C++, but has experience in a broad range of languages and technologies. He is a keen user of Haskell in his spare time and is frequently able to apply his functional programming and Haskell experience to his daily work. He is organizer of the Seattle Area Haskell Users’ Group and an active member of the Seattle functional programming community. He is currently developing a machine-learning framework for Haskell.
He has a deep interest in programming languages and type systems in general, having developed compilers and developer tooling in the past. He is also a keen user of Python and C# and works regularly on all major desktop operating systems and dabbles with web applications.
Developing real Haskell programs requires a code editor that is up to the task, along with a build tool for managing dependencies.
Cabal is the industry-standard method of building nontrivial Haskell packages.
We’ll be using Stack for building our projects, and so we need to learn more about how to use the tool.
Typically, we’ll want quick feedback on our code changes. we may also want to iteratively develop test cases: Stack has various commands to help with this.
As our programs become larger, we will find that keeping the entire source code in a single source file becomes unwieldy. We may also run into problems with name collisions, and we may want to control the accessibility of the different names within our program.
We will look at how to create our own modules from scratch in Haskell. We’ll also compare “exposed” vs. “other” modules as well as re-exporting names from modules.
Functions defined in modules can be imported in various different ways: we can even use appropriately structured imports to handle identically named functions from different modules as well as to hide names from modules.
Haskell’s most common package repository, Hackage, contains a wealth of high-quality open-source code; reusing other people’s code is a vital part of developing real-world programs and using packages is the standard way to do this in Haskell.
Given the range of packages available in the ecosystem, ways to effectively search repositories is an important skill.
Many packages exist, which solve the same problems in similar and, sometimes, different, ways: we will discuss the various factors of concern when wishing to make an informed choice.
Cabal and Stack offer many different ways to add dependencies on third-party packages: a brief introduction to the approaches will allow developers to depend on stable or development versions of the packages.
Hackage tracks approximately 12,000 packages; it can be an overwhelming job for newcomers to any programming language to make choices between the many packages. It can be useful to know what the most common packages are for a range of common programming tasks.
Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.
With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.
From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.
Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.