Skip to content

Instantly share code, notes, and snippets.

View isovector's full-sized avatar

Sandy Maguire isovector

View GitHub Profile
{-# LANGUAGE LambdaCase #-}
module Simple.Plugin(plugin) where
import Coercion
import Control.Monad (guard, join)
import CoreMonad
import CoreSyn
import Data.Bifunctor (second)
import Data.Foldable (toList)
@isovector
isovector / gist:c45c85b5bb83e04e902a29c0fcb1fb76
Created May 27, 2018 09:47 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@isovector
isovector / hsvim.vim
Created April 8, 2018 12:22
haskell vim pragmas
Plug 'junegunn/vim-easy-align'
function! AddHsPragma()
" Add a new HS pragma, and sort the list so it's pretty
let pragma = input("LANGUAGE ")
normal! ms
if match(getline(1), "module") == 0
execute "normal! ggO\<ESC>"
endif
if pragma != ""
@isovector
isovector / coeffects.hs
Created March 19, 2018 18:28
shitty coeffects
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
------------------------------------------------------------------------------
-- | Magic (aka shitty) implementation of coeffects over standard Haskell arrow
-- types.
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
module Detergo where
import Control.Monad (when)
import Data.List (intercalate)
import Data.Maybe (listToMaybe)
data Level = Low | Medium | High
@isovector
isovector / leprc
Last active February 16, 2017 00:31
leprechaun
doom
@isovector
isovector / pascal.hs
Created January 8, 2017 00:14
pascal dot haskell
import Data.Semigroup
import Control.Comonad
import Control.Comonad.Store
pascalLine :: Store (Int, Int) Int -> Int
pascalLine w | x <= 0 = 1
| y <= 0 = 1
| otherwise = peek (x-1, y) w + peek (x, y-1) w
where
(x, y) = pos w
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
@isovector
isovector / cvim
Created September 23, 2016 18:09
map d closeTab
map <Enter> openCommandBar
map <C-A> incrementURLPath
map <C-X> decrementURLPath
map u lastClosedTab
unmap x
let barposition = "bottom"
let qmark g = ["http://github.com/isovector"]
let qmark m = ["http://gmail.com"]
let qmark b = ["http://goodreads.com"]
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE InstanceSigs #-}