The Racket repository
Go to file
Alexis King db3c1d4cb9 units: Avoid use-before-initialization errors in signature contracts
This commit fixes an issue with the fix for contracted bindings in
signatures implemented in commit 5fb75e9f82. While the previous fix
worked in simple cases, it introduced a problem: although signatures
that define contracted bindings were able to refer to other bindings
in the signature in the binding contracts, but anyone doing so was
at the mercy of the exporting unit’s definition order. For example,
given a signature

  (define-signature a^
    [(contracted
      [ctc contract?]
      [val ctc])])

then a unit exporting the signature would cause a
use-before-initialization error if its definition for val appeared above
its definition for ctc.

This limitation did not exist in the units implementation prior to the
introduction of the sets-of-scopes expander in Racket v6.3 (after which
contracted bindings were broken until the aforementioned fix in Racket
v7.2). However, the fact that they worked at all seems semi-accidental:
instead of properly indirecting references to signature bindings within
binding contracts, the contract expressions were simply placed in a
context in which the existing names were bound. However, this meant that
any export that renamed identifiers could cause problems, which the
implementation strategy taken in this commit handles just fine.
2019-03-25 13:58:51 -05:00
.github/ISSUE_TEMPLATE_DRAFT Don't set this up quite yet. 2018-11-29 21:49:16 -05:00
pkgs units: Avoid use-before-initialization errors in signature contracts 2019-03-25 13:58:51 -05:00
racket units: Avoid use-before-initialization errors in signature contracts 2019-03-25 13:58:51 -05:00
.gitattributes Don't include git files in archives. 2010-05-12 01:46:05 -04:00
.gitignore Additional files to ignore. 2018-11-21 12:39:56 -05:00
.gitlab-ci.yml Show cache contents for debugging purposes 2019-03-01 17:15:32 -05:00
.mailmap mailmap updates & fixes. 2013-04-03 18:10:22 -04:00
.travis.yml Build cs variant on Travis, but allow failure. 2018-12-02 20:16:05 -05:00
appveyor.yml use VS 2013 on AppVeyor 2018-05-15 11:07:06 -06:00
azure-pipelines.yml Add mac tests on Azure. 2018-09-15 12:43:54 -04:00
INSTALL.txt update "INSTALL.txt" to explain the describe-clients target 2019-03-21 10:40:31 -06:00
Makefile cs: more attempts to fix Chez Scheme submodule update 2019-03-23 10:40:59 -06:00
README.md reorganize and update "README.txt"s about sources and builds 2018-11-16 07:49:53 -07:00

This is the source code for the core of Racket. See "INSTALL.txt" for full information on building Racket.

To build the full Racket distribution from this repository, run make in the top-level directory. To build minimal Racket, run make base.

The rest of the Racket distribution source code is in other repositories, mostly under the Racket GitHub organization.

Contribute to Racket by submitting a pull request, joining the development mailing list, or visiting the IRC channel.

License

Racket is distributed under the GNU Lesser General Public License (LGPL). This implies that you may link Racket into proprietary applications, provided you follow the rules stated in the LGPL. You can also modify Racket; if you distribute a modified version, you must distribute it under the terms of the LGPL, which in particular states that you must release the source code for the modified software.

See racket/src/COPYING_LESSER.txt for more information.