Skip to content
Snippets Groups Projects
Commit 6bfbe20d authored by Nicolas Voirol's avatar Nicolas Voirol
Browse files

Moved the Identifier alias to the root package

parent fecfef7f
No related branches found
No related tags found
No related merge requests found
...@@ -15,21 +15,6 @@ trait Trees ...@@ -15,21 +15,6 @@ trait Trees
with Printers with Printers
with TreeOps { with TreeOps {
/** We provide aliases to [[ast.Identifier]] and [[ast.FreshIdentifier]] here in
* order for {{{import trees._}}} to also provide these. Note that this DOES NOT
* mean that [[Identifier]] or [[FreshIdentifier]] become dependent types!!
*
* I (@nv) feel it makes sense for all types necessary for expression/tree
* construction to be available from a single import. It would be rather
* counter-intuitive for an Inox user to have to go in search of the
* [[ast.Identifier]] type in the [[ast]] package when all other expression and
* definitions have been imported.
*/
type Identifier = ast.Identifier
/** @see [[Identifier]] for a discussion about why this is here. */
val FreshIdentifier = ast.FreshIdentifier
class Unsupported(t: Tree, msg: String)(implicit ctx: Context) class Unsupported(t: Tree, msg: String)(implicit ctx: Context)
extends Exception(s"${t.asString(PrinterOptions.fromContext(ctx))}@${t.getPos} $msg") extends Exception(s"${t.asString(PrinterOptions.fromContext(ctx))}@${t.getPos} $msg")
......
/* Copyright 2009-2016 EPFL, Lausanne */ /* Copyright 2009-2016 EPFL, Lausanne */
import inox.ast.Identifier
/** Core package of the Inox solving interface /** Core package of the Inox solving interface
* *
* == Structure == * == Structure ==
...@@ -23,6 +21,18 @@ package object inox { ...@@ -23,6 +21,18 @@ package object inox {
case class FatalError(msg: String) extends Exception(msg) case class FatalError(msg: String) extends Exception(msg)
/** We provide aliases to [[ast.Identifier]] and [[ast.FreshIdentifier]] here
* for a more natural import experience.
*
* Indeed, as Inox typically follows a pattern of nesting package clauses with
* the outer-most being {{{package inox}}}, including these basic definitions
* in the default imports makes my (@nv) life easier.
*/
type Identifier = ast.Identifier
/** @see [[Identifier]] for why this is here */
val FreshIdentifier = ast.FreshIdentifier
type InoxProgram = Program { val trees: inox.trees.type } type InoxProgram = Program { val trees: inox.trees.type }
object InoxProgram { object InoxProgram {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment