Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Universe Issues #12

Open
marcusrossel opened this issue Oct 27, 2023 · 0 comments
Open

Universe Issues #12

marcusrossel opened this issue Oct 27, 2023 · 0 comments

Comments

@marcusrossel
Copy link
Collaborator

Inspired by: 1:37:15 of https://www.youtube.com/watch?app=desktop&v=YKN3NLwW1MI
Also by: ~16:30 of https://www.youtube.com/watch?v=AWeT_G04a0A

Instead of encoding interfaces essentially as sigma types, try:

import Lean
open Lean

inductive Types
  | ofRcn1
  | ofInputPort3
  | ofStatVar9
  deriving BEq, Hashable

def Types.type
  | ofRcn1 => Bool
  | ofInputPort3 => String
  | ofStatVar9 => Nat

def Scheme := HashSet Types

#check Scheme

-- Then your runtime is essentially generic over such a `Types` type. 

structure RuntimeState (T : Type) (Ttyp : T → Type) where

#check RuntimeState

-- That is, what we've essentially achieved is to move all of the type info that was previously *inside* of a Scheme
-- into the type level. Before we didn't want to do that because it was essentially untenable, but as we've bundled
-- all of the type info into a single `Types` type it's actually feasible now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant