diff options
author | dos-reis <gdr@axiomatics.org> | 2008-02-19 00:35:15 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-02-19 00:35:15 +0000 |
commit | 9fbb89443e0c88ee5e76d95a3eea2ac5ea9916b6 (patch) | |
tree | f1bad297451efd27a5d980854c120d28d775ab41 /src/algebra/variable.spad.pamphlet | |
parent | a415d56c7fe71b04b00c0bc0a78e256791b27cb9 (diff) | |
download | open-axiom-9fbb89443e0c88ee5e76d95a3eea2ac5ea9916b6.tar.gz |
* algebra/variable.spad.pamphlet (AnonymousFunction): Add new
functions `parameters' and `body'.
* algebra/domain.spad.pamphlet: Rename from algebra/domain.spad.
(Category): New category.
* algebra/Makefile.pamphlet (axiom_algebra_layer_0): Include
CATEGORY.o.
(DOMAIN.NRLIB/code.$(FASLEXT)): Remove rule.
* interp/trace.boot (transTraceItem): Use $LangSupportTypes.
* interp/sys-constants.boot ($None): New.
($Type): Likewise.
($LangSupportTypes): Likewise.
* interp/parse.boot (parseHas): Use $LangSupportTypes.
(parseHasRhs): Likewise.
* interp/i-spec2.boot (upLETtype): Use conceptualType.
(uptypeOf): Likewise.
(upwhere): Likewise.
(typeOfType): Remove.
* interp/i-spec1.boot (isDomainValuedVariable): Variables with
type Category and Type are domain valued too.
* interp/i-output.boot (output): Special case only Mode and Type.
* interp/i-funsel.boot (selectMms): Don't ignore modemaps with
category parameters.
* interp/i-coerce.boot (canCoerce1): Test for Category instead of
SubDomain Domain.
(canCoerceFrom0): Use $None and $Any.
(absolutelyCannotCoerce): Use $None.
(coerceInteractive): Use $LangSupportTypes.
(coerceInt1): Use $Any.
* interp/i-analy.boot (conceptualType): New.
(bottomUpType): Use it.
* interp/clammed.boot (isValidType): Use $LangSupportTypes.
* interp/g-cndata.boot (isNameOfType): Likewise.
* interp/category.boot (Category): Remove hacky definition.
* interp/buildom.boot ($noCategoryDomains): Domain now has a
Lisplib.
Diffstat (limited to 'src/algebra/variable.spad.pamphlet')
-rw-r--r-- | src/algebra/variable.spad.pamphlet | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/algebra/variable.spad.pamphlet b/src/algebra/variable.spad.pamphlet index 0f50171d..54972970 100644 --- a/src/algebra/variable.spad.pamphlet +++ b/src/algebra/variable.spad.pamphlet @@ -93,13 +93,30 @@ FunctionCalled(f:Symbol): SetCategory with )abbrev domain ANON AnonymousFunction ++ Description: ++ This domain implements anonymous functions -AnonymousFunction():SetCategory == add - coerce(x:%):OutputForm == x pretend OutputForm +AnonymousFunction():SetCategory with + parameters: % -> List Symbol + ++ parameters(f) returns the list of parameters bound by `f'. + body: % -> Syntax + ++ body(f) returns the body of the unnamed function `f'. + == add + import Syntax + coerce(x:%):OutputForm == + x pretend OutputForm + + parameters f == + ps := CADR(f)$Lisp : Syntax + ps case Symbol => [ps]$List(Symbol) + getOperands(ps) pretend List(Symbol) + + body f == + CADDR(f)$Lisp : Syntax @ \section{License} <<license>>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. +--Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd. +--All rights reserved. +--Copyright (C) 2007-2008, Gabriel Dos Reis. --All rights reserved. -- --Redistribution and use in source and binary forms, with or without |