feat: Condensed interface #85

Merged
aniva merged 27 commits from serial/expr into dev 2024-08-15 22:41:59 -07:00
2 changed files with 11 additions and 3 deletions
Showing only changes of commit 193d94e798 - Show all commits

View File

@ -17,6 +17,13 @@ def nameToStr (s: String) : Name := s.toName
@[export pantograph_name_is_inaccessible] @[export pantograph_name_is_inaccessible]
def isInaccessible (n: Name) : Bool := n.isInaccessibleUserName def isInaccessible (n: Name) : Bool := n.isInaccessibleUserName
@[export pantograph_mk_app_meta_m]
def mkAppM (constName : Name) (xs : Array Expr) : MetaM Expr := Meta.mkAppM constName xs
@[export pantograph_pp_expr]
def ppExpr (e: Expr) := Meta.ppExpr e
-- Mirrors Lean's LocalDecl -- Mirrors Lean's LocalDecl
structure LocalDecl where structure LocalDecl where
-- Default value is for testing -- Default value is for testing

View File

@ -78,9 +78,10 @@ def createCoreState (imports: Array String): IO Core.State := do
(trustLevel := 1) (trustLevel := 1)
return { env := env } return { env := env }
@[export pantograph_create_meta_context] @[export pantograph_meta_context]
def createMetaContext: IO Lean.Meta.Context := do def metaContext: Lean.Meta.Context := {}
return {} @[export pantograph_meta_state]
def metaState: Lean.Meta.State := {}
@[export pantograph_env_catalog_m] @[export pantograph_env_catalog_m]
def envCatalog: CoreM Protocol.EnvCatalogResult := def envCatalog: CoreM Protocol.EnvCatalogResult :=