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` DataType tyname uni () Source #

Data as a built-in PLC type.

matchDataTermLike term TyName Name DefaultUni DefaultFunMatchOption → term () Source #

Pattern matching over Data inside PLC.

Either

\(d : data) ->
    /\(r :: *) ->
     \(fConstr : integer -> list data -> r)
      (fMap : list (pair data data) -> r)
      (fList : list data -> r)
      (fI : integer -> r)
      (fB : bytestring -> r) ->
          matchData
              {r}
              fConstr
              fMap
              fList
              fI
              fB
              d

Or

\(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

depending on the MatchOption argument.