Skip to content

Instantly share code, notes, and snippets.


Tom therewillbecode

  • Edinburgh, UK
View GitHub Profile
View machines.hs
module Main where
import Lib
import Data.Char
import Data.Machine
-- newtype CurrPlayerToAct = CurrPlayerToAct String deriving (Eq, Show, Ord)
View todo.hs
data User = User { email :: Text }
newtype TodoList = TodoList ([UTCTime, Map TodoId Todo])
newtype UserLists = UserLists (Map Email [TodoList])
newtype TodoId = TodoId Int
data Todo = Todo
{ description :: Description,

Number theory

Primes are the atoms of the integers.

Fundamental theorem of arithmetic

Absolute values and inequalities

Remember to flip inequalities when taking the reciprocal of both sides or multiplying/diving both sides by a negative.

therewillbecode /
Last active Apr 25, 2020
Exceptions in Haskell Notes


All code that runs in IO can experience exceptions of any type.

Remember you can only catch an exception in IO. But it is possible to throw exceptions from pure code. An example of this is error.

Throw doesn't throw until forced

Due to laziness the order of evaluation of expressions can be modified by the compiler. This means that throw can return an

View gist:736efa318fb6874956e92cbc87c32483
Code by Petzold
Ben Eater 6502 breadboard project
Computerphile how memory works
View gist:fea4a5c2437ea5b15018c4860cf5ba07
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Socket.Table where
import Control.Concurrent hiding ( yield )
import Control.Concurrent.Async
import Control.Concurrent.STM
import qualified Data.Map.Lazy as M
import Database.Persist.Postgresql
import qualified Network.WebSockets as WS


minibuffer helm mini (launche buffers open and recentfiles

spc b b

move buffer to window n

spc b [n]

erase buffer

spc b e