Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a convenient wrapper for GAP.Globals.Read(GapObj(joinpath(@__DIR__, "..", "gap", "exec.g"))) etc #940

Open
fingolfin opened this issue Sep 18, 2023 · 0 comments
Labels
kind: enhancement New feature or request

Comments

@fingolfin
Copy link
Member

Julia code that wishes to read specific GAP files akin to Julia's include command currently has to use code like this:

GAP.Globals.Read(GapObj(joinpath(@__DIR__, "..", "gap", "exec.g")))

That's a bit unwieldy. Perhaps we should add a macro that makes this nice, like

GAP.@include("../gap/exec.g")

(similar to how we'd do include("../gap/exec.jl") if it was a Julia file instead).

The reason why I think it needs to be a macro is that include is special in so far as that Julia creates a new method for it in each new module, which has a "pointer" to that module, and so can e.g. compute paths relative to that module's source location. Our code doesn't have that ability, unless it uses a macro.

@fingolfin fingolfin added the kind: enhancement New feature or request label Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant