Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Built-in pair
and related functions.
Synopsis
- dataTy ∷ uni `HasTypeLevel` Data ⇒ Type tyname uni ()
- matchData ∷ TermLike term TyName Name DefaultUni DefaultFun ⇒ MatchOption → term ()
Documentation
matchData ∷ TermLike term TyName Name DefaultUni DefaultFun ⇒ MatchOption → 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.