Skip to content

Instantly share code, notes, and snippets.

View cbarrett's full-sized avatar
🏴
Revolting

Colin Barrett cbarrett

🏴
Revolting
View GitHub Profile
@cbarrett
cbarrett / Lich.hs
Created October 10, 2012 18:22 — forked from patrickt/Lich.hs
Simple Lich parsing and encoding in Haskell
import Control.Applicative
import Control.Monad
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as C
import Data.Map (Map)
import qualified Data.Map as M
import Text.Parsec hiding ((<|>), many)
import Text.PrettyPrint.HughesPJ ((<>), brackets, text, braces, hsep)
import qualified Text.PrettyPrint.HughesPJ as P