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 BangPatterns #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
module Tabulata | |
( -- * Types | |
Fields | |
, Range |
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 #-} | |
{-# LANGUAGE LambdaCase #-} | |
module Freegram where | |
import Bnf | |
import Parser | |
import Control.Applicative.Free.Final | |
import Data.Maybe (catMaybes) |
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
-- I haven't been able to actually run the program (broken archlinux packages), but it typechecks | |
open import Data.String | |
open import Function | |
open import IO.Primitive | |
Either : Set → Set → Set₁ | |
Either l r = {a : Set} → (l → a) → (r → a) → a | |
Left : { l r : Set } → l → Either l r |
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
/* | |
* AST definition | |
*/ | |
:- op(100, fx , (:)). | |
:- op(200, yfx, ($)). | |
:- op(300, xfy, (->)). | |
isName(N) :- N =.. [_]. |
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 BangPatterns #-} | |
module Iota | |
( Expr(..) | |
, run | |
) where | |
import Prelude hiding (succ) | |
import Control.Monad (void) | |
import Data.Char (chr, ord) |
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 java.io.*; | |
import java.util.function.*; | |
@FunctionalInterface | |
public interface F { | |
F $(F α); | |
default Object μ() { | |
return null; | |
} |
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
module Typeclass | |
type __<'f, 'a> = interface end | |
// __<fμ, 'a> -> f<'a> | |
let inline ω (x: __<'f, 'a>) = (^f: (static member ω : __<'f, 'a> -> 'b) x) | |
// f<'a> -> __<fμ, 'a> | |
let inline μ (x: 'a) = (x :> __<'f, 'b>) |
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
// ==UserScript== | |
// @name Pesky MSDN translations ! | |
// @namespace http://madidier.github.com/ | |
// @version 0.2 | |
// @description Disable translations on MSDN and other MS documentation sites. | |
// @author Maxime A. Didier | |
// @match https://*.microsoft.com/fr-fr/* | |
// @grant none | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name BlueBird Necromancer | |
// @namespace https://twitter.com/madidier_ | |
// @version 0.1 | |
// @description Bring back the blue bird from the dead! | |
// @author @madidier_ | |
// @match https://twitter.com/* | |
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJkSURBVHgB7VZBbtpQEH3zIW0WVYuXVaH4Bs0NSk4AOUFhEarskhMknIDsqkKlcIT0BNAT1D1B3ZJK3dmVuirwp/MhVmzAxiagKBJv9+ePZ97M/JkxsMMODwzChlD84FWQp3MxeCDHAhiumB+MJrr1+8Ryw3p/9+H4DctfIPCq49Xlw8Kv99YlMuB19885gy/i7llziwGfFFWJyR02XzSCuwiBUse7BlFVaz5LS8KQVkRXaXRJsqImfDjKSZBNyzEyFWFKVJ4KFbWLElUao6KbSk8i9TXgTPaorxTskPwOxa7/9baGt4zg8oQbNyfWYJlRU0/KUx9ZwNwYNq1ecFRzl18QpW0bB0Ks//KjV1uwlbuLJA3GxEdh5wb5yGEPl3qMd2xecYQHKnlFlVLX95kxYCFKGg5IlU2a0uLpCM68LEJA+sJ/Dm6Jy3aMjQIRakRUm+UuvfOp/X34iQSejeFo0Hdx4optG5uFH/R+GHNvANcm3VtwLs+Lvy2TRwhIOnrYHhysIuDKcCDwGbYAjglOzQt+HssElF6dvoNNOZeuCSbfSgIGMjILMo4/ExZf7TqghNLmlwm1gpSC2tmaLAZMvWGz0Iu7XpqBm2NrQNN5cD+Y5 |
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
const unindent = (strings, ...values) => { | |
// Quick and not so dirty unindented template strings. | |
// Handles tabs very roughly if they are present. | |
// The very first line is always left as is if not entirely whitespace, | |
// and removed otherwise. | |
const matchLine = line => { | |
const {groups} = | |
/^(?<line>(?<indent>[\t ]*)(?<nonws>[^\n]*)\n?)(?<tail>.*)$/s.exec(line); | |
return { |
OlderNewer