File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
plutus-metatheory/src/FFI Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -43,22 +43,22 @@ conv (Force _ t) = UForce (conv t)
4343conv (Constr _ i es) = UConstr (toInteger i) (toList (fmap conv es))
4444conv (Case _ arg cs) = UCase (conv arg) (toList (fmap conv cs))
4545
46- tmnames :: String
47- tmnames = [ ' a ' .. ' z ' ]
46+ tmname :: Int -> String
47+ tmname i = ' x ' : show i
4848
4949uconv :: Int -> UTerm -> Term NamedDeBruijn DefaultUni DefaultFun ()
5050uconv i (UVar x) =
5151 Var
5252 ()
5353 ( NamedDeBruijn
54- (T. pack [tmnames !! (i - 1 - fromInteger x)] )
54+ (T. pack (tmname (i - 1 - fromInteger x)) )
5555 -- PLC's debruijn starts counting from 1, while in the metatheory it starts from 0.
5656 (Index (fromInteger x + 1 ))
5757 )
5858uconv i (ULambda t) =
5959 LamAbs
6060 ()
61- (NamedDeBruijn (T. pack [tmnames !! i] ) deBruijnInitIndex)
61+ (NamedDeBruijn (T. pack (tmname i) ) deBruijnInitIndex)
6262 (uconv (i + 1 ) t)
6363uconv i (UApp t u) = Apply () (uconv i t) (uconv i u)
6464uconv _ (UCon c) = Constant () c
You can’t perform that action at this time.
0 commit comments