This PR refines and clarifies the `meta` phase distinction in the module system. * `meta import A` without `public` now has the clarified meaning of "enable compile-time evaluation of declarations in or above `A` in the current module, but not downstream". This is now checked statically by enforcing that public meta defs, which therefore may be referenced from outside, can only use public meta imports, and that global evaluating attributes such as `@[term_parser]` can only be applied to public meta defs. * `meta def`s may no longer reference non-meta defs even when in the same module. This clarifies the meta distinction as well as improves locality of (new) error messages. * parser references in `syntax` are now also properly tracked as meta references. * A `meta import` of an `import` now properly loads only the `.ir` of the nested module for the purposes of execution instead of also making its declarations available for general elaboration. * `initialize` is now no longer being run on import under the module system, which is now covered by `meta initialize`.
49 lines
1.3 KiB
Text
49 lines
1.3 KiB
Text
/-
|
|
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
Authors: Leonardo de Moura
|
|
-/
|
|
module
|
|
|
|
prelude
|
|
public import Init.Prelude
|
|
public import Init.Notation
|
|
public import Init.Tactics
|
|
public import Init.TacticsExtra
|
|
public import Init.ByCases
|
|
public import Init.RCases
|
|
public import Init.Core
|
|
public import Init.Control
|
|
public import Init.Data.Basic
|
|
public import Init.WF
|
|
public import Init.WFTactics
|
|
public import Init.Data
|
|
public import Init.System
|
|
public import Init.Util
|
|
public import Init.Dynamic
|
|
public import Init.ShareCommon
|
|
public import Init.MetaTypes
|
|
public import Init.Meta
|
|
public import Init.NotationExtra
|
|
public import Init.SimpLemmas
|
|
public import Init.PropLemmas
|
|
public import Init.Hints
|
|
public import Init.Conv
|
|
public import Init.Guard
|
|
public import Init.Simproc
|
|
public import Init.SizeOfLemmas
|
|
public import Init.BinderPredicates
|
|
public import Init.Ext
|
|
public import Init.Omega
|
|
public import Init.MacroTrace
|
|
public import Init.Grind
|
|
public import Init.GrindInstances
|
|
public import Init.While
|
|
public import Init.Syntax
|
|
public import Init.Internal
|
|
public import Init.Try
|
|
public meta import Init.Try -- make sure `Try.Config` can be evaluated anywhere
|
|
public import Init.BinderNameHint
|
|
public import Init.Task
|
|
public import Init.MethodSpecsSimp
|
|
public import Init.LawfulBEqTactics
|