I'm playing around with modules and having some troubles. This is just a toy example, but it will show you my problem. (Note, this is ReScript syntax, but you get the idea.)
module type Thing = {
type t
type fromT
let from: fromT => t
let into: t => option<fromT>
}
module StringThing: Thing = {
type t = string
type fromT = int
let from = i => Js.Int.toString(i)
let into = s => Belt.Int.fromString(s)
}
let s = StringThing.from(11) // Error!
The idea is just to have some little wrapper module that can take some type and convert. Now, this is sort of a pointless thing to do, but I'm jus