- [Introduction to Unification Theory Lecture 1][itut-1]
- Sections 8.1 and 8.2 of [The Handbook of Automated Reasoning][hoar]
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
/*: | |
This is an implementation of Algorithm W, as found in [Principal Types for functional programs](http://web.cs.wpi.edu/~cs4536/c12/milner-damas_principal_types.pdf). | |
We'll start by defining literals and expressions: | |
*/ | |
enum Literal { | |
case string(String) | |
case int(Int) |
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
module Main where | |
import Prelude | |
import Data.List | |
import Data.Either (Either(..)) | |
import Data.Maybe (Maybe(..)) | |
import Data.Newtype (class Newtype, unwrap) | |
import Data.Tuple (Tuple(..), fst, snd) | |
import Unsafe.Coerce (unsafeCoerce) |
I had a fun refactoring example in Haskell today I wanted to share.
So, I've got a structure with a nested Maybe
inside, which looked like this:
Maybe (Vector.Vector (Maybe (Direction, [Departure])))
I wanted to get that second-level Maybe
folded into the first as it didn't provide any semantic meaning.
So I start by writing the type definition:
It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
This is unmaintained, please visit Ben-PH/spacemacs-cheatsheet
SPC q q
- quitSPC w /
- split window verticallySPC w
- - split window horizontallySPC 1
- switch to window 1SPC 2
- switch to window 2SPC w c
- delete current window
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 GeneralizedNewtypeDeriving #-} | |
import Control.Monad.IO.Class | |
import Control.Monad.Trans.Class | |
import Prelude hiding (log) | |
-------------------------------------------------------------------------------- | |
-- The API for cloud files. | |
class Monad m => MonadCloud m where | |
saveFile :: Path -> Bytes -> m () |
Defines a Flycheck checker for running the PureScript compiler through Pulp. Based on Bodil's Stokke's: https://github.com/bodil/ohai-emacs/blob/master/modules/ohai-purescript.el#L43
Supports:
- Standard compiler error messages
- psc: deprecation messages
- Syntax errors
- Sixth Summer School on Formal Techniques / 22-27 May
- Twelfth International Summer School on Advanced Computer Architecture and Compilation for High-Performance and Embedded Systems / 10-16 July 2016
- Oregon Programming Languages Summer School / 20 June-2 July 2016
- The 6th Halmstad Summer School on Testing / 13-16 June, 2016
- Second International Summer School on Behavioural Types / 27 June-1 July 2016
- Virtual Machines Summer School 2016 / 31 May - 3 June 2016
- ECOOP 2016 Summer School
NewerOlder