Agda User Manual v2.6.3Taste of Agda A List of Tutorials Language Reference Abstract definitions Built-ins Coinduction Copatterns Core language Coverage Checking Cubical Cubical compatible Cumulativity Data Types Flat Modality Reflection Rewriting Static values Strictness Coinduction Coinductive Records Old Coinduction Copatterns Copatterns in function definitions Mixing patterns and co-patterns Core language Grammar Syntax overview it is not necessary to give an explicit constructor to the record type Stream. Now we can use copatterns to create Streams, like one that repeats a given element a infinitely many times: repeat : {A0 码力 | 379 页 | 354.83 KB | 1 年前3
Agda User Manual v2.6.2Taste of Agda A List of Tutorials Language Reference Abstract definitions Built-ins Coinduction Copatterns Core language Coverage Checking Cubical Cumulativity Data Types Flat Modality Foreign Function Reflection Rewriting Static values Strictness Coinduction Coinductive Records Old Coinduction Copatterns Copatterns in function definitions Mixing patterns and co-patterns Core language Grammar Syntax overview Stream A) : Set where coinductive field hd-≡ : hd xs ≡ hd ys tl-≈ : tl xs ≈ tl ys Using copatterns we can define a pair of functions on Streams such that one returns the elements in the even positions0 码力 | 348 页 | 414.11 KB | 1 年前3
Agda User Manual v2.6.2.2Taste of Agda A List of Tutorials Language Reference Abstract definitions Built-ins Coinduction Copatterns Core language Coverage Checking Cubical Cumulativity Data Types Flat Modality Foreign Function Reflection Rewriting Static values Strictness Coinduction Coinductive Records Old Coinduction Copatterns Copatterns in function definitions Mixing patterns and co-patterns Core language Grammar Syntax overview Stream A) : Set where coinductive field hd-≡ : hd xs ≡ hd ys tl-≈ : tl xs ≈ tl ys Using copatterns we can define a pair of functions on Streams such that one returns the elements in the even positions0 码力 | 354 页 | 433.60 KB | 1 年前3
Agda User Manual v2.6.2.1Taste of Agda A List of Tutorials Language Reference Abstract definitions Built-ins Coinduction Copatterns Core language Coverage Checking Cubical Cumulativity Data Types Flat Modality Foreign Function Reflection Rewriting Static values Strictness Coinduction Coinductive Records Old Coinduction Copatterns Copatterns in function definitions Mixing patterns and co-patterns Core language Grammar Syntax overview Stream A) : Set where coinductive field hd-≡ : hd xs ≡ hd ys tl-≈ : tl xs ≈ tl ys Using copatterns we can define a pair of functions on Streams such that one returns the elements in the even positions0 码力 | 350 页 | 416.80 KB | 1 年前3
Agda User Manual v2.6.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 3.4 Copatterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . it is not necessary to give an explicit constructor to the record type Stream. Now we can use copatterns to create Streams, like one that repeats a given element a infinitely many times: repeat : {A (ys : Stream A) : Set where coinductive field hd-≡ : hd xs ≡ hd ys tl-≈ : tl xs ≈ tl ys Using copatterns we can define a pair of functions on Streams such that one returns the elements in the even positions0 码力 | 288 页 | 1.24 MB | 1 年前3
Agda User Manual v2.5.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.4 Copatterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A) (ys : Stream A) : Set where coinductive field hd- : hd xs hd ys tl- : tl xs tl ys Using copatterns we can define a pair of functions on Stream such that one returns a Stream with the elements in n) → suc m suc n The current implementation of coinductive types comes with some limitations. Copatterns Consider the following record: record Enumeration A : Set where constructor enumeration field0 码力 | 135 页 | 600.40 KB | 1 年前3
Agda User Manual v2.5.3Overview Getting Started Installation Language Reference Abstract definitions Built-ins Coinduction Copatterns Core language Data Types Foreign Function Interface Function Definitions Function Types Implicit Reflection Rewriting Static values Strictness Coinduction Coinductive Records Old Coinduction Copatterns Copatterns in function definitions Mixing patterns and co-patterns Core language Data Types Simple Stream A) : Set where coinductive field hd-≈ : hd xs ≡ hd ys tl-≈ : tl xs ≈ tl ys Using copatterns we can define a pair of functions on Stream such that one returns a Stream with the elements in0 码力 | 185 页 | 185.00 KB | 1 年前3
Agda User Manual v2.6.1.3Compiling Agda Code A List of Tutorials Language Reference Abstract definitions Built-ins Coinduction Copatterns Core language Cubical Cumulativity Data Types Flat Modality Foreign Function Interface Function Reflection Rewriting Static values Strictness Coinduction Coinductive Records Old Coinduction Copatterns Copatterns in function definitions Mixing patterns and co-patterns Core language Cubical The interval Stream A) : Set where coinductive field hd-≈ : hd xs ≡ hd ys tl-≈ : tl xs ≈ tl ys Using copatterns we can define a pair of functions on Stream such that one returns a Stream with the elements in0 码力 | 305 页 | 375.80 KB | 1 年前3
Agda User Manual v2.6.1.2Compiling Agda Code A List of Tutorials Language Reference Abstract definitions Built-ins Coinduction Copatterns Core language Cubical Cumulativity Data Types Flat Modality Foreign Function Interface Function Reflection Rewriting Static values Strictness Coinduction Coinductive Records Old Coinduction Copatterns Copatterns in function definitions Mixing patterns and co-patterns Core language Cubical The interval Stream A) : Set where coinductive field hd-≈ : hd xs ≡ hd ys tl-≈ : tl xs ≈ tl ys Using copatterns we can define a pair of functions on Stream such that one returns a Stream with the elements in0 码力 | 304 页 | 375.60 KB | 1 年前3
Agda User Manual v2.6.1.1Compiling Agda Code A List of Tutorials Language Reference Abstract definitions Built-ins Coinduction Copatterns Core language Cubical Cumulativity Data Types Flat Modality Foreign Function Interface Function Reflection Rewriting Static values Strictness Coinduction Coinductive Records Old Coinduction Copatterns Copatterns in function definitions Mixing patterns and co-patterns Core language Cubical The interval Stream A) : Set where coinductive field hd-≈ : hd xs ≡ hd ys tl-≈ : tl xs ≈ tl ys Using copatterns we can define a pair of functions on Stream such that one returns a Stream with the elements in0 码力 | 297 页 | 375.42 KB | 1 年前3
共 34 条
- 1
- 2
- 3
- 4













