-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
73 additions
and
15 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/- | ||
Copyright (c) 2024 Jannis Limperg. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Jannis Limperg | ||
-/ | ||
|
||
import Lean | ||
|
||
open Lean Lean.Meta | ||
|
||
namespace Aesop | ||
|
||
/-- The configuration used by all Aesop indices. -/ | ||
-- I don't really know what I'm doing here. I'm just copying the config used | ||
-- by `simp`; see `Meta/Simp/Types.lean:mkIndexConfig`. | ||
def indexConfig : ConfigWithKey := | ||
({ proj := .no, transparency := .reducible : Config }).toConfigWithKey | ||
|
||
def mkDiscrTreePath (e : Expr) : MetaM (Array DiscrTree.Key) := | ||
withConfigWithKey indexConfig $ DiscrTree.mkPath e | ||
|
||
def getUnify (t : DiscrTree α) (e : Expr) : MetaM (Array α) := | ||
withConfigWithKey indexConfig $ t.getUnify e | ||
|
||
def getMatch (t : DiscrTree α) (e : Expr) : MetaM (Array α) := | ||
withConfigWithKey indexConfig $ t.getMatch e | ||
|
||
end Aesop |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/- | ||
Copyright (c) 2024 Jannis Limperg. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Jannis Limperg | ||
-/ | ||
|
||
import Lean | ||
|
||
open Lean Lean.Meta | ||
|
||
namespace Aesop | ||
|
||
/-- The configuration used by all Aesop indices. -/ | ||
-- I don't really know what I'm doing here. I'm just copying the config used | ||
-- by `simp`; see `Meta/Simp/Types.lean:mkIndexConfig`. | ||
def indexConfig : ConfigWithKey := | ||
({ proj := .no, transparency := .reducible : Config }).toConfigWithKey | ||
|
||
def mkDiscrTreePath (e : Expr) : MetaM (Array DiscrTree.Key) := | ||
withConfigWithKey indexConfig $ DiscrTree.mkPath e | ||
|
||
def getUnify (t : DiscrTree α) (e : Expr) : MetaM (Array α) := | ||
withConfigWithKey indexConfig $ t.getUnify e | ||
|
||
def getMatch (t : DiscrTree α) (e : Expr) : MetaM (Array α) := | ||
withConfigWithKey indexConfig $ t.getMatch e | ||
|
||
end Aesop |
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
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
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
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