plutus-core-1.0.0.1: Language library for Plutus Core
Safe HaskellNone
LanguageHaskell2010

PlutusCore.StdLib.Data.Data

Description

Built-in pair and related functions.

Synopsis

Documentation

dataTy :: uni `Contains` Data => Type TyName uni () Source #

Data as a built-in PLC type.

caseData :: TermLike term TyName Name DefaultUni DefaultFun => term () Source #

Pattern matching over Data inside PLC.

\(d : data) ->
    /\(r :: *) ->
     \(fConstr : integer -> list data -> r)
      (fMap : list (pair data data) -> r)
      (fList : list data -> r)
      (fI : integer -> r)
      (fB : bytestring -> r) ->
          chooseData
              d
              {unit -> r}
              (\(u : unit) -> uncurry {integer} {list data} {r} fConstr (unConstrB d))
              (\(u : unit) -> fMap (unMapB d))
              (\(u : unit) -> fList (unListB d))
              (\(u : unit) -> fI (unIB d))
              (\(u : unit) -> fB (unBB d))
              unitval