package yuujinchou

  1. Overview
  2. Docs

Rosetta of Imports

Haskell

  • Haskell syntax:

    import Mod -- x is available an both x and Mod.x

    Corresponding yuujinchou modifier:

    Language.(union [any; renaming [] ["Mod"]])
  • Haskell syntax:

    import Mod (x,y)

    Corresponding yuujinchou modifier:

    Language.(union [only ["x"]; only ["y"]])
  • Haskell syntax:

    import qualified Mod

    Corresponding yuujinchou modifier:

    Language.(renaming [] ["Mod"])
  • Haskell syntax:

    import qualified Mod hiding (x,y)

    Corresponding yuujinchou modifier:

    Language.(seq [except ["x"]; except ["y"]; renaming [] ["Mod"]])

Racket

  • Racket syntax:

    (require (only-in ... id0 [old-id1 new-id1]))

    Corresponding yuujinchou modifier:

    Language.(seq [...; union [only ["id0"]; seq [only ["old-id1"]; renaming ["old-id1"] ["new-id1"]]]])
  • Racket syntax:

    (require (except-in ... id0 id1]))

    Corresponding yuujinchou modifier:

    Language.(seq [...; except ["id0"]; except ["id1"]])
  • Racket syntax:

    (require (prefix-in p: ...))

    Corresponding yuujinchou modifier:

    Language.(seq [...; renaming [] ["p"]])

    Note: Racket does not support hierarchical names, so the prefixing operator in Racket is directly prepending the prefix to the affected names.

  • Racket syntax:

    (require (rename-in ... [old-id0 new-id0] [old-id1 new-id1]))

    Corresponding yuujinchou modifier:

    Language.(seq [...; renaming ["old-id0"] ["new-id0"]; renaming ["old-id1"] ["new-id1"]])
  • Racket syntax:

    (require (combine-in require-spec0 require-spec1 ...))

    Corresponding yuujinchou modifier:

    Language.(union [require-spec0; require-spec1; ...])
OCaml

Innovation. Community. Security.