Closed Mercerenies closed 4 years ago
Updated note on syntax
trait Eq
type t
val == ( Self.t Self.t -- Bool )
end
mod IntIsEq
type t = Int
require Eq
fun == ( Int Int -- Bool )
Prelude.=
end
end
Functors are nearly completely implemented. Still unresolved are:
The initial implementation is complete, and all remaining concerns have been split into other, smaller issues. So I'm closing this one.
Parameterized modules, a la OCaml. This is going to be our primary means of ad hoc polymorphism.
Syntax:
Some notes:
require
declaration is recommended, as it will verify at compile-time that the trait is satisfied, but it's not required.