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
#!/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 |
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, PatternGuards #-} | |
module Main (main) where | |
import Control.Monad (forM_, unless) | |
import Prelude hiding (id, mod) | |
import System.Environment (getArgs) | |
import System.Exit (ExitCode(ExitFailure), exitWith) | |
import Bag | |
import Digraph (flattenSCCs) |
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 Main | |
( main | |
) where | |
import Control.Applicative | |
import Control.Monad (mzero) | |
import qualified Data.Vector as V | |
import Data.Vector (Vector) |
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
Rec { | |
$fUniformGaussianValuesDoubleDouble_ziggurat | |
:: forall g_a2D9. | |
RandomGen g_a2D9 => | |
(Vector Double, Vector Double, Vector Word) | |
-> g_a2D9 -> (Double, g_a2D9) | |
$fUniformGaussianValuesDoubleDouble_ziggurat = | |
\ (@ g_a2D9) | |
($dRandomGen_a2Da :: RandomGen g_a2D9) | |
(eta_B2 :: (Vector Double, Vector Double, Vector Word)) |
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
(defvar cmm-mode-hook nil) | |
(add-to-list 'auto-mode-alist '("\\.cmm\\'" . cmm-mode)) | |
(defvar cmm-keywords | |
'("aborts" "align" "aligned" "also" "as" "big" "bits" "byteorder" "case" | |
"const," "continuation" "cut" "cuts" "else" "equal" "export" "foreign" | |
"goto" "if" "import" "in," "invariant" "invisible" "jump" "little" "memsize" | |
"pragma" "reads" "register," "return" "returns" "section" "semi" "span" | |
"stackdata" "switch" "target" "targets" "to," "typedef" "unicode" "unwinds" |
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, UnboxedTuples #-} | |
module Main (main) where | |
import Data.Time.Clock | |
import GHC.Exts | |
import GHC.IO | |
import GHC.Prim | |
import GHC.ST | |
bench = stToIO $ ST $ \ s -> |
NewerOlder