-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into forward-code
- Loading branch information
Showing
30 changed files
with
164 additions
and
60 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
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 |
---|---|---|
@@ -1,16 +1,28 @@ | ||
/- | ||
Copyright (c) 2021 Jannis Limperg. All rights reserved. | ||
Copyright (c) 2021-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.Meta | ||
|
||
namespace Aesop | ||
|
||
/-- Discrimination tree configuration used by all Aesop indices. -/ | ||
def discrTreeConfig : WhnfCoreConfig := { iota := false } | ||
open Lean Lean.Meta | ||
|
||
/-- 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
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
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
Oops, something went wrong.