Skip to content

Instantly share code, notes, and snippets.

@neko-kai
neko-kai / quantified.scala
Last active April 2, 2019 13:53
Tagless final for ZIO via quantified constraints
package quantified
import cats.Monad
import scala.language.implicitConversions
/**
* C[_] constraint applied to type F[_, _] quantified in first parameter, i.e.
*
* {{{
new oq, qr, n, req. (Init[oq, req] | S[oq, qr] | I[qr, n] | F[n])
S[oq, qr] := oq(req).new query.S_query[qr, query]
S_query[qr, query] := qr<query>.S[qr, qr]
I[qr, n] := qr(query).new response.I_notice[qr, n, response]
I_notice[qr, n, response] := n<response>.I_respond[qr, n, response]
I_respond[qr, n, resp] := qr<resp>.I[qr, n]
F[n] := n(resp).F_recv[n]
F_recv[n] := τ.F[n]
Init[qr, req] := qr<req>
@ouatu-ro
ouatu-ro / typing-site-redirector.user.js
Last active April 26, 2026 15:20
Typing Site Redirector (TypeLit Focus Mode)
// ==UserScript==
// @name Typing Site Redirector (TypeLit Focus Mode)
// @namespace gobdovan
// @version 2.1
// @description Saves your last non-root TypeLit page and redirects you there if you open time-wasting typing sites
// @match *://*.typeracer.com/*
// @match *://typeracer.com/*
// @match *://*.monkeytype.com/*
// @match *://monkeytype.com/*
// @match *://*.10fastfingers.com/*