logo
Formal Ledger Specification
Cert
Initializing search
    GitHub
    • Home
    • Preliminaries
    • Core
    • Conway
    • Dijkstra
    • Appendix
    GitHub
    • Home
      • Introduction
      • Notation
      • Earlier Eras
      • Introduction
        • Address
        • Crypto
        • Epoch
        • ProtocolVersion
      • Introduction
        • Abstract
        • BlockBody
          • Properties
            • Computational
        • Certs
          • Properties
            • Computational
            • PoV
            • PoVLemmas
            • VoteDelegsVDeleg
        • Chain
          • Properties
            • Computational
            • CredDepsEqualDomRwds
            • EpochStep
            • GovDepsMatch
            • PParamsWellFormed
        • Enact
          • Properties
            • Computational
        • Epoch
          • Properties
            • Computational
            • ConstRwds
            • ExpiredDReps
            • GovDepsMatch
            • NoPropSameDReps
        • Fees
        • Gov
          • Base
          • Actions
          • Properties
            • Computational
            • ChangePPGroup
        • Ledger
          • Properties
            • Base
            • Computational
            • GovDepsMatch
            • PoV
        • PoolReap
            • Computational
        • PParams
        • Properties
        • Ratify
          • Properties
            • Computational
        • Rewards
          • Properties
            • Computational
        • RewardUpdate
          • Properties
            • Computational
        • Script
          • Base
          • ScriptPurpose
          • Timelock
          • Validation
          • Base
          • Coin
          • ValueSet
          • ValueVector
        • Transaction
        • Utxo
          • Properties
            • Base
            • Computational
            • GenMinspend
            • MinSpend
            • PoV
        • Utxow
          • Properties
            • Computational
          • GovStructure
      • Introduction
      • Abstract
      • BlockBody
        • Properties
          • Computational
      • Certs
        • Properties
          • Computational
      • Chain
        • Properties
          • Computational
      • Enact
        • Properties
          • Computational
      • Epoch
        • Properties
          • Computational
      • Fees
      • Gov
        • Actions
        • Base
        • Properties
          • Computational
      • Ledger
        • Properties
          • Computational
      • PoolReap
        • Properties
          • Computational
      • PParams
      • Ratify
        • Properties
          • Computational
      • Rewards
        • Properties
          • Computational
      • RewardUpdate
        • Properties
          • Computational
      • Script
        • Base
        • ScriptPurpose
        • Validation
      • TokenAlgebra
      • Transaction
      • Utxo
        • Properties
          • Computational
      • Utxow
        • Properties
          • Computational
        • Definitions
        • Essential Agda
          • Bootstrapping Governance
          • Bootstrapping EnactState
        • Prelude
        • Ledger
        • Ledger.Core
          • Foreign
            • Address
            • Crypto
              • Base
              • Structure
            • Epoch
            • ExternalFunctions
        • Ledger.Prelude
          • Base
            • HSTypes
            • Util
          • HasCoin
          • Instances
          • Numeric
            • PositiveNat
            • UnitInterval
          • STS
          • ComputationalRelation
          • TypeClasses
            • TypeClasses
            • HasSubset
            • HasSubtract
              • Instance
          • Convertible
            • Deriving
            • DerivingTest
          • HaskellTypes
            • Deriving
        • MyDebugOptions
          • Ledger.Dijkstra
            • Foreign
              • Account
              • Cert
              • Certs
              • Chain
              • Enact
              • Epoch
              • ExternalStructures
              • Gov
                • Core
                • Actions
              • HSStructures
              • Ledger
              • NewEpoch
              • PParams
              • Ratify
              • Rewards
              • Script
                • Base
                • Structure
              • Transaction
              • Utxo
          • Ledger.PreConway
              • NewPP
                • Properties
              • PPUp
                • Properties
            • NewPP
              • Properties
            • PPUp
              • Properties
          • Ledger.Conway
            • Foreign
              • HSStructures
              • Cert
              • Certs
              • Chain
              • Enact
              • Epoch
              • ExternalStructures
              • Gov
                • Core
                • Actions
              • Ledger
              • NewEpoch
              • PParams
              • Ratify
              • Rewards
              • Transaction
              • Script
                • Base
                • Structure
              • Utxo
          • Conformance
            • Certs
              • Properties
            • Epoch
              • Properties
            • Equivalence
              • Bisimilarity
              • Certs
              • Convert
              • Deposits
              • Map
              • Utxo
            • Gov
            • Ledger
              • Properties
            • Properties
            • Rewards
            • Utxo
              • Properties
            • Utxow
              • Properties

    Cert

    module Ledger.Dijkstra.Foreign.Cert where
    
    open import Foreign.Convertible
    open import Foreign.Convertible.Deriving
    open import Foreign.HaskellTypes
    open import Foreign.HaskellTypes.Deriving
    
    open import Ledger.Prelude
    open import Ledger.Prelude.Foreign.HSTypes
    
    open import Ledger.Dijkstra.Foreign.HSStructures
    open import Ledger.Dijkstra.Foreign.Certs public
    open import Ledger.Dijkstra.Specification.Certs.Properties.Computational DummyGovStructure
      using ( Computational-CERT
            ; Computational-CERTS
            )
    
    open Computational
    
    instance
      HsTy-CertState = autoHsType CertState ⊣ withConstructor "MkCertState"
      Conv-CertState = autoConvert CertState
    
    cert-step : HsType (CertEnv → CertState → DCert → ComputationResult String CertState)
    cert-step = to (compute Computational-CERT)
    
    {-# COMPILE GHC cert-step as certStep #-}
    
    certs-step : HsType (CertEnv → CertState → List DCert → ComputationResult String CertState)
    certs-step = to (compute Computational-CERTS)
    
    {-# COMPILE GHC certs-step as certsStep #-}
    
    Previous
    Account
    Next
    Certs
    Made with Material for MkDocs