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
(add-hook 'interactive-haskell-mode-hook 'haskell-auto-reload-minor-mode) | |
(defvar haskell-auto-reload-every-n-sec 1 | |
"When non-nil, automatically reloads haskell buffers after Emacs has been idle for N seconds.") | |
(defvar haskell-reload-timer nil | |
"Variable used to store the idle timer.") | |
(define-minor-mode haskell-auto-reload-minor-mode | |
"Minor mode for automatically reloading interactive haskell buffers." |
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
(defgroup presenter nil | |
"Present source code in emacs.") | |
(defface presenter-slide-marker-face | |
'((t)) | |
"Highlight slide marker." | |
:group 'presenter) | |
(set-face-attribute 'presenter-slide-marker-face nil :height 1.0 :inherit 'font-lock-warning-face) |
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 TypeOperators #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE GADTs #-} | |
module HList where | |
-- statically bounded recursion, see the bottom of the file for results | |
data HList :: [*] -> * where | |
Nil :: HList '[] |
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 | |
lhs2TeX --newcode $2 > $4 |
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 MonoLocalBinds #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE DeriveAnyClass #-} | |
{-# LANGUAGE DuplicateRecordFields #-} | |
module MarkerClass where | |
import GHC.TypeLits -- for error messages |
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 CPP #-} | |
-- This defines the (/*) function in the presence of CPP | |
(//* */*) :: Int -> Int -> Int | |
(//* */*) = undefined |
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
let s:hlcounter = 1 | |
function! Highlight(word) | |
let id = 110 + s:hlcounter | |
exe 'hi Group' . id . ' ctermbg=' . (20 + id) . ' ctermfg=0' | |
silent! call matchdelete(id) | |
silent! call matchadd('Group' . id, '\<' . a:word . '\>', 100, id) | |
let s:hlcounter = s:hlcounter + 1 | |
endfunction |
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 TypeFamilies #-} | |
{-# LANGUAGE TypeInType, GADTs, TypeOperators #-} | |
module Lib where | |
import Data.Kind (Type) | |
data Cat (a :: ()) (b :: ()) where | |
MkCat :: Cat '() '() | |
class Category (k :: t -> t -> Type) where | |
identity :: k a 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
{-# LANGUAGE AllowAmbiguousTypes #-} | |
{-# LANGUAGE DefaultSignatures #-} | |
{-# LANGUAGE DeriveAnyClass #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE InstanceSigs #-} | |
{-# LANGUAGE KindSignatures #-} |
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 DataKinds #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE KindSignatures #-} | |
module Fold where | |
data Nat = Z | S Nat |
NewerOlder