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.Instances | |
import Control.Monad.Reader | |
data Env = Env Int Int | |
foo :: Int -> Env -> Int | |
foo a (Env x _) = a + x |
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 NoMonomorphismRestriction #-} | |
module Main where | |
import Control.Applicative | |
import Control.Proxy | |
import qualified Data.ByteString.Internal as BS | |
import qualified Data.ByteString.Lazy as BL | |
import qualified Data.ByteString.Lazy as BLI | |
import qualified Control.Proxy.Attoparsec as PA |
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 OverloadedStrings #-} | |
module Main where | |
import qualified RFC2616 | |
import Control.Applicative | |
import Control.Monad | |
import Control.Proxy ((>->), request, respond, lift) | |
import qualified Control.Proxy as P | |
import qualified Control.Proxy.Attoparsec as PA |
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 GeneralizedNewtypeDeriving #-} | |
module Control.Proxy.Trans.Parse ( | |
-- * ParseP | |
ParseP(..), | |
runParseP, | |
runParseK | |
) where | |
import Control.Applicative (Applicative) |
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
src/Control/Proxy/Trans/Parse.hs:138:30: | |
Could not deduce (e ~ ReadParserError) | |
from the context (Read b) | |
bound by the instance declaration | |
at src/Control/Proxy/Trans/Parse.hs:132:10-41 | |
`e' is a rigid type variable bound by | |
the type signature for parse :: ReadParser b -> a -> Result e a b1 | |
at src/Control/Proxy/Trans/Parse.hs:137:3 | |
In the second argument of `Fail', namely `e' | |
In the expression: Fail a' e |
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
-- | This module holds the messy code I wrote while walking through: | |
-- | |
-- The Essence of the Iterator Pattern | |
-- Jeremy Gibbons, Bruno César dos Santos Oliveira. 2009. | |
-- http://www.cs.ox.ac.uk/publications/publication1409-abstract.html | |
-- | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FunctionalDependencies #-} |
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
module Main where | |
import Control.Monad | |
import Control.Proxy ((>->)) | |
import qualified Control.Proxy as P | |
import qualified Control.Proxy.Safe as P | |
import qualified Control.Proxy.Network.TCP as NT | |
import qualified Control.Proxy.Safe.Network.TCP as NTS | |
import qualified Network.Socket.ByteString as NSB (recv) |
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 OverloadedStrings #-} | |
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-} | |
module Main where | |
import Control.Applicative | |
import Control.Error | |
import Control.Monad.Trans.Class | |
import Control.Monad | |
import Control.Proxy |
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 OverloadedStrings #-} | |
module Main (main) where | |
import Control.Applicative | |
import qualified Data.Attoparsec.Text as A | |
import qualified Data.Text as T | |
import Control.Monad | |
import Control.Monad.Trans.Class | |
import Control.Monad.ST |
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.Proxy ((>->), (\>\)) | |
import qualified Control.Proxy as P | |
import qualified Control.Proxy.Trans.State as P | |
import qualified Control.Proxy.Trans.Either as P | |
import qualified Control.Proxy.Parse as Pa | |
import qualified Control.Proxy.Binary as Pb | |
import qualified Data.Binary as Bin | |
import qualified Data.ByteString.Lazy as BL | |
import qualified Data.ByteString as BS | |
import Data.Monoid |