This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Data.Text as Text | |
suffixToSubscript :: Text -> Text | |
suffixToSubscript t = case spanEnd isDigit t of | |
("", _) -> t | |
(_, "") -> t | |
(t1, s) -> t1 <> Text.map toSubscript s | |
toSubscript :: Char -> Char | |
toSubscript c = if isDigit c then chr (ord c + 8272) else c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z "$1" ] | |
then | |
echo "Usage: $0 name" | |
exit 1 | |
fi | |
MASTER=$1 | |
SLAVE=$1_virt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From cd75ebc1752dd66dcc7fcaa9e1288fa5026873e7 Mon Sep 17 00:00:00 2001 | |
From: =?UTF-8?q?Michael=20Schr=C3=B6der?= <mc.schroeder@gmail.com> | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- DISCLAIMER: | |
-- 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 |