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 #-} | |
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 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 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 System.IO | |
import Network | |
import Minecraft | |
import Control.Monad | |
import Control.Monad.Fix | |
import Control.Monad.Trans | |
import Control.Monad.BinaryProtocol | |
import Control.Concurrent | |
import Control.Concurrent.STM | |
import Control.Concurrent.STM.TChan |
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 Jade where | |
import Text.Parsec | |
import qualified Text.Parsec.Token as L | |
import Text.Parsec.Language (emptyDef) | |
import Text.Parsec.Text (Parser) | |
import Data.Text (Text) | |
import Control.Monad (mzero) | |
import Control.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
(☃) :: Int -> Int -> Int | |
x ☃ y = x + y | |
main = print $ 0 ☃ 1 ☃ 2 |
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 runghc | |
module Main where | |
{- | |
Uninstall.hs - a Haskell uninstaller for Mac OS X | |
This program is really far too big to be in a single file. However, I | |
wanted it to be easily distributable and runnable, and so have kept it all | |
together. |
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.Concurrent | |
import Control.Concurrent.Async | |
import Control.Applicative | |
import Control.Monad | |
import Data.Traversable | |
newtype Concurrently a = Concurrently { runConcurrently :: IO a } | |
instance Functor Concurrently where |
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 ImplicitParams, ParallelListComp,MonadComprehensions #-} | |
import Control.Monad | |
import Control.Monad.Fix | |
import Control.Monad.Zip | |
import Control.Applicative | |
import Control.Concurrent | |
import Control.Concurrent.MVar | |
import Control.Exception | |
import Prelude -- hiding (catch) | |
import Data.IORef |
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 HTML where | |
class Tag a where | |
toHTML :: a -> String | |
data Attribute = Attribute { | |
key :: String, | |
value :: String | |
} deriving Show |
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
countPackets p = | |
let v = AL.parse (CA.many packetValue) p | |
r = fromMaybe [] $ AL.maybeResult v | |
in r |
OlderNewer