{-# OPTIONS_GHC -Wno-redundant-constraints #-}
module Lorentz.Print
( printLorentzValue
, printLorentzContract
) where
import Lorentz.Base
import Lorentz.Constraints
import Lorentz.Run
import Michelson.Printer (printTypedFullContract, printTypedValue)
import Michelson.Typed (toVal)
printLorentzValue
:: forall v.
(NicePrintedValue v)
=> Bool -> v -> LText
printLorentzValue forceSingleLine =
withDict (nicePrintedValueEvi @v) $
printTypedValue forceSingleLine . toVal
printLorentzContract
:: forall cp st.
(NiceParameterFull cp, NiceStorage st)
=> Bool -> Contract cp st -> LText
printLorentzContract forceSingleLine =
printTypedFullContract forceSingleLine . compileLorentzContract