I hereby claim:
- I am jacobstanley on github.
- I am jacobstanley (https://keybase.io/jacobstanley) on keybase.
- I have a public key whose fingerprint is 134E 69FE D660 1130 BFBE 29F7 E5F5 4903 3637 6192
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import qualified System.Console.Concurrent as Concurrent | |
| trace :: [Char] -> a -> a | |
| trace string expr = | |
| unsafePerformIO $ do | |
| traceIO string | |
| return expr | |
| traceIO :: [Char] -> IO () | |
| traceIO string = do |
| -- Quoter unfortunately need to be in another file due to GHC staging restrictions | |
| import Quoter | |
| foo :: ParsedExpr | |
| foo = | |
| [expr| Var "salads" |] | |
| -- foo = | |
| ParsedExpr {parsedSource = " Var \"salads\" ", parsedExpr = Var "salads"} |
| prop_foo :: Property () | |
| prop_foo = do | |
| x <- forAll $ elements ["a", "b", "c"] | |
| y <- forAll $ chooseInt 0 10 | |
| guard $ not (x == "a" && y == 5) -- works like (==>) from QuickCheck | |
| .. |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE TypeApplications #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE FunctionalDependencies #-} | |
| {-# LANGUAGE PartialTypeSignatures #-} |
| Instance Type | vCPU | Memory (GiB) | Storage (GB) | SSD | Drives | Network Perf. | Processor | Clock (GHz) | AVX | AVX2 | Turbo | EBS Opt. | Enhanced Network |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| t1.micro | 1 | 0.613 | - | - | EBS Only | Very Low | ? | ? | - | - | - | - | - |
| t2.nano | 1 | 0.5 | - | - | EBS Only | Low | Intel Xeon family | Up to 3.3 | Yes | - | Yes | - | - |
| t2.micro | 1 | 1 | - | - | EBS Only | Low to Moderate | Intel Xeon family | Up to 3.3 | Yes | - | Yes | - | - |
| m1.small | 1 | 1.7 | 160 | - | 1 x 160 | Low | ? |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE InjectiveTypeFamilies #-} | |
| class Bonkers b where | |
| type Bonkers1 b = b1 | b1 -> b | |
| type Bonkers2 b = b2 | b2 -> b | |
| bonkersFrom :: Bonkers1 b -> Bonkers2 b | |
| bonkers :: Bonkers b => Bonkers1 b -> Bonkers2 b |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE DeriveGeneric #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE LambdaCase #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| {-# LANGUAGE UndecidableInstances #-} |
| data Parser a where | |
| Val :: Show a => a -> Parser a | |
| Cat :: Parser a -> Parser b -> Parser (a, b) | |
| instance Show (Parser a) where | |
| showsPrec p x = | |
| showParen (p > 10) $ | |
| case x of | |
| Val n -> | |
| showString "Val " . |
Use these instructions if you want to run multiple versions of GHC side-by-side.
This setup doesn't have GHC on the PATH by default, and uses g to cycle between available versions.
$ wget https://www.haskell.org/ghc/dist/7.8.4/ghc-7.8.4-x86_64-apple-darwin.tar.xz