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 ScopedTypeVariables#-} | |
| import Test.QuickCheck hiding ((.&.)) | |
| import Test.Framework (Test, testGroup, defaultMain) | |
| import Test.Framework.Providers.QuickCheck2 (testProperty) | |
| import Debug.Trace (trace) | |
| import Control.Exception (SomeException, evaluate, try) | |
| import System.IO.Unsafe (unsafePerformIO) | |
| import Data.Bits ((.&.)) |
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
| benchmarking lazy text | |
| mean: 3.904823 ms, lb 3.844596 ms, ub 4.018289 ms, ci 0.950 | |
| std dev: 410.2641 us, lb 239.7706 us, ub 612.5513 us, ci 0.950 | |
| benchmarking new conduit | |
| mean: 7.473182 ms, lb 7.354699 ms, ub 7.651235 ms, ci 0.950 | |
| std dev: 739.4707 us, lb 538.1933 us, ub 975.3947 us, ci 0.950 |
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 RankNTypes #-} | |
| import Data.Conduit | |
| import qualified Data.Conduit.Text as CT | |
| import Criterion.Main | |
| import qualified Data.Text as T | |
| import qualified Data.Text.Lazy as TL | |
| import qualified Data.Text.Lazy.Encoding as TLE | |
| import qualified Data.ByteString as S | |
| import qualified Data.ByteString.Lazy as L | |
| import qualified Data.Conduit.List as CL |
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 OverloadedStrings #-} | |
| {-# LANGUAGE BangPatterns#-} | |
| {-# LANGUAGE RankNTypes #-} | |
| import Blaze.ByteString.Builder (Builder, fromByteString, toByteString) | |
| import Control.Exception (Exception) | |
| import Control.Monad.Trans.Class (lift) | |
| import Data.ByteString (ByteString) | |
| import qualified Data.ByteString as S | |
| import qualified Data.ByteString.Lazy as L | |
| import Data.Monoid |
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| <meta http-equiv="Content-Style-Type" content="text/css" /> | |
| <meta name="generator" content="pandoc" /> | |
| <title></title> | |
| <style type="text/css">code{white-space: pre;}</style> | |
| <style type="text/css"> | |
| table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode { |
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 OverloadedStrings #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE LambdaCase #-} | |
| -- https://gist.github.com/michaelt/88e1fac12876857deefe | |
| -- following | |
| -- https://gist.github.com/gelisam/c769d186493221d7ebbe and associated controversy. | |
| module Main where |
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 OverloadedStrings #-} | |
| import Pipes | |
| import Pipes.Group | |
| import qualified Pipes.Prelude as P | |
| import qualified Pipes.ByteString as PB | |
| import qualified Pipes.Attoparsec as PA | |
| import Data.Aeson | |
| import Data.Aeson.Parser | |
| import Data.Aeson.Types | |
| import Data.Monoid |
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
| data Primitive = Num | |
| |Chr | |
| |Str | |
| |Cnd Bool deriving (Show) | |
| data T = K Int | R Int | |
| -- >>> :set -XDataKinds | |
| -- >>> :t Num | |
| -- Num :: Primitive | |
| -- >>> :k Num |
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 RebindableSyntax, RecordWildCards, CPP, OverloadedStrings #-} | |
| import Data.Monoid | |
| import Prelude | |
| import Control.Monad | |
| import Data.String | |
| import Text.Blaze.Html5 as H | |
| import Text.Blaze.Html5.Attributes as A | |
| import qualified Text.Blaze as B |
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
| -- Parse module. | |
| -- By G.W. Schwartz | |
| -- | |
| {- | Collection of functions for the parsing of a fasta file. Uses the Text | |
| type. | |
| -} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE BangPatterns #-} |
OlderNewer