(The code examples here use idris https://www.idris-lang.org)
To augment testing with a finite number of inputs we write mathematical proofs that demonstrate their correctness on all possible inputs.
The programmer writes the proofs and the compiler checks the proofs as it builds the software.
Search Bar* | |
Inactive* | |
focus -> Active | |
Active | |
Loaded* | |
cancel -> Inactive | |
type -> Text Entry | |
Empty* | |
submit -> Error |
enum Feature<T: Decodable>: Decodable { | |
case disabled | |
case enabled(configuration: T) | |
init(from decoder: Decoder) throws { | |
if let _ = try? EmptyObject.init(from: decoder) { | |
self = .disabled | |
return | |
} |
import Foundation | |
struct BasketItem { | |
var name: String | |
var price: Price | |
} | |
extension BasketItem: CustomStringConvertible { | |
var description: String { | |
return "Item \(self.name) \(self.price)" |
Types are theorems, programs are proofs.
(The code examples here use idris https://www.idris-lang.org)
To augment testing with a finite number of inputs we write mathematical proofs that demonstrate their correctness on all possible inputs.
The programmer writes the proofs and the compiler checks the proofs as it builds the software.
Number Form* | |
Invalid* | |
select number -> Valid | |
Valid | |
submit -> Submitting | |
clear -> Invalid | |
Submitting |
This document describes a proposal to add support for remote dependencies to the
juvix
build tool.
Juvix projects can currently depend on other Juvix projects that are stored on
the local file system using the dependencies
field in the project's
juvix.yaml
file: