Skip to content

Instantly share code, notes, and snippets.

View ggazzi's full-sized avatar

Guilherme Grochau Azzi ggazzi

View GitHub Profile
@ggazzi
ggazzi / TestingInHaskell.md
Last active April 18, 2017 16:51
Testing in Haskell

Testing in Haskell

Defining Tests

There are two main kinds of automated testing supported by Haskell testing libraries:

  • Unit tests, where some data is generally hardcoded. Generally, each test case will be designed to cover a class of possible inputs. They explicitly cover many cases, but if the tester forgets some corner case, it will certainly not be covered.

  • Property tests, where some data is randomly generated for the tests. This has no guarantee of covering all classes of possible inputs, but there is a large chance of capturing unforeseen corner cases.

@ggazzi
ggazzi / haskell-flymake.el
Last active December 19, 2015 14:08
Integration of sandboxed GHC and HLint with Emacs' Flymake.
;; Copyright 2013 Guilherme Azzi
;; Permission is hereby granted, free of charge, to any person obtaining a copy
;; of this software and associated documentation files (the "Software"), to deal
;; in the Software without restriction, including without limitation the rights
;; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
;; copies of the Software, and to permit persons to whom the Software is
;; furnished to do so, subject to the following conditions:
;; The above copyright notice and this permission notice shall be included in