Note that I haven't even implemented union literals, so this can't even be used, yet! This lets you access the field of a union if it has exactly one alternative. The basic idea is that a subsequent change will provide an operator for merging pattern matches with the following pseudo-type: a : Type, b : Type, r : Type |- (\/) : (a → r) → (b → r) → (a \/ b → r) For example: (\/) : (< foo : Bool > → Integer) → (< bar : Text > → Integer) → (< foo : Bool | bar : Text > → Integer) You can then combine `(\/)` in conjunction with field access to implement pattern matching: let example : < foo : Bool | bar : Natural > → Bool = (λ(x : < foo : Bool >) → x.foo ) \/ (λ(x : < bar : Natural >) → Natural/even (x.bar)) in example |
||
---|---|---|
exec | ||
src | ||
dhall.cabal | ||
LICENSE | ||
Setup.hs | ||
stack.yaml |