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.

reorganise atom defns #3

open opened by joshcbrown.tngl.sh targeting main from joshcbrown.tngl.sh/holbert-ng: assoc-comm-atom

the previous organisation didn't actually quite allow circular coercions, which wasn't discovered because there weren't any.

resolve conflicts

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:2b3sedxepcp6u7s2najxr2zm/sh.tangled.repo.pull/3mke3eh2iqf22
+14 -16
Interdiff #1 โ†’ #2
src/AtomBase.res

This file has not been changed.

src/AtomDef.res

This file has not been changed.

src/SExp.res

This file has not been changed.

src/SExpView.res

This file has not been changed.

src/Scratch.res

This file has not been changed.

src/StringA.res

This file has not been changed.

src/StringA.resi

This file has not been changed.

src/StringAxiomSet.res

This file has not been changed.

src/Symbolic.res

This file has not been changed.

src/Symbolic.resi

This file has not been changed.

tests/RuleTest.res

This patch was likely rebased, as context lines do not match.

+1 -1
src/HOTerm.res
··· 6 6 module type ATOM = AtomDef.ATOM 7 7 8 8 module DefaultAtom = { 9 - module BaseAtom = AtomDef.MakeBaseAtom({ 9 + module Base = AtomBase.Make({ 10 10 type t = string 11 11 }) 12 12 type t = string
+13 -15
tests/HOTermTest.res
··· 3 3 4 4 module Util = TestUtil.MakeTerm(HOTerm) 5 5 6 - module Symbol = AtomDef.MakeAtomAndView( 6 + module Symbol = AtomDef.MakeAtomChoiceAndView( 7 7 Symbolic.Atom, 8 8 Symbolic.AtomView, 9 - AtomDef.NilAtomList, 10 - AtomDef.NilAtomListView, 9 + AtomDef.EmptyAtomChoice, 10 + AtomDef.EmptyAtomChoiceView, 11 11 ) 12 - module StringSymbol = AtomDef.MakeAtomAndView( 12 + module StringSymbol = AtomDef.MakeAtomChoiceAndView( 13 13 StringA.Atom, 14 14 StringA.AtomView, 15 15 Symbol.Atom, ··· 18 18 module StringHOTerm = HOTerm.Make(StringSymbol.Atom) 19 19 module StringUtil = TestUtil.MakeTerm(StringHOTerm) 20 20 let wrapString = s => StringHOTerm.Symbol({ 21 - name: AtomDef.AnyValue(StringA.BaseAtom.Tag, s), 21 + name: AtomBase.AnyValue(StringA.Base.Tag, s), 22 22 constructor: false, 23 23 }) 24 24 let wrapSymbol = s => StringHOTerm.Symbol({ 25 - name: AtomDef.AnyValue(Symbolic.BaseAtom.Tag, s), 25 + name: AtomBase.AnyValue(Symbolic.Base.Tag, s), 26 26 constructor: false, 27 27 }) 28 28 ··· 169 169 }) 170 170 171 171 zoraBlock("string HOTerm functor", t => { 172 + module B = AtomBase.String 172 173 t->block("parse string atom", t => { 173 - t->StringUtil.testParse(`"x y"`, wrapString([StringA.String("x"), StringA.String("y")])) 174 - t->StringUtil.testParse(`"$s"`, ~scope=["s"], wrapString([StringA.Var({idx: 0})])) 174 + t->StringUtil.testParse(`"x y"`, wrapString([String("x"), String("y")])) 175 + t->StringUtil.testParse(`"$s"`, ~scope=["s"], wrapString([AtomBase.String.Var({idx: 0})])) 175 176 t->StringUtil.testParsePrettyPrint(`"x y"`, `"x y"`) 176 177 }) 177 178 t->block("parse symbolic atom", t => { ··· 179 180 t->StringUtil.testParse( 180 181 "@cons", 181 182 StringHOTerm.Symbol({ 182 - name: AtomDef.AnyValue(Symbolic.BaseAtom.Tag, "cons"), 183 + name: AtomBase.AnyValue(Symbolic.Base.Tag, "cons"), 183 184 constructor: true, 184 185 }), 185 186 ) ··· 194 195 let substAdd = StringHOTerm.substAdd 195 196 t->equal( 196 197 StringHOTerm.unify(parse(`"a ?0() c"`), parse(`"a b c"`))->Seq.head, 197 - Some(emptySubst->substAdd(0, wrapString([StringA.String("b")]))), 198 + Some(emptySubst->substAdd(0, wrapString([String("b")]))), 198 199 ) 199 200 t->equal( 200 201 StringHOTerm.unify(parse(`(P "?1() a" "?1()")`), parse(`(P "a ?1()" "a")`))->Seq.head, 201 - Some(emptySubst->substAdd(1, wrapString([StringA.String("a")]))), 202 + Some(emptySubst->substAdd(1, wrapString([String("a")]))), 202 203 ) 203 204 let choices = 204 205 StringHOTerm.unify(parse(`"?1() a"`), parse(`"a ?1()"`)) ··· 206 207 ->Seq.toArray 207 208 t->equal( 208 209 choices, 209 - [ 210 - emptySubst->substAdd(1, wrapString([])), 211 - emptySubst->substAdd(1, wrapString([StringA.String("a")])), 212 - ], 210 + [emptySubst->substAdd(1, wrapString([])), emptySubst->substAdd(1, wrapString([String("a")]))], 213 211 ) 214 212 t->equal(StringHOTerm.unify(parse(`"a"`), parse(`"b"`))->Seq.head, None) 215 213 })

History

3 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
reorganise atom defns
merge conflicts detected
expand
  • src/AtomDef.res:1
  • src/HOTerm.res:6
  • src/SExp.res:150
  • src/SExpView.res:55
  • src/Scratch.res:42
  • src/StringA.res:3
  • src/StringA.resi:1
  • src/StringAxiomSet.res:2
  • src/Symbolic.res:1
  • src/Symbolic.resi:1
  • tests/HOTermTest.res:3
  • tests/RuleTest.res:31
expand 0 comments
1 commit
expand
reorganise atom defns
expand 0 comments
1 commit
expand
reorganise atom defns
expand 0 comments