[racket-dev] problem with require and frtime
At Wed, 18 Jan 2012 12:02:10 +0100, Marijn wrote:
> the following fragment:
>
>
> #lang frtime
>
> (require (only-in srfi/1 every))
>
>
> leads to ```only-in: bad module path in: (only-in srfi/1 every)'''
> error.
The `frtime' language builds on (the older) `scheme' language instead
of `racket', so change `only-in' to `only'.
I'll adjust the docs.
> At the same time this other fragment:
>
>
> #lang racket
>
> (require frtime)
>
> (require srfi/1)
>
>
> leads to ```module: identifier already imported from: frtime at: third
> in: srfi/1''' error.
>
> I would expect both forms to work. This is a reduction of a different
> problem possibly caused by these issues here.
Unfortunately, the `third' from `racket' (via `racket/list') and from
`srfi/1' are just different functions:
> (require srfi/1)
> (third '(1 2 3 . 4)) ; works on any sufficiently long chain of pairs
3
> (require racket/list)
> (third '(1 2 3 . 4)) ; requires a list
third: expected argument of type <list>; given '(1 2 3 . 4)
The documentation should clarify that only the `srfi/1' functions
documented in bold (not including those in italic bold) correspond to
`racket' functions, and the others do not; I'll fix those docs, too.