eutro
A package for programmatic require and provide filters and renamings.
> (not-so-fancy123)(fancy 1 2 3)
> struct:not-so-fancy#<struct-type:fancy>
syntax
( auto-rename-in require-spec...+#:transformtransform...)
syntax
( auto-rename-out provide-spec...+#:transformtransform...)
syntax
( transform-in require-spec...+#:transformtransforms...)
syntax
( transform-out provide-spec...+#:transformtransforms...)
syntax
( transform-in/out spec...+#:transformtransforms...)
These bindings are provided by both auto-rename and auto-rename/filters. auto-rename additionally provides these bindings with tx/ replacing transformer/.
procedure
( transform/filter accept?)→filter/c
syntax
( transform/when xaccept?-expr)
procedure
( transform/remove reject?)→filter/c
syntax
( transform/unless xreject?-expr)
procedure
( transform/map renamer)→filter/c
syntax
( transform/for xname-expr)
procedure
( transform/append-map renamer)→filter/c
syntax
( transform/for* xnames-expr)
procedure
( transform/matches pattern)→filter/c
procedure
( transform/replace patternreplacement)→filter/c
Equivalent to (transform/for name(regexp-replace* patternnamereplacement)).
=
A reducing function is a type of procedure which accumulates inputs into an accumulator. auto-rename uses reducing functions to transform a sequence of imports/exports into the list of imports/exports produced by auto-rename-in/out . Typically, one does not see reducing functions unless they are writing a filter by hand.
Specifically (reducing-function/c in/cacc/c) is a contract for a procedure rf suitable for the expression (rf(foldl rfaccins)), where acc and ins conform to acc/c and (listof in/c) respectively, and a filter is a function which maps an import/export reducing function to a new import/export reducing function, which may rename, remove, duplicate, or otherwise modify the stream of imports/exports that the original reducing function receives, but may not observe or modify the accumulator.
;A transformer which drops all imports/exports.[(im/exacc)acc][(acc)acc]));A transformer which drops imports randomly.[(im/exacc)acc(rfim/exacc))][(acc)acc]))
value
procedure
( im/export-name im/ex)→string?
im/ex:im/export/c
procedure
( im/export-map-name im/exproc)→im/export/c
im/ex:im/export/c
procedure
( transform/compose transform...)→filter/c
transform:filter/c
Bindings detailed in this section are experimental, and may not be up to the same quality as those exported by auto-rename. I make no backwards-compatibility guarantees.
This module provides require/provide transformers for importing and exporting bindings with British English spelling.
1
1/3
car: contract violation
expected: pair?
given: 10...
"foo bar baz"
syntax
( for-british spec...+)
syntax
( for-american spec...+)
This module provides require/provide transformers for importing and exporting bindings in languages like French, German and Hungarian. Due to the automated and word-based nature of these translations they may not be very good, but they are predictable. Sometimes.
'(3 2 1)
#"abcd"
#t
'("EFGH" "IJKL")
> (funkció1007)14
2
funkció|l'ensemble|Be Aus Be Aus Be Aus Be Aus
> |l'ensemble|(mutable-set 1 12 4)
syntax
( en-français spec...+)
syntax
( auf-deutsch spec...+)
syntax
( magyarul spec...+)
This works by splitting each identifier into tokens of (English) alphabet characters, and applying pre-defined translations (if any) to each token individually.