the next generation of the in-browser educational proof assistant
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 30 lines 922 B view raw
1open Signatures 2module type PORTS = { 3 type t 4 let combine: (t, t) => t 5 let empty: t 6} 7module Ports = (Term: TERM, Judgment: JUDGMENT with module Term := Term) => { 8 module Rule = Rule.Make(Term, Judgment) 9 type t = {facts: Dict.t<Rule.t>, ruleStyle: option<RuleView.style>} 10 let empty = {facts: Dict.make(), ruleStyle: None} 11 let combine = (p1, p2) => { 12 let facts = Dict.copy(p1.facts)->Dict.assign(p2.facts) 13 let ruleStyle = p2.ruleStyle->Option.mapOr(p1.ruleStyle, x => Some(x)) 14 {facts, ruleStyle} 15 } 16} 17 18module type COMPONENT = { 19 module Ports: PORTS 20 type state 21 type props = { 22 content: state, 23 imports: Ports.t, 24 /* onLoad: (~exports: Ports.t, ~string: string=?) => unit, */ 25 onChange: (state, ~exports: Ports.t=?) => unit, 26 } 27 let serialise: state => string 28 let deserialise: (string, ~imports: Ports.t) => result<(state, Ports.t), string> 29 let make: props => React.element 30}