View gist:56a87cd1675d037c1d228c33db359c9f
New summary by @ezyang.
The goal of this task is to add a new command `Setup doctest`, which runs the doctest command on all of the modules of each component in a package, in much the same way `Setup haddock` runs `haddock` on all the modules of each component in a package.
There are a number of steps to implementing this:
1. You have to add the boilerplate for setting doctest up as a new command. Grepping for occurrences of haddock should give you an idea for what you have to edit; the key files are `Cabal/Distribution/Simple/Setup.hs`, adding a case to `defaultMainHelper` in `Cabal/Distribution/Simple.hs`, and a new file to actually contain the logic. I'd recommend against putting too many flags into `DoctestFlags` when starting off.
2. The overall logic of the driver should be something like this:
View .vimrc
" https://github.com/tpope/vim-pathogen
" Pathogen is good because you can keep plugins together in logical
" units, without blasting them throughout your directory structure.
execute pathogen#infect()
" This just turns on per-filetype plugins. Vim ships with file
" indentation/plugin/syntax rules for highlighting. The highlighting
" is nice. Sometimes the indentation is a bit annoying though because
" it REINDENTS my stupid code when I didn't want it to. It's annoying
" to track down why it's doing that...
View render.md

| Str.String| Str.Text| Str.Text.Lazy ---| ---| ---| --- Str | ✔| ✔| ✔ Chr | ✔| ✔| ✔ Index | ✔| ✔| ✔ empty | ✔| ✔| ✔ singleton | ✔| ✔| ✔ pack | ✔| ✔| ✔ unpack | ✔| ✔| ✔ cons | ✔| |

View haskell-on-windows.md

Haskell on Windows

These are empirical observations about running Haskell on Windows. If your experiences have been different, I'd love to hear about it.

Install

You'll need to get the

View building.rst

In Backpack, we both typecheck packages with holes (producing only interface files) and compile fully instantiated packages (producing interface files and object files). While doing this, we try to minimize the amount of work the compiler does. In particular:

  1. Any package with holes is typechecked exactly once, in its most general form (with no instantiations). Partially instantiated packages are never typechecked; instead, we just rename the most general interfaces according to the instantiation "on the fly."
View GhcSort.hs
module GhcSort where
import GHC
import GhcPlugins
import DriverPhases
import Control.Monad
import Data.List
import Data.Maybe
import System.FilePath
View ghc-make.rst

How ghc --make works

In abstract, the job of ghc --make is very simple: compute a dependency graph between modules, and rebuild the ones that have changed. Unfortunately, the code in GhcMake is quite a bit more complicated than that, and some of this complexity is essential to the design of GHC:

  • Interaction with GHCi involves mutating process-global state.
View Productive.hs
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE InstanceSigs #-}
module Productive where
-- | Productive coprogramming in the Par monad. Based off of
View gist:b5d4dbf924e523a938da
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAvPFdNkCBdTqqKVsvI1URwYtsIZz4YwqHE/99nDfB22F5/tFMHVayTwLe6LLPu4U8YaOW01xHnQTOh+Y/dkaXDscV5XzwniPhueRdkU31TH2cgfq7LebIpoPa3vzwzdioq5GY0M2KH6qv/Ro11RDho8VKPRHZhnMlBDBU7kOKy+9aL/LcJTEaEMO1WzgG17rKQVScKMzqcjgZ7150hE9eeIDA8NwH9e4fq5X2qTwLYpz2ndq3X+B/ugq5U1s/b5JxSoQQth0RKwonAq6mbixBj6FYEpUqpkAksmJXqW4d0kG0D9EAUEFDM9drY9r3azaURT9yJLDTvFJStIZ1Am54xQ== ezyang-sabre
View gist:461238b745a03ce2fd77
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAxDoJ6C1oKYT/wkxLuQPxylQsYEWiulWumGI7ShQ7KhKZo2T/9t4OD0lsMYAZP2FnwjIkD1SIVetUqb8/4JtY9Oqyvx72QoXk+TFQ4gDLXLuIovF9DpHgZOnYzEk8IAQE4DmFkT94YSwPJzST3FfuGUpfwpE3ouOdRmUs+yxbOQrx+7IfhhLdRCYDgCyzAKP9bkfRlVJ6QJLxFFpj8H4zPlwQd+QggFWKkhL9t/KTvPZ9I7zpF95lfOtgSlNlUNCBuWzdNkH7f4KoF2IkCfGQQ5U/8jjdngDHjDToL7cjLddOO2zvbAl0kqJpkvBBaA36Goe3trm9TLKc4fPnq0leqQ==