A library and then an executable that uses that library.
Create a folder called foo
:
This is a simple installation and configuration manual to setup a private mailserver. The instructions will be continued in future...
type t<'a> = Js.Promise.t<'a> | |
type error | |
@bs.new | |
external make: ((@bs.uncurry ~resolve: (. 'a) => unit, ~reject: (. exn) => unit) => unit) => t<'a> = | |
"Promise" | |
@bs.val @bs.scope("Promise") external resolve: 'a => t<'a> = "resolve" | |
@bs.val @bs.scope("Promise") external reject: exn => t<'a> = "reject" | |
@bs.val @bs.scope("Promise") | |
external all: array<t<'a>> => t<array<'a>> = "all" |
type heading = | |
| North | |
| South | |
| East | |
| West; | |
type position = { | |
x: int, | |
y: int, | |
heading, |
type ordering = | |
| Greater | |
| Less | |
| Equal; | |
// ORD typeclass / interface module | |
module type ORD = { | |
type t; | |
let compare: (t, t) => ordering; | |
}; |
namespace MyName { | |
export type MyType = string | number; | |
export const myValue: MyType = createSampleValue(); | |
// internal | |
function createSampleValue(): string { | |
return "test"; | |
} |
open Relude.Globals; // I usually do this in bsconfig | |
type user = { | |
firstName: string, | |
lastName: string, | |
}; | |
type error = | |
| AlreadyLoggedIn; | |
type context = { |
module Mark = { | |
[@unboxed] | |
type t = | |
| Any('a): t; | |
module Link = { | |
type attrs = { | |
href: string, | |
target: string, | |
}; |