This file contains 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 HSubst | |
%default total | |
infixr 0 >>> | |
data Ty = O | (>>>) Ty Ty | |
%name Ty a, b, c | |
namespace Ctx | |
data Ctx = Nil | (::) Ty Ctx |
This file contains 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
#[derive(Clone, Copy)] | |
struct Op(fn(u16, u16)); | |
// lets you call foo() instead of foo.0() (where foo: Op) | |
impl std::ops::Deref for Op { | |
type Target = fn(u16, u16); | |
fn deref(&self) -> &fn(u16, u16) { &self.0 } | |
} | |
fn op_mov(one: u16, two: u16) { |
OlderNewer