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 Main where | |
import Prelude hiding (lines) | |
import Lens.Family | |
import Pipes | |
import Pipes.Group | |
import Pipes.HTTP | |
import Pipes.Text | |
import Pipes.Text.Encoding | |
import Pipes.Text.IO (toHandle,stdout) |
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 #-} |
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 #-} | |
module Main where | |
import System.Environment | |
import Data.Monoid | |
import Control.Monad | |
import Data.Aeson | |
import qualified Data.Text as T | |
import qualified Data.Text.IO as T | |
import Network.HTTP.Client |
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 TypeOperators, LambdaCase, BangPatterns, RankNTypes #-} | |
-- Needed for the MonadBase instance | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-#LANGUAGE ScopedTypeVariables #-} | |
module Loop where | |
import Control.Monad.Trans | |
import Control.Monad |
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
{-| This module provides a tutorial for the @pipes-concurrency@ library. | |
This tutorial assumes that you have read the @pipes@ tutorial in | |
@Pipes.Tutorial@. | |
I've condensed all the code examples into self-contained code listings in | |
the Appendix section that you can use to follow along. | |
-} | |
-- module Pipes.Concurrent.Tutorial |
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 Lens.Simple | |
-- import Control.Lens (view) | |
import Control.Monad | |
import qualified Data.List as L | |
import Data.Vector (Vector) | |
import qualified Data.Vector.Generic as V | |
import qualified Data.Vector.Generic.Mutable as VM | |
import Pipes | |
import Pipes.Group hiding (chunksOf) |