You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shell::Signature is painful and error-prone to use, make it better. We could do the following things to make it better:
Remove setType and pass OperatorType directly when creating a symbol. This removes the need for the weird fnType, predType, typeConType triplet. Currently being implemented in require-symbol-operatortype.
Have a unified domain for all symbol types. This should be straightforward to do, we just have some edge cases where we have to enumerate functions/predicates/typecons, so we have to additionally maintain some structures storing these. The benefit of this is that a tremendous amount of branching can be removed from the code, having getSymbol instead of getFunction, getPredicate and getTypeCon, and of course, that debugging becomes much easier because symbols map one-to-one to unsigneds, so no more "not sure what this symbol is".
Have some kind of nicer, builder interface for all the makeIntroduced, makeSkolem, etc. and maybe also for getting the functor itself, so the addFunction and immediate getFunction patterns could disappear. (suggested by @MichaelRawson)
Shell::Signatureis painful and error-prone to use, make it better. We could do the following things to make it better:setTypeand passOperatorTypedirectly when creating a symbol. This removes the need for the weirdfnType,predType,typeConTypetriplet. Currently being implemented inrequire-symbol-operatortype.getSymbolinstead ofgetFunction,getPredicateandgetTypeCon, and of course, that debugging becomes much easier because symbols map one-to-one tounsigneds, so no more "not sure what this symbol is".makeIntroduced,makeSkolem, etc. and maybe also for getting the functor itself, so theaddFunctionand immediategetFunctionpatterns could disappear. (suggested by @MichaelRawson)