- A Type of Programming
- Algorithm Design with Haskell
- Beginning Haskell: A Project-Based Approach
- Developing Web Apps with Haskell and Yesod
- Functional Design and Architecture
- Get Programming with Haskell
- Haskell Book
- Haskell Cookbook
- Haskell Data Analysis Cookbook
- Haskell Design Patterns
Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct
(WIP)
- Automatic White-Box Testing with Free Monads | Alexander Granin
- Description: Article and showcase project about an approach to whitebox testing. Describes the idea of recordable and replayable business scenarios based on the Free Monad approach.
- Design Approach: [Free Monads]
- Technologies: [free, aeson]
- Teaches for: How to make a Free monad based business logic recordable and replayable. How to use the recordings for automatic whitebox testing. How to configure this system to do integration testing.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eval "$(lorri direnv)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun diff-buffers (buffer-A buffer-B) | |
"Diff two buffers." | |
(interactive | |
(let* ((only-two? (eq 2 (count-windows))) | |
(wins (sort (window-list) | |
(lambda (a b) (< (window-use-time a) | |
(window-use-time b))))) | |
(b1 (if only-two? | |
(window-buffer (first wins)) | |
(read-buffer "Buffer A to compare"))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env stack | |
-- stack --resolver lts-18.8 script | |
{-# LANGUAGE OverloadedStrings #-} | |
{- | |
This is a handy illustration of converting between five of the commonly-used | |
string types in Haskell (String, ByteString, lazy ByteString, Text and lazy | |
Text). |
A guide to setting up the Haskell tooling for Emacs in a Nix environment.
I've discovered something how to do something that GHC never intended you to be able to do, and I'm wondering if there's a way to abuse this to do interesting things.
It's known that you can express visible, dependent quantification at the kind level:
data A a :: a -> Type
λ> :kind A
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# language TemplateHaskell, ScopedTypeVariables, RankNTypes, | |
TypeFamilies, UndecidableInstances, DeriveFunctor, GADTs, | |
TypeOperators, TypeApplications, AllowAmbiguousTypes, | |
TypeInType, StandaloneDeriving #-} | |
import Data.Singletons.TH -- singletons 2.4.1 | |
import Data.Kind | |
-- some standard stuff for later examples' sake |