source: project/wiki/eggref/4/type-stubs @ 28365

Last change on this file since 28365 was 28365, checked in by Moritz Heidkamp, 7 years ago

Add type-stubs documentation

File size: 2.1 KB
Line 
1== type-stubs
2
3This extension provides a module which exports stubs for Chicken's
4[[/man/4/Types|type syntax]] when used with Chicken versions below
54.7.5 which is the version this syntax was introduced with. With
6Chicken versions >= 4.7.5 it doesn't export anything. This allows code
7to be type annotated and still be excuted and compiled with older
8Chicken versions.
9
10
11=== Example
12
13<enscript language="scheme">
14(module my-typed-module
15
16(doubled-number->string)
17
18(import chicken scheme)
19(use type-stubs)
20
21(: doubled-number->string (number -> string))
22(define (doubled-number->string n)
23  (number->string (* n n)))
24
25)
26</enscript>
27
28=== License
29
30  Copyright (c) 2013, Moritz Heidkamp
31  All rights reserved.
32 
33  Redistribution and use in source and binary forms, with or without
34  modification, are permitted provided that the following conditions are
35  met:
36 
37  Redistributions of source code must retain the above copyright
38  notice, this list of conditions and the following disclaimer.
39 
40  Redistributions in binary form must reproduce the above copyright
41  notice, this list of conditions and the following disclaimer in the
42  documentation and/or other materials provided with the distribution.
43 
44  Neither the name of the author nor the names of its contributors may
45  be used to endorse or promote products derived from this software
46  without specific prior written permission.
47 
48  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
49  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
50  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
51  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
52  COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
53  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
54  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
55  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
56  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
57  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
58  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
59  OF THE POSSIBILITY OF SUCH DAMAGE.
60
Note: See TracBrowser for help on using the repository browser.