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
This is motivated by the definedIn family of functions.
--| Takes a 'HasSymbol' that is also 'Referable' and outputs as a 'Sentence': "@symbol@ is defined in @reference@."definedIn:: (Referabler, HasShortNamer, HasSymbolr) =>r->Sentence
definedIn q = ch q `S.is`S"defined in"+:+. refS q
--| Same as 'definedIn', but allows for additional information to be appended to the 'Sentence'.definedIn':: (Referabler, HasShortNamer, HasSymbolr) =>r->Sentence->Sentence
definedIn' q info = ch q `S.is`S"defined"`S.in_` refS q +:+. info
Correct me if I'm wrong, but as far as I can see InstanceModel and DataDefinition are the only types that satisfy both Referable and HasSymbol. So those are currently the only possible arguments to the definedIn functions. As part of #3573 and #3617 (part of #3574), I would like to replace HasSymbol with HasOutput in the type signatures of the definedIn functions.
However, HasOutput is in drasil-theory and the definedIn functions are in drasil-lang, and we don't want drasil-lang to depend on drasil-theory (see also #3591 and #3597). Would it be appropriate then to implement DefinesQuantity for InstanceModel and DataDefinition so we can use it in the definedIn functions as follows?
definedIn does not need to be defined in drasil-lang. Things that output Sentence in that way really should be elsewhere.
We don't want to change things based on just where they are being used right now (i.e. that only InstanceModel and DataDefinition currently satisfy the constraints). We want to have the "most meaningful constraints".
Having said that: using DefinesQuantity sounds like a better high-level constraint that the low-level HasSymbol.
This is motivated by the
definedIn
family of functions.Correct me if I'm wrong, but as far as I can see
InstanceModel
andDataDefinition
are the only types that satisfy bothReferable
andHasSymbol
. So those are currently the only possible arguments to thedefinedIn
functions. As part of #3573 and #3617 (part of #3574), I would like to replaceHasSymbol
withHasOutput
in the type signatures of thedefinedIn
functions.However,
HasOutput
is indrasil-theory
and thedefinedIn
functions are indrasil-lang
, and we don't wantdrasil-lang
to depend ondrasil-theory
(see also #3591 and #3597). Would it be appropriate then to implementDefinesQuantity
forInstanceModel
andDataDefinition
so we can use it in thedefinedIn
functions as follows?The text was updated successfully, but these errors were encountered: