Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 #-} | |
{-# LANGUAGE DeriveGeneric, DeriveAnyClass #-} | |
module Main (main) where | |
import Control.DeepSeq | |
import Criterion.Main | |
import GHC.Generics (Generic) | |
import Prelude hiding (replicate, sum) | |
data List = Cons Int List | Nil |
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
import Control.Monad | |
import Control.Concurrent | |
import Data.Int | |
import System.Environment | |
sendSidewards :: Chan Int -> Chan Int -> IO () | |
sendSidewards from to = do | |
n <- readChan from | |
writeChan to n | |
sendSidewards from to |
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
./accelerate-0.14.0.0/Data/Array/Accelerate/Array/Data.hs:43:import GHC.Prim (newPinnedByteArray#, byteArrayContents#, | |
./accelerate-0.14.0.0/Data/Array/Accelerate/Array/Data.hs:631:uArrayPtr (UArray _ _ _ ba) = Ptr (byteArrayContents# ba) | |
./accelerate-0.14.0.0/Data/Array/Accelerate/Array/Data.hs:641: (# s', ba #) -> (# s', Ptr (byteArrayContents# ba) #) | |
./ajhc-0.8.0.10/src/RawFiles.hs:60: \ case action (byteArrayContents# barr#) s of { (# s, r #) ->\n\ | |
./base-4.7.0.0/Foreign/Marshal/Alloc.hs:124: let addr = Ptr (byteArrayContents# barr#) in | |
./base-4.7.0.0/Foreign/Marshal/Alloc.hs:135: let addr = Ptr (byteArrayContents# barr#) in | |
./base-4.7.0.0/GHC/Conc/Windows.hs:99: asyncRead fd isSock len ((Ptr (byteArrayContents# (unsafeCoerce# bufB))) `plusPtr` off) | |
./base-4.7.0.0/GHC/Conc/Windows.hs:103: asyncWrite fd isSock len ((Ptr (byteArrayContents# (unsafeCoerce# bufB))) `plusPtr` off) | |
./base-4.7.0.0/GHC/ForeignPtr.hs:163: (# s', ForeignPtr (byteArrayContents# (unsafeCoerce# m |
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 MagicHash #-} | |
{-# LANGUAGE UnboxedTuples #-} | |
module Test where | |
import GHC.Exts | |
add :: MutableByteArray# s -> Int# -> Int# -> State# s -> (# State# s, Int# #) | |
add mba ix n s = fetchAddIntArray# mba ix n s | |
nand :: MutableByteArray# s -> Int# -> Int# -> State# s -> (# State# s, 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
# One time setup for hacking on cabal-install | |
git clone https://github.com/haskell/cabal.git | |
cd cabal/cabal-install | |
cabal sandbox init | |
cabal sandbox add-source ../Cabal | |
cabal install --only-dep | |
# Iterate | |
cabal build |
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
Full Data.HashMap.Base 361 739926 0.2 0.5 0.4 0.9 | |
Leaf-coll Data.HashMap.Base 368 101 0.0 0.0 0.0 0.0 | |
BitmapIndexed-replace Data.HashMap.Base 364 226745 0.1 0.1 0.1 0.2 | |
Leaf-coll Data.HashMap.Base 367 87870 0.0 0.0 0.0 0.0 | |
BitmapIndexed-grow Data.HashMap.Base 366 25452 0.0 0.0 0.0 0.0 | |
Leaf-no-coll Data.HashMap.Base 365 81709 0.0 0.1 0.0 0.1 | |
Leaf-no-coll Data.HashMap.Base 363 6060 0.0 0.0 0.0 0.0 | |
BitmapIndexed-grow Data.HashMap.Base 362 203515 0.1 0.1 0.1 0.1 | |
BitmapIndexed-replace Data.HashMap |
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
#!/bin/sh | |
inPreprocessorMode () { | |
hasE=0 | |
hasU=0 | |
hasT=0 | |
for arg in "$@" | |
do | |
if [ 'x-E' = "x$arg" ]; then hasE=1; fi | |
if [ 'x-undef' = "x$arg" ]; then hasU=1; fi |
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
export GHC=$compiler | |
cd Cabal | |
which cabal | |
[ ! -d .cabal-sandbox ] && cabal sandbox init | |
cabal clean | |
cabal install -j --only-dependencies --enable-tests -w $compiler | |
cabal configure --enable-tests -w $compiler | |
cabal build | |
cabal test --test-option='--jxml=$test-suite.junit.xml' --test-option=--plain | |
cabal sdist |
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 #-} | |
{-# OPTIONS_GHC -funbox-strict-fields #-} | |
module Longest where | |
import qualified Data.ByteString as B | |
import qualified Data.ByteString.Char8 as BC | |
import Data.Word (Word8) | |
-- using custom data type (only works for 2 elements) | |
data TwoQueue = Empty |
NewerOlder