O'Reilly logo

Functional Programming: A PragPub Anthology by Michael Swaine

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 24A Haskell Project: Testing Native Code

by Aaron Bedra

This chapter will dive into a number of programming techniques at once. The goal is to explain an advanced form of testing that can be very useful. We’re going to use a higher-level language, Haskell, to test some legacy C code. We do this because Haskell (or any more expressive language) takes less code to express the essence, or intended functionality, of a program. We will reimplement the code already built in our legacy codebase to determine if it is functioning as intended.

If you want to follow along with this chapter, you’ll need a few tools installed. You’ll need a C compiler capable of compiling C11 standard code. This can be a current GCC or Clang. You’ll also need ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required