2020-12-28 22:33:40 +01:00
|
|
|
#lang scribble/manual
|
|
|
|
|
2020-12-28 22:53:19 +01:00
|
|
|
@(require (for-label (only-in typed/racket require/typed require/typed/provide)))
|
|
|
|
|
2020-12-28 22:57:45 +01:00
|
|
|
@title{Typed Interface for the Generic Graph Library}
|
2020-12-28 22:33:40 +01:00
|
|
|
|
|
|
|
@author[@author+email["Sergiu Ivanov" "sivanov@colimite.fr"]]
|
|
|
|
|
|
|
|
@defmodule[typed/graph]
|
|
|
|
|
2021-10-10 17:30:21 +02:00
|
|
|
This library provides an incomplete typed interface to the
|
2020-12-28 22:33:40 +01:00
|
|
|
@hyperlink["https://docs.racket-lang.org/graph/index.html"]{generic graph
|
|
|
|
library}.
|
|
|
|
|
2021-10-10 17:30:21 +02:00
|
|
|
As the name says it, the graph library relies on Racket generics quite
|
|
|
|
a bit, which are not supported by Typed Racket as of 2021-10-10.
|
|
|
|
Furthermore, the graph library defines a number of cool and elegant
|
|
|
|
macros, which I haven't figured out how to get working with Typed
|
|
|
|
Racket yet.
|
2021-08-06 00:16:48 +02:00
|
|
|
|
2021-10-10 17:50:35 +02:00
|
|
|
@bold{TODO:} List the exported functions together with their types.
|
|
|
|
|
2020-12-28 22:33:40 +01:00
|
|
|
@section{Bug reporting}
|
|
|
|
|
2021-10-10 17:35:06 +02:00
|
|
|
If you find a bug, first try running your code directly with the graph library,
|
|
|
|
in untyped Racket. If the bug persists, you should probably report it to the
|
|
|
|
maintainer of the graph library directly. If unsure, report the bug to me.
|
2020-12-28 22:33:40 +01:00
|
|
|
|
|
|
|
@section{Contributing}
|
|
|
|
|
|
|
|
As of 2021, GitHub is owned by Microsoft, so I prefer keeping this library on
|
|
|
|
a different platform.
|
|
|
|
|
|
|
|
Do feel free to submit patches to me by E-mail: I will try my best to review
|
|
|
|
and apply them within a reasonable time frame.
|
|
|
|
|
2020-12-28 22:53:19 +01:00
|
|
|
@section{Technical details}
|
|
|
|
|
|
|
|
Typed Racket includes very useful primitives @racket[require/typed] and
|
|
|
|
@racket[require/typed/provide]. However, we cannot use this technique with the
|
|
|
|
graph library. The solution which works consists in wrapping the opaque graph
|
|
|
|
structure into another structure, which will therefore be a uniform container
|
|
|
|
for all kinds of graph implementations provided by the library.
|
|
|
|
|
|
|
|
This solution comes from Alex Knauth's answer
|
|
|
|
@hyperlink["https://stackoverflow.com/a/65416020"]{answer on Stack Overflow}.
|
|
|
|
This page also contains a technical explanation of the issue.
|
|
|
|
|
2020-12-28 22:33:40 +01:00
|
|
|
@section{License}
|
|
|
|
|
|
|
|
Like the generic graph library, this library is licensed under the Apache
|
|
|
|
License, Version 2.0 (the "License"); you may not use this file except in
|
|
|
|
compliance with the License. You may obtain a copy of the License at
|
|
|
|
|
|
|
|
@hyperlink["http://www.apache.org/licenses/LICENSE-2.0"]{http://www.apache.org/licenses/LICENSE-2.0}
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software distributed
|
|
|
|
under the License is distributed on an @bold{"as is" basis, without warranties
|
|
|
|
or conditions of any kind}, either express or implied. See the License for the
|
|
|
|
specific language governing permissions and limitations under the License.
|