| Str.String| Str.Text| Str.Text.Lazy ---| ---| ---| --- Str | ✔| ✔| ✔ Chr | ✔| ✔| ✔ Index | ✔| ✔| ✔ empty | ✔| ✔| ✔ singleton | ✔| ✔| ✔ pack | ✔| ✔| ✔ unpack | ✔| ✔| ✔ cons | ✔| |
This file contains hidden or 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
| 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: |
This file contains hidden or 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
| " 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... |
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.
You'll need to get the
- https://www.haskell.org/platform/ (installer, you can pick min or full)
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:
- 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."
This file contains hidden or 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
| module GhcSort where | |
| import GHC | |
| import GhcPlugins | |
| import DriverPhases | |
| import Control.Monad | |
| import Data.List | |
| import Data.Maybe | |
| import System.FilePath |
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.
This file contains hidden or 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 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 |
This file contains hidden or 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
| ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAvPFdNkCBdTqqKVsvI1URwYtsIZz4YwqHE/99nDfB22F5/tFMHVayTwLe6LLPu4U8YaOW01xHnQTOh+Y/dkaXDscV5XzwniPhueRdkU31TH2cgfq7LebIpoPa3vzwzdioq5GY0M2KH6qv/Ro11RDho8VKPRHZhnMlBDBU7kOKy+9aL/LcJTEaEMO1WzgG17rKQVScKMzqcjgZ7150hE9eeIDA8NwH9e4fq5X2qTwLYpz2ndq3X+B/ugq5U1s/b5JxSoQQth0RKwonAq6mbixBj6FYEpUqpkAksmJXqW4d0kG0D9EAUEFDM9drY9r3azaURT9yJLDTvFJStIZ1Am54xQ== ezyang-sabre |
This file contains hidden or 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
| ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAxDoJ6C1oKYT/wkxLuQPxylQsYEWiulWumGI7ShQ7KhKZo2T/9t4OD0lsMYAZP2FnwjIkD1SIVetUqb8/4JtY9Oqyvx72QoXk+TFQ4gDLXLuIovF9DpHgZOnYzEk8IAQE4DmFkT94YSwPJzST3FfuGUpfwpE3ouOdRmUs+yxbOQrx+7IfhhLdRCYDgCyzAKP9bkfRlVJ6QJLxFFpj8H4zPlwQd+QggFWKkhL9t/KTvPZ9I7zpF95lfOtgSlNlUNCBuWzdNkH7f4KoF2IkCfGQQ5U/8jjdngDHjDToL7cjLddOO2zvbAl0kqJpkvBBaA36Goe3trm9TLKc4fPnq0leqQ== |