Skip to content

Instantly share code, notes, and snippets.

(global-set-key (kbd "s-k") 'point-to-register)
(global-set-key (kbd "s-j") 'jump-to-register)
#!/usr/bin/env bash
set -e
function prompt() {
B="$1"
read -p 'Delete? [y/n/s] ' result
case "$result" in
y)
import re
from ctypes import c_long, CFUNCTYPE
import llvmlite.binding as llvm
from llvmlite import ir
llvm.initialize()
llvm.initialize_native_target()
llvm.initialize_native_asmprinter()
import Control.Monad (foldM)
import Control.Monad.State (StateT, modify, get, put, lift, evalStateT)
import Data.Map (Map)
import qualified Data.Map as Map
data KindExpr
= TCon String
| TVar String
| TAp KindExpr KindExpr
deriving (Show)
import System.IO (hFlush, stdout)
main :: IO ()
main = do
putStr "enter a number> "
hFlush stdout
line <- getLine
runNested (read line) True
-- a will be the type Bool wrapped in a List n times by the end
import Data.Functor.Identity
import Text.Parsec
import Text.Parsec.Indent
example1 = "asdf(1 2 3):\n foo\n x:\n y\n z:\n q\n a"
-- Data structures
data Tree = Node [Value] [Tree]
import Data.List (sort, permutations, elemIndex)
data Card = Card Suit Int
deriving (Show, Eq, Ord)
data Suit = Spades | Clubs | Hearts | Diamonds
deriving (Show, Eq, Ord)
suits = [Spades, Clubs, Hearts, Diamonds]
-- I have made minor changes to the file below to make it compile
-- with GHC 8.0
-----------------------------------------------------------------------------
-- Thih: Typing Haskell in Haskell, main program
{-# LANGUAGE DeriveFunctor #-}
-- This needs the 'free' package installed in order to build
import Control.Monad (when)
import Control.Monad.Free (Free (..))
import System.IO (hFlush, stdout)
main :: IO ()
main = runIOOp exampleProgram
;;; rdarkmod-theme.el --- Theme
;; Copyright (C) 2016 , Jeremy M
;; Author: Jeremy M
;; Version: 0.1
;; Package-Requires: ((emacs "24"))
;; Created with ThemeCreator, https://github.com/mswift42/themecreator.