hexresearch / hschain-utxo

UTXO-based contracts for hschain
0 stars 0 forks source link

Generate names for variables in pretty-printer #213

Closed Shimuuar closed 3 years ago

Shimuuar commented 3 years ago

Pretty-printer internal become monadic since we have to thread state for generator of variable names

let a = \ (b :: Int) (c :: Int) -> b@1
    d = \ (e :: Int) (f :: Int -> Int) -> e@1
    g = \ (h :: Int -> (Int -> Int) -> Int) (i :: Int -> Int -> Int)
          (j :: Int) -> h@2 j@0 (i@1 j@0)
  in g@0 d@1 a@2 3