{-# LANGUAGE Rank2Types #-}
type List a = forall r. r -> (a -> r -> r) -> r
nil :: List a
This file contains hidden or 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 GADTs #-} | |
import Control.Monad.Operational | |
data IStateIO s a where | |
Get :: IStateIO s s | |
Put :: s -> IStateIO s () | |
LiftIO :: IO a -> IStateIO s a | |
get' = singleton Get |
This file contains hidden or 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 Data.Functor.Identity | |
import Control.Monad.State | |
import Data.List | |
import System.Random | |
type Info = String | |
data Term = Var Info Int Int | |
| Abs Info String Term | |
| App Info Term Term |
This file contains hidden or 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 Data.Monoid | |
main = do | |
let adde :: Monoid m => m -> m | |
adde = mappend mempty | |
print $ adde "aaa" | |
print $ adde (Sum 1) |
##Mathematics
- Toen Bertrand/Lectures on DG-categories
- Allen Hatcher/Algebraic Topology
- P.G. Goerss and J.F. Jardine/Simplicial Homotopy Theory
- Jacob Lurie/Higher Topos Theory
- Mark Hovey/Model categories
- G.M. Kelly/Basic Concepts of Enriched Category Theory
This file contains hidden or 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
[alias] | |
graph = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
[user] | |
name = Tatsuya Hirose | |
email = [email protected] |
This file contains hidden or 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
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
set ruler | |
set number | |
set tabstop=4 | |
set autoindent | |
set expandtab |
This file contains hidden or 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
alias ll='ls -l' | |
alias rm='rmtrash' | |
alias ga='git add' | |
alias gb='git branch' | |
alias gc='git commit' | |
alias gch='git checkout' | |
alias gd='git diff' | |
alias gf='git fetch' | |
alias gg='git graph' |
This file contains hidden or 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 OverloadedStrings #-} | |
import Control.Lens | |
import Data.Foldable | |
import Network.Wreq | |
import Text.Taggy.Lens | |
import Data.Text.Lazy.Encoding | |
import Data.Maybe | |
main = do |