Skip to content

Instantly share code, notes, and snippets.

View metaleap's full-sized avatar

Phil Schumann metaleap

View GitHub Profile
@metaleap
metaleap / borrow_inference.md
Created April 26, 2020 18:57 — forked from paniq/borrow_inference.md
Borrow Inference

Borrow Inference

by Leonard Ritter, Duangle GbR

This is a description of borrow inference, an alternative to borrow checking that requires no declarative annotations to support proper management of unique values and borrowed references at compile time.

We are trying to infer whether a value is borrowed or has to be unique, applying this constraint going backwards through the function, as we also need to prevent

@metaleap
metaleap / GhcSort.hs
Created February 15, 2017 23:42 — forked from ezyang/GhcSort.hs
A simple frontend plugin that prints all modules of a project in topological order
module GhcSort where
import GHC
import GhcPlugins
import DriverPhases
import Control.Monad
import Data.List
import Data.Maybe
import System.FilePath