Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PlutusTx] [Builtins] Split 'FromBuiltin' and 'ToBuiltin' #5971

Prev Previous commit
Next Next commit
Polishing
  • Loading branch information
effectfully committed May 13, 2024
commit 6e329d685ea4bdabdc28429c2ad5343171367eda

This file was deleted.

4 changes: 2 additions & 2 deletions plutus-tx/src/PlutusTx/Builtins/HasOpaque.hs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ instance HasToOpaque [BuiltinData] (BuiltinList BuiltinData) where
goList :: [BuiltinData] -> BuiltinList BuiltinData
goList [] = mkNilData unitval
goList (d:ds) = mkCons (toOpaque d) (goList ds)
{-# INLINE toOpaque #-}
{-# INLINABLE toOpaque #-}
instance
HasToOpaque
[(BuiltinData, BuiltinData)]
Expand All @@ -208,7 +208,7 @@ instance
goList :: [(BuiltinData, BuiltinData)] -> BuiltinList (BuiltinPair BuiltinData BuiltinData)
goList [] = mkNilPairData unitval
goList (d:ds) = mkCons (toOpaque d) (goList ds)
{-# INLINE toOpaque #-}
{-# INLINABLE toOpaque #-}
instance HasFromOpaque arep a => HasFromOpaque (BuiltinList arep) [a] where
fromOpaque = go
where
Expand Down
2 changes: 1 addition & 1 deletion plutus-tx/src/PlutusTx/Lift/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ instance uni `PLC.HasTypeLevel` Data => Typeable uni BuiltinData where

-- See Note [Lift and Typeable instances for builtins]
instance uni `PLC.HasTermLevel` Data => Lift uni BuiltinData where
lift = liftBuiltin . builtinDataToData
lift = liftBuiltin . fromBuiltin

-- See Note [Lift and Typeable instances for builtins]
instance uni `PLC.HasTypeLevel` PlutusCore.Crypto.BLS12_381.G1.Element =>
Expand Down