Skip to content

Instantly share code, notes, and snippets.

@bartavelle
bartavelle / keybase.md
Created May 23, 2019 16:36
keybase.md

Keybase proof

I hereby claim:

  • I am bartavelle on github.
  • I am bartavelle (https://keybase.io/bartavelle) on keybase.
  • I have a public key whose fingerprint is 226E C60D 353D 2535 09D5 8DF7 301C 82F3 F499 C0F8

To claim this, I am signing this object:

module Main where
import qualified Data.Set as S
import qualified Data.Map.Strict as M
import Data.Semigroup
import Control.Monad
data Piece
= Rook
| Bishop
@bartavelle
bartavelle / Xml.hs
Created June 4, 2018 07:06
A paserc wrapper over expat
module Data.Parsers.Xml
( Parser
, ParserT
, xmldeclaration
, startelement
, endelement
, element
, element_
, lx
, extractParameter
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
@bartavelle
bartavelle / Bitfinex.hs
Created February 7, 2017 10:12
Financial exchange bis
module Bitfinex where
import Lib
type BitfinexExchange = Exchange
type LevelCount = Int
data BitfinexBookMessage = BitfinexBookMessage { getTime :: Time
, getExchange :: BitfinexExchange
, getBookMessage :: BookMessage
@bartavelle
bartavelle / calculator
Created May 22, 2014 18:51
calculator
module Main where
import Text.Parsec.String (Parser)
import Text.Parsec.Prim (parse)
import Text.Parser.Expression
import Text.Parser.Token
import Control.Applicative
import Control.Monad
data Expr = Add Expr Expr