Skip to content

Instantly share code, notes, and snippets.

call pathogen#infect()
call plug#begin('~/.vim/plugged')
Plug 'kana/vim-textobj-user'
Plug 'isovector/ghci.vim'
Plug 'michaeljsmith/vim-indent-object'
Plug 'junegunn/vim-easy-align'
Plug 'deris/vim-shot-f'
"Plug 'ap/vim-buftabline'
call pathogen#infect()
call plug#begin('~/.vim/plugged')
Plug 'kana/vim-textobj-user'
Plug 'isovector/ghci.vim'
Plug 'michaeljsmith/vim-indent-object'
Plug 'junegunn/vim-easy-align'
Plug 'deris/vim-shot-f'
"Plug 'ap/vim-buftabline'
@runarorama
runarorama / .vimrc
Created March 27, 2018 21:23
vimrc
call pathogen#infect()
call plug#begin('~/.vim/plugged')
Plug 'kana/vim-textobj-user'
Plug 'isovector/ghci.vim'
Plug 'michaeljsmith/vim-indent-object'
Plug 'junegunn/vim-easy-align'
Plug 'wellle/targets.vim'
Plug 'deris/vim-shot-f'
/tmp ❯❯❯ cat Test.scala
class Something {
lazy val foo = getFoo
def getFoo = "foo!"
}
/tmp ❯❯❯ scalac Test.scala
/tmp ❯❯❯ procyon-decompiler Something.class
import scala.runtime.BoxedUnit;
import scala.reflect.ScalaSignature;
scala> List(1,2,3).traverse(x => Tags.Multiplication(x))
ReplGlobal.abort: Something is wrong: cannot find Unify$1 in applied type scalaz.package.type
sought Unify$1 in package
classSym package in scalaz
tparams
error:
Something is wrong: cannot find Unify$1 in applied type scalaz.package.type
sought Unify$1 in package
classSym package in scalaz
[error]
[error] Something is wrong: cannot find Unify$5 in applied type scalaz.package.type
[error] sought Unify$5 in package
[error] classSym package in scalaz
[error] tparams
[error]
[error] while compiling: /Users/v644154/work/scalaz/example/src/main/scala/scalaz/example/TraverseUsage.scala
[error] during phase: typer
[error] library version: version 2.11.8-tl
[error] compiler version: version 2.11.8-tl
scala> funnel.Metric.periodicToMetric _
res0: funnel.Periodic[Nothing] => funnel.Metric[Nothing] = <function1>
scala> funnel.Metric.periodicToMetric _
<console>:11: error: value periodicToMetric is not a member of object funnel.Metric
funnel.Metric.periodicToMetric _
^
@runarorama
runarorama / adj.hs
Last active September 17, 2015 17:19
Forgetful/Cofree adjunction
leftAdjunct :: (Comonad f) => (forall b. f b -> g b) -> f a -> Cofree g a
leftAdjunct f z = extract z :< f (z =>> leftAdjunct f)
rightAdjunct :: (forall b. f b -> Cofree g b) -> f a -> g a
rightAdjunct = _
@runarorama
runarorama / adj.hs
Created September 17, 2015 17:18
Forgetful/Cofree adjunction
leftAdjunct :: (Comonad f) => (forall b. f b -> g b) -> f a -> Cofree g a
leftAdjunct f z = extract z :< f (z =>> leftAdjunct f)
rightAdjunct :: (forall b. f a -> Cofree g a) -> f b -> g b
rightAdjunct = _
@runarorama
runarorama / Adjunctions.scala
Last active December 2, 2019 19:58
Free/forgetful adjunctions
import scalaz._, Scalaz._
// Adjunction between `F` and `G` means there is an
// isomorphism between `A => G[B]` and `F[A] => B`.
trait Adjunction[F[_],G[_]] {
def leftAdjunct[A, B](a: A)(f: F[A] => B): G[B]
def rightAdjunct[A, B](a: F[A])(f: A => G[B]): B
}
// Adjunction between free and forgetful functor.