Changeset 4431
- Timestamp:
- 08/17/08 10:41:43 (5 months ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
compiler/logtalk.pl (modified) (1 diff)
-
manuals/migration/index.html (modified) (1 diff)
-
RELEASE_NOTES.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/compiler/logtalk.pl
r4429 r4431 5946 5946 ; throw(instantiation_error) 5947 5947 ), 5948 ( Pred = (Original::Alias) ->5948 ( Pred = ':'(Original, Alias) -> 5949 5949 true 5950 5950 ; (Original, Alias) = (Pred, Pred) -
trunk/manuals/migration/index.html
r4412 r4431 226 226 As a general rule, the Prolog modules should be loaded (e.g. in the auxiliary Logtalk loader files) before compiling objects that make use of module predicates. This is mandatory whenever the module exports operator declarations that you want to use in your objects and categories (as in the example above). 227 227 </p> 228 <p> 229 Logtalk supports the declaration of predicate aliases in <code>use_module/2</code> directives used within object and categories. For example, the ECLiPSe IC Constraint Solvers defines a <code>::/2</code> variable domain operator that clashes with the Logtalk <code>::/2</code> message sending operator. We can solve the conflict by writing: 230 </p> 231 <pre>:- use_module(ic, [alldifferent/1, (::)/2:ins/2, (#=)/2]).</pre> 232 <p> 233 With this directive, calls to the <code>ins/2</code> predicate alias will be automatically compiled by Logtalk to calls to the <code>::/2</code> predicate in the <code>ic</code> module. 234 </p> 228 235 229 236 <div class="footer"> 230 237 <div class="copyright"> 231 238 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 232 <span>Last updated on: July 31, 2008</span>239 <span>Last updated on: August 16, 2008</span> 233 240 </div> 234 241 <div class="navbottom"> -
trunk/RELEASE_NOTES.txt
r4429 r4431 18 18 Added support for using Prolog use_module/2 directives in objects and 19 19 categories. This allows module predicates to be called using implicit 20 qualification, improving readability. 20 qualification, improving readability. The use_module/2 directive supports 21 the declaration of predicate aliases using the notation Original:Alias. 21 22 22 23 Added support for meta-calls whose closure arguments are explicitly
