Skip to content

Instantly share code, notes, and snippets.

View bradclawsie's full-sized avatar

Brad Clawsie bradclawsie

View GitHub Profile
module Main where
import Data.Bits
{- Note that, once completely reduced according to the rules,
- the string will be homogeneous. If it did contain two different
- characters, there would be a place where two touched, and
- they could be reduced.
-
- In fact, the order in which the reductions are done doesn't really matter,
@snoyberg
snoyberg / proxy.hs
Created June 28, 2012 12:10
Conduit proxy server
{-# LANGUAGE OverloadedStrings #-}
import Data.Conduit
import Data.Conduit.Network
import Data.Conduit.Text (encode, decode, utf8)
import qualified Data.Conduit.List as CL
import qualified Data.Conduit.Binary as CB
import Data.Text (toUpper)
import qualified Data.ByteString.Char8 as S8