Skip to content

Instantly share code, notes, and snippets.

@DarthFennec
DarthFennec / Brainfuck.hs
Created February 7, 2013 22:30
Felt like writing a bf interpreter. So yeah.
module Main (main) where
import System.Environment
data Tape a = T [a] a [a]
next :: (Enum a) => Tape a -> Tape a
next (T xs x []) = T (x : xs) (toEnum 0) []
next (T xs x (y:ys)) = T (x : xs) y ys
@DarthFennec
DarthFennec / XMobarHs.hs
Created January 13, 2013 07:29
A library which can be used to define an .xmobarrc configuration as a haskell object (with all the benefits of defining things in haskell) and export it to a config file to be used by xmobar.
module XMobarHs
( Config (..)
, Position (..)
, Align (..)
, Border (..)
, Command (..)
, Run (..)
, config
, export
) where