Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement missing bits of PlutusIR API
- Loading branch information
Jakub Zalewski
committed
May 4, 2021
1 parent
b156dcd
commit 87be2de
Showing
6 changed files
with
106 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module PlutusIR.Subst | ||
( uniquesTerm | ||
, uniquesType | ||
) where | ||
|
||
import qualified PlutusCore.Core.Type as PLC | ||
import qualified PlutusCore.Name as PLC | ||
import PlutusCore.Subst (uniquesType) | ||
|
||
import PlutusIR.Core | ||
|
||
import Control.Lens | ||
import Data.Set as Set | ||
|
||
setOf :: Getting (Set a) s a -> s -> Set a | ||
setOf g = foldMapOf g singleton | ||
|
||
uniquesTerm | ||
:: PLC.HasUniques (Term tyname name uni fun ann) | ||
=> Term tyname name uni fun ann -> Set PLC.Unique | ||
uniquesTerm = setOf termUniquesDeep |
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