-
Notifications
You must be signed in to change notification settings - Fork 482
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
1 parent
8a02b66
commit 5795d11
Showing
4 changed files
with
64 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{-# LANGUAGE FlexibleInstances #-} | ||
{-# LANGUAGE MultiParamTypeClasses #-} | ||
{-# LANGUAGE QuantifiedConstraints #-} | ||
{-# LANGUAGE StandaloneKindSignatures #-} | ||
{-# LANGUAGE TypeOperators #-} | ||
{-# LANGUAGE UndecidableInstances #-} | ||
{-# LANGUAGE UndecidableSuperClasses #-} | ||
|
||
module PlutusTx.Lift.TestInstances () where | ||
|
||
import PlutusCore qualified as PLC | ||
import PlutusCore.Builtin qualified as PLC | ||
import PlutusTx.Builtins.IsBuiltin | ||
import PlutusTx.Lift.Class | ||
|
||
import Data.Kind qualified as GHC | ||
|
||
type BuiltinSatisfies | ||
:: (GHC.Type -> GHC.Constraint) | ||
-> (GHC.Type -> GHC.Constraint) | ||
-> GHC.Type | ||
-> GHC.Constraint | ||
class (pre (ToBuiltin a) => post (ToBuiltin a)) => BuiltinSatisfies pre post a | ||
instance (pre (ToBuiltin a) => post (ToBuiltin a)) => BuiltinSatisfies pre post a | ||
|
||
type AllBuiltinsSatisfy | ||
:: (GHC.Type -> GHC.Constraint) | ||
-> (GHC.Type -> GHC.Constraint) | ||
-> GHC.Constraint | ||
class PLC.DefaultUni `PLC.Everywhere` BuiltinSatisfies pre post => AllBuiltinsSatisfy pre post | ||
|
||
instance AllBuiltinsSatisfy | ||
(PLC.AllBuiltinArgs PLC.DefaultUni (Typeable PLC.DefaultUni)) | ||
(Typeable PLC.DefaultUni) | ||
instance AllBuiltinsSatisfy | ||
(PLC.AllBuiltinArgs PLC.DefaultUni HasFromBuiltin) | ||
(Lift PLC.DefaultUni) |