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
> {-# OPTIONS_GHC -fdicts-cheap -fbang-patterns #-} | |
> {-# LANGUAGE Rank2Types, ExistentialQuantification#-} | |
> module StreamCont where | |
> data Stream a = forall s. Stream (s -> Step a s) s | |
> data Step a s = Done | |
> | Yield a s | |
> | Skip s | |
> data Stream' 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
{-# OPTIONS_GHC -Wall -fno-warn-name-shadowing #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE Rank2Types #-} | |
import Control.Applicative | |
------------------------------------------------------------------------ | |
newtype Identity a = Identity { runIdentity :: a } | |
instance Functor Identity where |
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 FlexibleContexts #-} | |
{-# LANGUAGE Rank2Types #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
import Control.Applicative | |
------------------------------------------------------------------------ | |
newtype Identity a = Identity { runIdentity :: a } | |
instance Functor Identity where |
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 MultiParamTypeClasses #-} | |
{-# LANGUAGE Rank2Types #-} | |
data Exp = Var String | Lit Int | Add Exp Exp | |
| Mul Exp Exp | Neg Exp | |
| Do Stm | |
deriving Show | |
data Stm = Decl Typ String | Assign String Exp | Return Exp | Block [Stm] | |
deriving Show |
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
/Users/nominolo/code/ghc/parallel/inplace/lib/ghc-stage2 -B/Users/nominolo/code/ghc/parallel/inplace/lib --make Setup.hs -j2 -o blu1 +RTS -s -N2 | |
[ 2 of 58] Compiling[ D1i sotfr i5b8u]t iCoonm.pCiolmipnagt .DRiesatdrPi b(u tDiiosnt.rSiibmuptlieo.nP/rCeoPmrpoacte/sRse.aUdnPl.ihts ,( DDiissttrriibbuuttiioonn//CSoimmppalte//RPeraedPPr.ooc e)s | |
s/Unlit.hs, Distribution/Simple/PreProcess/Unlit.o ) | |
Loading iface base:Prelude | |
Loading iface base:Data.Char | |
Loading iface base:Control.Monad | |
Loading iface base:Data.List |
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
2173 expected passes | |
72 expected failures | |
15 unexpected passes | |
1 unexpected failures | |
Unexpected passes: | |
ClassEqContext(normal) | |
ClassEqContext2(normal) | |
ClassEqContext3(normal) | |
GADT10(normal) |
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 BangPatterns #-} | |
import Criterion.Main | |
import Data.Int | |
import Data.Word | |
import Data.List | |
import Data.Digest.Murmur32 | |
main = defaultMain $ |
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 BangPatterns #-} | |
module Murmur3 where | |
import Data.Word ( Word32 ) | |
import Data.Bits ( rotateL, xor, shiftR ) | |
-- Same associativity as the proposed `mappend` operator for Data.Monoid | |
infixr 6 <> | |
-- MurmurHash3 uses 3 state variables, h1, c1, c2 |
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
[alias] | |
co = checkout | |
st = status | |
hist = log --pretty=format:\"%C(yellow)%h%Creset %ad | %s%Cgreen%d%Creset [%C(blue)%an%Creset]\" --graph --date=short | |
Example output (coloured) | |
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 works with Carbon Emacs 2010 | |
(defun mac-toggle-max-window () | |
(interactive) | |
(set-frame-parameter nil 'fullscreen | |
(if (frame-parameter nil 'fullscreen) | |
nil | |
'fullboth))) | |
;; Now bind it to a key (e.g., Mac+Meta+Return) |
OlderNewer