tests/inputs/idris_block_comments.idr
raw| 1 | -- |
| 2 | -- A module about shapes |
| 3 | -- |
| 4 | |
| 5 | ||| a Shape |
| 6 | data Shape = |
| 7 | ||| Triangle with base and heigth |
| 8 | Triangle Double Double | |
| 9 | ||| Circle with radius |
| 10 | Circle Double |
| 11 | |
| 12 | ||| computes the area of a shape |
| 13 | area : Shape -> Double |
| 14 | area (Triangle x y) = 0.5 * x * y |
| 15 | area (Circle x) = pi * x * x |
| 16 | -- pi is known by idris |
| 17 | |
| 18 | {- |
| 19 | commented out code |
| 20 | -} |