Skip to content

Commit

Permalink
Tiny tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
effectfully committed May 11, 2021
1 parent a3c70e7 commit 30c76ae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion plutus-core/plutus-core/src/PlutusCore/Default/Universe.hs
Expand Up @@ -190,7 +190,6 @@ instance Closed DefaultUni where
, constr `Permits` (,)
)

-- TODO: optimize
-- See Note [Stable encoding of tags].
encodeUni DefaultUniInteger = [0]
encodeUni DefaultUniByteString = [1]
Expand Down
2 changes: 2 additions & 0 deletions plutus-core/plutus-core/src/PlutusCore/MkPlc.hs
Expand Up @@ -73,11 +73,13 @@ class TermLike term tyname name uni fun | term -> tyname name uni fun where
typeLet = mkImmediateTyAbs

-- TODO: make it @forall {k}@ once we have that.
-- (see https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0099-explicit-specificity.rst)
-- | Embed a type (given its explicit type tag) into a PLC type.
mkTyBuiltinOf :: forall k (a :: k) uni tyname ann. ann -> uni (T a) -> Type tyname uni ann
mkTyBuiltinOf ann = TyBuiltin ann . SomeTypeIn

-- TODO: make it @forall {k}@ once we have that.
-- (see https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0099-explicit-specificity.rst)
-- | Embed a type (provided it's in the universe) into a PLC type.
mkTyBuiltin
:: forall k (a :: k) uni tyname ann. uni `Contains` a
Expand Down
1 change: 1 addition & 0 deletions plutus-core/plutus-ir/src/PlutusIR/Parser.hs
Expand Up @@ -240,6 +240,7 @@ constant = do
-- We use 'match' for remembering the textual representation of the parsed type tag,
-- so that we can show it in the error message if the constant fails to parse.
(uniText, PLC.SomeTypeIn (PLC.Kinded uni)) <- match builtinTypeTag
-- See Note [Decoding universes].
case PLC.checkStar @uni uni of
Nothing -> customFailure $ BuiltinTypeNotAStar uniText
Just PLC.Refl -> do
Expand Down

0 comments on commit 30c76ae

Please sign in to comment.