Skip to content

Commit

Permalink
Merge pull request #17 from AdrickTench/master
Browse files Browse the repository at this point in the history
doc for type-check symbol
  • Loading branch information
AdrickTench authored Dec 20, 2024
2 parents 6e669d2 + 2adc31a commit 90d3fe2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion prolog/metta_lang/stdlib_mettalog.metta
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@
(= (If False $then) (let $n 0 (let $n 1 $n)))
(= (If $cond $then $else) (if $cond $then $else))

(iz predicate-arity MeTTaLog)
(@doc type-check
(@desc "The value of type-check determines MeTTa's type-checking behavior. Set via pragma!. When set to auto (i.e. !(pragma! type-check auto)), types are checked immediately on adding an expression to the space. By default, when unset (or set to anything other than auto), types are checked only on evaluation. For example !(+ 1 \"2\") would trigger a type violation, but (= (foo $x) (+ $x \"2\")) would not, unless type-check is set to auto, in which case both would trigger type violations."))
(: type-check Symbol)

(iz predicate-arity MeTTaLog)

(@doc predicate-arity
(@desc "Specifies the arity (number of arguments) for a given predicate, allowing it to be queriable in the system's match framework. This is particularly useful for enabling built-in functions, such as `size-atom`, to be used as predicates in declarative contexts and run in reverse to compute inputs based on outputs.
Expand Down

0 comments on commit 90d3fe2

Please sign in to comment.