Skip to content

Instantly share code, notes, and snippets.

Michael Schröder mcschroeder

Block or report user

Report or block mcschroeder

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mcschroeder / Key.hs
Created Feb 10, 2016
Getting values out of types at runtime
View Key.hs
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Key (Key, makeKey) where
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import Data.Proxy
import GHC.TypeLits
mcschroeder /
Created Dec 12, 2015
Create virtual serial ports
if [ -z "$1" ]
echo "Usage: $0 name"
exit 1
View stm_finalizers.patch
From cd75ebc1752dd66dcc7fcaa9e1288fa5026873e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20Schr=C3=B6der?= <>
Date: Mon, 14 Mar 2016 13:29:10 +0100
Subject: [PATCH 1/2] Add STM finalizers
This introduces a new function
atomicallyWithIO :: STM a -> (a -> IO b) -> IO b
Like the existing atomically operation, atomicallyWithIO transforms a
mcschroeder / gist:8906117
Created Feb 9, 2014
Vigenère cipher cracker
View gist:8906117
-- I wrote this when I was just beginning to learn Haskell.
-- I recently found it again and wanted to preserve it.
-- It's probably terrible code. I haven't looked it over.
import Data.Char
import Data.List
import Data.Maybe
import Data.Function
You can’t perform that action at this time.