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
100,000 elems(time) | |
Benchmark default(0)(μs) default(1)(μs) | |
-------------------------------------------- -------------- -------------- | |
serially/folds/product 100.58 32.77 | |
serially/elimination/product 99.08 32.82 | |
serially/elimination/findIndex 137.68 49.30 | |
serially/transformationX4/mapMaybeM 84.04 32.87 | |
serially/generation/intFromThenTo 75.48 32.12 | |
serially/generation/unfoldr 76.49 32.96 | |
serially/elimination/last 72.76 32.34 |
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 RankNTypes #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
import Control.Monad.Trans.Class | |
import Control.Monad | |
newtype Stream m a = Stream | |
{ runStream :: (forall r. (a -> Stream m a -> m r) -> m r -> m r) } |
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
#!/usr/bin/env stack | |
-- stack runghc --package rawr | |
-- --------------------------------------------------------------------------- | |
-- This code snippet demonstrates using keyword arguments with default values | |
-- in Haskell using the rawr anonymous records library. Supported features: | |
-- | |
-- 1) Specify arguments using keywords | |
-- 2) Make some arguments mandatory and others optional | |
-- 3) Assign default values to optional arguments |
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
# GHC 7.10.3 NO llvm | |
# Start of loop | |
# c4ic: | |
# Heap check + 48 | |
=> 0x408d2a: add $0x30,%r12 | |
=> 0x408d2e: cmp 0x358(%r13),%r12 | |
=> 0x408d35: ja 0x4094af | |
# c4mw: | |
# Loop realloc check logic |