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 RecordWildCards #-} | |
| import Data.List | |
| import Control.Monad | |
| import Control.Arrow | |
| import Debug.Trace | |
| type Pos = [Int] | |
| data Rules | |
| = Rules { |
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
| import Data.Conduit | |
| import Control.Monad.Trans.Resource | |
| import Control.Monad | |
| joinSource :: Resource m => Source m (Source m a) -> Source m a | |
| joinSource s = Source $ do | |
| ps <- genSource s | |
| innerSources <- newRef [] | |
| let pull = do xs <- readRef innerSources | |
| case xs 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
| sourceJoin :: Resource m => Source m (Source m a) -> Source m a | |
| sourceJoin s = Source $ do | |
| ps <- prepareSource s | |
| innerSource <- newRef Nothing | |
| let pull = do inner <- readRef innerSource | |
| case inner of | |
| Just x -> do st <- sourcePull x | |
| case st of | |
| Closed -> do pullFrom Nothing | |
| Open vs -> return $ Open vs |
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
| open import Relation.Binary | |
| open import Relation.Binary.PropositionalEquality renaming (sym to psym ; trans to ptrans) | |
| module SortedList | |
| (A : Set) | |
| (_≤_ : A -> A -> Set) | |
| (isDecTotalOrder : IsDecTotalOrder _≡_ _≤_) | |
| where | |
| open import Data.Nat hiding (_≤_ ; _≤?_) |
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 OpTransVec where | |
| open import Data.Vec | |
| open import Data.Nat | |
| open import Data.Product | |
| open import Relation.Binary.PropositionalEquality | |
| open import Function using (_∘_) | |
| data Op (A : Set) : ℕ → ℕ → Set where | |
| ε : Op A 0 0 |
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
| pkgs : { | |
| packageOverrides = self : { | |
| ghc741Packages = { | |
| all = self.haskellPackages_ghc741.ghcWithPackages (Self : [ | |
| self.mtl | |
| self.QuickCheck | |
| self.haskellSrcExts | |
| self.zlib | |
| self.haskeline | |
| self.xhtml |
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
| OpenSSL 0.9.8r 8 Feb 2011 | |
| built on: Sep 16 2011 | |
| options:bn(64,64) md2(int) rc4(ptr,char) des(idx,cisc,16,int) aes(partial) blowfish(ptr2) | |
| compiler: -arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O3 -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DMD32_REG_T=int -DOPENSSL_NO_IDEA -DOPENSSL_PIC -DOPENSSL_THREADS -DZLIB -mmacosx-version-min=10.6 | |
| available timing options: TIMEB USE_TOD HZ=100 [sysconf value] | |
| timing function used: getrusage | |
| The 'numbers' are in 1000s of bytes per second processed. | |
| type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes | |
| md2 1738.06k 3586.42k 4852.47k 5265.94k 5527.42k | |
| mdc2 9479.27k 10495.11k 10783.37k 10940.08k 10951.27k |
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
| ; ELPA | |
| (require 'package) | |
| (package-initialize) | |
| (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/") t) | |
| (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) | |
| (defvar preload-packages '()) | |
| (setq preload-packages | |
| '( | |
| auctex |
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 DeriveFunctor #-} | |
| module ZipStream where | |
| import Control.Applicative | |
| data ZipStream a = ZipStream {headZ :: a, tailZ :: ZipStream a} | |
| deriving (Functor) | |
| -- Just give a taste... |
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 Git where | |
| import Data.ByteString | |
| import Data.Time | |
| import qualified Data.Map as M | |
| -- | Objects that are stored in the git storage by SHA1. Just a dummy class in this demonstration. | |
| class Storable a | |
| newtype Object = Object { objectData :: ByteString } |