nix-archive-1(type directoryentry(namesharenode(type directoryentry(namedocnode(type directoryentry(namejulia-reexport-1.2.2node(type directoryentry(name LICENSE.mdnode(typeregularcontentsThe Reexport.jl package is licensed under the MIT "Expat" License: > Copyright (c) 2014: Simon Kornblith. > > Permission is hereby granted, free of charge, to any person obtaining > a copy of this software and associated documentation files (the > "Software"), to deal in the Software without restriction, including > without limitation the rights to use, copy, modify, merge, publish, > distribute, sublicense, and/or sell copies of the Software, and to > permit persons to whom the Software is furnished to do so, subject to > the following conditions: > > The above copyright notice and this permission notice shall be > included in all copies or substantial portions of the Software. > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, > EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF > MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. > IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY > CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, > TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE > SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ))))))entry(namejulianode(type directoryentry(namecompilednode(type directoryentry(namev1.8node(type directoryentry(nameReexportnode(type directoryentry(namebTpYr_8vjfg.jinode(typeregularcontents/jli  Linuxx86_641.8.3HEAD0434deb161e17103eabdd7d82b17a1cd6b410572ReexportRP0g8i06IӸn/gnu/store/00w1qad4851hkpvkzl8s3f8kn1p2w5fp-julia-reexport-1.2.2/share/julia/loadpath/Reexport/src/Reexport.jl?n(CoreBaseMainx ArgToolsBń x( Artifactsmr-V3|mBBase64UlD*_䇄gmCRC32c\y.j FileWatchingXzsy`{,zsLibdluVW59˗, LoggingT{VhUXM=QMmapP~:xg,OHENetworkOptionsC0YW,VSHAQ<$!<% Serialization [)*k1;Sockets1V$ bdސݗEUnicodeP>I>NrDelimitedFilesW5GDMߘ@t LinearAlgebraSm7̏1MMarkdownZPn7z`s3Printfg^cX׸QDT3ORandom_ɢ?\Y5ȟTarOi>ա=6DatesEY8pj2 L Distributedo[\(  pWFuturebS;3{I xVMInteractiveUtilsWL ~@'Z萣+LibGit2Z[&RPTv3EКR$"Profile/VEٻy赼 SparseArrays]+N/>c/ȲUUIDs[viqϤrz9y REPLvV͠?ua33  SharedArraysUބ}/9]  Statisticsy[t2}#j  SuiteSparse\F)j7u TOMLOI`&v3TБ Test^,@ O#e11 LibCURLP2p!6-̀-  LibCURL_jllYNjGV5gl.  nghttp2_jll9Sv**0|̙. MozillaCACerts_jll.V m`Yr!W,0  DownloadsJ $:ax$,2K PkgRZDi߯rb  p7zip_jllS33?QFo  LazyArtifactsCOJㄷ}x Reexport0 #reexport0j #0 `00:0 Xreexport@`  TypeMapEntry:@0> v%M ` 0 ?0">:~00:G0n/gnu/store/00w1qad4851hkpvkzl8s3f8kn1p2w5fp-julia-reexport-1.2.2/share/julia/loadpath/Reexport/src/Reexport.jl #self#ml00& b#`  `W`  DenseArray `Y>`  AbstractArray?:::IӸ+97>/#9IӸ9IӸ> v5?0 0  ?0J>:~0H0:G00& H#self#mex#4#3#2#1outnamessymbolsmodulesevaleemodex+ macroexpandheadblock0 0X#1#5args0 moduleusingimporttoplevel#2#6@reexport: syntax error GlobalRefCoreeval0j.0l0 0l0n#3#7export...0n#4#8exported_names00&0/IӸ+ + H     H.9IӸ.!I49IӸ.N 49IӸ6+9IӸ9IӸ- . J H Q.!I49IӸ. @ |!OY7.!I49IӸ9IӸ.66+3+,.!I49IӸ.N49IӸ6 +' H Q9IӸ.!I49IӸ H.#$3+( H<6(++3+,-H9IӸ H .9IӸ 9IӸ 49IӸ .!I49IӸ.N-49IӸ 6.+:.!I49IӸ.!L0 H .!L,1.!I49IӸ.!L4 @ 49IӸ49IӸ5. 49IӸ6 H @Y49IӸ373+.!I49IӸ9IӸ.6:;6<+U.!I49IӸ.!L>.!I?49IӸ.P@4z6A+U H Q9IӸ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&0/IӸ+V.9IӸ-7>/#9IӸ9IӸ>G>0qL;::00`0`20?!`00`00X#1@0> 0 0??0">:~0 0:G00& #self#e0000&0/IӸ+`. K49IӸ.9IӸ7>/#9IӸ9IӸ>G>0d"cG0000`0?00j2 ^06`0#exported_names:08X0@0> v3o0 08?0D>:~0B0:G00&0 #self#m#900importednamesfilter!00&0/IӸ+9IӸ- . J H Q9IӸ. J h. E==-- 9IӸ @  9IӸ.9IӸ 7 >/#9IӸ9IӸ+0>G>0dM::000jӾt0Z`00:0ZX#3@0>`D0 0Z??0h>:~0f0:G0b] #self#e0b0b0/IӸ0.!I49IӸ-!.!L7>/#9IӸ]>G>0SwSK::000?0<0<08000000r0rj?0v`00r:0vX#2@0>`E0 0v??0>:~00:G0~0& #self#e0V0l0~0&0/IӸ+t.vY6.!I49IӸ.N49IӸ77<>/#9IӸ9IӸ>G>0}*::00r0?0000000000ja0`00:0X#4@0>`j#0 0??0>:~00:G00& #self#e0V0|00&0/IӸ+a.!I49IӸ.N49IӸ7>/#9IӸ9IӸ+>G>06h`vf::000?#eval0jp0`00:0X0z@0>`f0 0??0>:~00:G0z0& #self#x0z00&0/IӸ0. 9IӸ9IӸ7>/#9IӸ9IӸ>G>0=kI::0YY0Y 0z0z00000 000 @__MODULE__0! !RP0g8i06IӸ Qd~n/gnu/store/00w1qad4851hkpvkzl8s3f8kn1p2w5fp-julia-reexport-1.2.2/share/julia/loadpath/Reexport/src/Reexport.jlmodule Reexport macro reexport(ex::Expr) esc(reexport(__module__, ex)) end reexport(m::Module, l::LineNumberNode) = l function reexport(m::Module, ex::Expr) # unpack any macros ex = macroexpand(m, ex) # recursively unpack any blocks if ex.head === :block return Expr(:block, map(e -> reexport(m, e), ex.args)...) end ex.head in (:module, :using, :import) || ex.head === :toplevel && all(e -> isa(e, Expr) && e.head === :using, ex.args) || error("@reexport: syntax error") eval = GlobalRef(Core, :eval) if ex.head === :module # @reexport {using, import} module Foo ... end modules = Any[ex.args[2]] ex = Expr(:toplevel, ex, :(using .$(ex.args[2]))) elseif ex.head in (:using, :import) && ex.args[1].head == :(:) # @reexport {using, import} Foo: bar, baz symbols = [e.args[end] for e in ex.args[1].args[2:end]] return Expr(:toplevel, ex, :($eval($m, Expr(:export, $symbols...)))) elseif ex.head === :import && all(e -> e.head === :., ex.args) # @reexport import Foo.bar, Baz.qux symbols = Any[e.args[end] for e in ex.args] return Expr(:toplevel, ex, :($eval($m, Expr(:export, $symbols...)))) else # @reexport using Foo, Bar, Baz modules = Any[e.args[end] for e in ex.args] end names = GlobalRef(@__MODULE__, :exported_names) out = Expr(:toplevel, ex) for mod in modules push!(out.args, :($eval($m, Expr(:export, $names($mod)...)))) end return out end exported_names(m::Module) = filter!(x -> Base.isexported(m, x), names(m; all=true, imported=true)) export @reexport end # module "))))))))entry(nameloadpathnode(type directoryentry(nameReexportnode(type directoryentry(name.githubnode(type directoryentry(name workflowsnode(type directoryentry(nameCI.ymlnode(typeregularcontentsname: CI on: pull_request: push: branches: - master tags: '*' jobs: test: name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: version: - '1.0' - '1' - nightly os: - ubuntu-latest - macOS-latest - windows-latest arch: - x64 steps: - uses: actions/checkout@v2 - uses: julia-actions/setup-julia@v1 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - uses: actions/cache@v1 env: cache-name: cache-artifacts with: path: ~/.julia/artifacts key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} restore-keys: | ${{ runner.os }}-test-${{ env.cache-name }}- ${{ runner.os }}-test- ${{ runner.os }}- - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v1 with: file: lcov.info ))entry(name TagBot.ymlnode(typeregularcontentsjname: TagBot on: issue_comment: types: - created workflow_dispatch: jobs: TagBot: if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' runs-on: ubuntu-latest steps: - uses: JuliaRegistries/TagBot@v1 with: token: ${{ secrets.GITHUB_TOKEN }} ssh: ${{ secrets.DOCUMENTER_KEY }} ))))))entry(name .gitignorenode(typeregularcontents@*.jl.cov *.jl.*.cov *.jl.mem docs/build docs/site Manifest.toml ))entry(name LICENSE.mdnode(typeregularcontentsThe Reexport.jl package is licensed under the MIT "Expat" License: > Copyright (c) 2014: Simon Kornblith. > > Permission is hereby granted, free of charge, to any person obtaining > a copy of this software and associated documentation files (the > "Software"), to deal in the Software without restriction, including > without limitation the rights to use, copy, modify, merge, publish, > distribute, sublicense, and/or sell copies of the Software, and to > permit persons to whom the Software is furnished to do so, subject to > the following conditions: > > The above copyright notice and this permission notice shall be > included in all copies or substantial portions of the Software. > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, > EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF > MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. > IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY > CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, > TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE > SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ))entry(name Project.tomlnode(typeregularcontentsname = "Reexport" uuid = "189a3867-3050-52da-a836-e630ba90ab69" authors = ["Simon Kornblith "] version = "1.2.2" [compat] julia = "1" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] test = ["Test"] ))entry(name README.mdnode(typeregularcontents # Reexport [![Build status](https://github.com/simonster/Reexport.jl/workflows/CI/badge.svg)](https://github.com/simonster/Reexport.jl/actions?query=workflow%3ACI+branch%3Amaster) ## Introduction Maybe you have a module `X` that depends on module `Y` and you want `using X` to pull in all of the symbols from `Y`. Maybe you have an outer module `A` with an inner module `B`, and you want to export all of the symbols in `B` from `A`. It would be nice to have this functionality built into Julia, but we have yet to reach an agreement on what it should look like (see [JuliaLang/julia#1986](https://github.com/JuliaLang/julia/issues/1986)). This short macro is a stopgap we have a better solution. ## Usage `@reexport using ` calls `using ` and also re-exports their symbols: ```julia module Y ... end module Z ... end module X using Reexport @reexport using Y # all of Y's exported symbols available here @reexport using Z: x, y # Z's x and y symbols available here end using X # all of Y's exported symbols and Z's x and y also available here ``` `@reexport import .` or `@reexport import : ` exports `` from `` after importing it. ```julia module Y ... end module Z ... end module X using Reexport @reexport import Y # Only `Y` itself is available here @reexport import Z: x, y # Z's x and y symbols available here end using X # Y (but not its exported names) and Z's x and y are available here. ``` `@reexport module ... end` defines `module ` and also re-exports its symbols: ```julia module A using Reexport @reexport module B ... end # all of B's exported symbols available here end using A # all of B's exported symbols available here ``` `@reexport @another_macro ` first expands `@another_macro` on the expression, making `@reexport` with other macros. `@reexport begin ... end` will apply the reexport macro to every expression in the block. ))entry(namesrcnode(type directoryentry(name Reexport.jlnode(typeregularcontentsmodule Reexport macro reexport(ex::Expr) esc(reexport(__module__, ex)) end reexport(m::Module, l::LineNumberNode) = l function reexport(m::Module, ex::Expr) # unpack any macros ex = macroexpand(m, ex) # recursively unpack any blocks if ex.head === :block return Expr(:block, map(e -> reexport(m, e), ex.args)...) end ex.head in (:module, :using, :import) || ex.head === :toplevel && all(e -> isa(e, Expr) && e.head === :using, ex.args) || error("@reexport: syntax error") eval = GlobalRef(Core, :eval) if ex.head === :module # @reexport {using, import} module Foo ... end modules = Any[ex.args[2]] ex = Expr(:toplevel, ex, :(using .$(ex.args[2]))) elseif ex.head in (:using, :import) && ex.args[1].head == :(:) # @reexport {using, import} Foo: bar, baz symbols = [e.args[end] for e in ex.args[1].args[2:end]] return Expr(:toplevel, ex, :($eval($m, Expr(:export, $symbols...)))) elseif ex.head === :import && all(e -> e.head === :., ex.args) # @reexport import Foo.bar, Baz.qux symbols = Any[e.args[end] for e in ex.args] return Expr(:toplevel, ex, :($eval($m, Expr(:export, $symbols...)))) else # @reexport using Foo, Bar, Baz modules = Any[e.args[end] for e in ex.args] end names = GlobalRef(@__MODULE__, :exported_names) out = Expr(:toplevel, ex) for mod in modules push!(out.args, :($eval($m, Expr(:export, $names($mod)...)))) end return out end exported_names(m::Module) = filter!(x -> Base.isexported(m, x), names(m; all=true, imported=true)) export @reexport end # module ))))entry(nametestnode(type directoryentry(name runtests.jlnode(typeregularcontentskusing Test module X1 using Reexport @reexport module Y1 const Z1 = 1 export Z1 end end @test union!(Set(), names(X1)) == union!(Set(), [:X1, :Y1, :Z1]) @test X1.Z1 == 1 module Y2 const Z2 = 2 export Z2 end module X2 using Reexport # Locally defined modules require a prefix for lookup in 0.7. It isn't necessary # on older versions but doesn't hurt. @reexport using Main.Y2 end @test union!(Set(), names(X2)) == union!(Set(), [:X2, :Y2, :Z2]) @test X2.Z2 == 2 module X3 using Reexport module Y3 const Z3 = 3 export Z3 end module Y4 const Z4 = 4 export Z4 end @reexport using .Y3, .Y4 end @test union!(Set(), names(X3)) == union!(Set(), [:X3, :Y3, :Y4, :Z3, :Z4]) @test X3.Z3 == 3 @test X3.Z4 == 4 module X4 using Reexport @reexport using Main.Y2 end @test union!(Set(), names(X4)) == union!(Set(), [:X4, :Y2, :Z2]) @test X4.Z2 == 2 module X5 using Reexport module Y3 const Z3 = 3 export Z3 end module Y4 const Z4 = 4 export Z4 end @reexport using .Y3, .Y4 end @test union!(Set(), names(X3)) == union!(Set(), [:X3, :Y3, :Y4, :Z3, :Z4]) @test X3.Z3 == 3 @test X3.Z4 == 4 module X6 using Reexport module Y5 const Z5 = 5 export Z5 const Z6 = 6 export Z6 end @reexport using .Y5: Z5, Z6 end @test union!(Set(), names(X6)) == union!(Set(), [:X6, :Z5, :Z6]) @test X6.Z5 == 5 @test X6.Z6 == 6 using .X6 @test Z5 == 5 @test Z6 == 6 module X7 using Reexport module Y7 struct T7 end export T7 Base.@deprecate_binding S7 T7 end @reexport using .Y7 end using .X7 @test Base.isexported(X7, :S7) #== Imports ==# module X8 using Reexport module InnerX8 const a = 1 export a end @reexport import .InnerX8: a end module X9 using Reexport module InnerX9 const a = 1 export a end @reexport import .InnerX9.a end module X10 using Reexport module InnerX10_1 const a = 1 export a end module InnerX10_2 const b = 1 export b end @reexport import .InnerX10_1.a, .InnerX10_2.b end module X11 using Reexport module InnerX11 const b = 1 export b end @reexport import .InnerX11 end @testset "import" begin @testset "Reexported colon-qualified single import" begin @test Set(names(X8)) == Set([:X8, :a]) end @testset "Reexported dot-qualified single import" begin @test Set(names(X9)) == Set([:X9, :a]) end @testset "Reexported qualified multiple import" begin @test Set(names(X10)) == Set([:X10, :a, :b]) end @testset "Reexported module import" begin @test Set(names(X11)) == Set([:X11, :InnerX11]) end end #== block ==# module X12 using Reexport @reexport begin using Main.X9 using Main.X10 end end module X13 using Reexport @reexport begin import Main.X9 import Main.X10 end end module X14 using Reexport module InnerX14 const a = 1 export a end @reexport begin import Main.X9 using Main.X10 using .InnerX14: a end end @testset "block" begin @testset "block of using" begin @test Set(names(X12)) == union(Set(names(X9)), Set(names(X10)), Set([:X12])) end @testset "block of import" begin @test Set(names(X13)) == Set([:X13, :X9, :X10]) end @testset "mixed using and import" begin @test Set(names(X14)) == union(Set([:X14, :X9, :a]), Set(names(X10))) end end #== macroexpand ==# module X15 using Reexport macro identity_macro(ex::Expr) ex end module InnerX15 const a = 1 export a end @reexport @identity_macro using .InnerX15: a end @testset "macroexpand" begin @test Set(names(X15)) == Set([:X15, :a]) end module X16 using Reexport, Test baremodule A using Reexport @reexport using Test end baremodule B using Reexport @reexport using Test: @testset end baremodule C using Reexport @reexport import Test.@test end baremodule D using Reexport # Ensure that there are no module name conflicts with Core baremodule Core end end @testset "baremodule" begin @test Base.isexported(A, Symbol("@test")) @test Reexport.exported_names(B) == [Symbol("@testset"), :B] @test Reexport.exported_names(C) == [Symbol("@test"), :C] @test Reexport.exported_names(D) == [:D] end end ))))))))entry(namepackagesnode(type directoryentry(nameReexportnode(type directoryentry(nameOxbHOnode(typesymlinktarget^/gnu/store/00w1qad4851hkpvkzl8s3f8kn1p2w5fp-julia-reexport-1.2.2/share/julia/loadpath/Reexport)))))))))))