module Ledger.Conway.Foreign.HSLedger.Cert where

open import Ledger.Conway.Foreign.HSLedger.BaseTypes hiding (CertEnv; DCert) renaming (⟦_,_,_⟧ᶜˢ to ⟦_,_,_⟧ᶜˢ'; CertState to CertState')
open import Ledger.Conway.Foreign.HSLedger.Certs

open import Ledger.Conway.Conformance.Certs.Properties govStructure
  using ( Computational-CERT
        ; Computational-CERTS
        )

open import Ledger.Conway.Conformance.Certs govStructure

instance
  HsTy-CertState = autoHsType CertState  withConstructor "MkCertState"
  Conv-CertState = autoConvert CertState

  Conv-CertState-CertState' : Convertible CertState CertState'
  Conv-CertState-CertState' .to $\begin{pmatrix} \,\href{Ledger.Conway.Foreign.HSLedger.Cert.html#654}{\htmlId{654}{\htmlClass{Bound}{\text{dState}}}}\, \\ \,\href{Ledger.Conway.Foreign.HSLedger.Cert.html#663}{\htmlId{663}{\htmlClass{Bound}{\text{pState}}}}\, \\ \,\href{Ledger.Conway.Foreign.HSLedger.Cert.html#672}{\htmlId{672}{\htmlClass{Bound}{\text{gState}}}}\, \end{pmatrix}$    = $\begin{pmatrix} \,\href{Foreign.Convertible.html#149}{\htmlId{690}{\htmlClass{Field}{\text{to}}}}\, \,\href{Ledger.Conway.Foreign.HSLedger.Cert.html#654}{\htmlId{693}{\htmlClass{Bound}{\text{dState}}}}\, \\ \,\href{Ledger.Conway.Foreign.HSLedger.Cert.html#663}{\htmlId{702}{\htmlClass{Bound}{\text{pState}}}}\, \\ \,\href{Foreign.Convertible.html#149}{\htmlId{711}{\htmlClass{Field}{\text{to}}}}\, \,\href{Ledger.Conway.Foreign.HSLedger.Cert.html#672}{\htmlId{714}{\htmlClass{Bound}{\text{gState}}}}\, \end{pmatrix}$
  Conv-CertState-CertState' .from $\begin{pmatrix} \,\href{Ledger.Conway.Foreign.HSLedger.Cert.html#762}{\htmlId{762}{\htmlClass{Bound}{\text{dState}}}}\, \\ \,\href{Ledger.Conway.Foreign.HSLedger.Cert.html#771}{\htmlId{771}{\htmlClass{Bound}{\text{pState}}}}\, \\ \,\href{Ledger.Conway.Foreign.HSLedger.Cert.html#780}{\htmlId{780}{\htmlClass{Bound}{\text{gState}}}}\, \end{pmatrix}$ = $\begin{pmatrix} \,\href{Foreign.Convertible.html#170}{\htmlId{796}{\htmlClass{Field}{\text{from}}}}\, \,\href{Ledger.Conway.Foreign.HSLedger.Cert.html#762}{\htmlId{801}{\htmlClass{Bound}{\text{dState}}}}\, \\ \,\href{Ledger.Conway.Foreign.HSLedger.Cert.html#771}{\htmlId{810}{\htmlClass{Bound}{\text{pState}}}}\, \\ \,\href{Foreign.Convertible.html#170}{\htmlId{819}{\htmlClass{Field}{\text{from}}}}\, \,\href{Ledger.Conway.Foreign.HSLedger.Cert.html#780}{\htmlId{824}{\htmlClass{Bound}{\text{gState}}}}\, \end{pmatrix}$

certs-step : HsType (CertEnv  CertState  List DCert  ComputationResult String CertState)
certs-step = to (compute Computational-CERTS)

{-# COMPILE GHC certs-step as certsStep #-}

cert-step : HsType (CertEnv  CertState  DCert  ComputationResult String CertState)
cert-step = to (compute Computational-CERT)

{-# COMPILE GHC cert-step as certStep #-}