plutus-core-1.36.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusCore.StdLib.Data.Data

Description

Built-in pair and related functions.

Synopsis

Documentation

dataTy :: uni `HasTypeLevel` 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