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

extend the julia_to_gap documentation #824

Merged
merged 2 commits into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/JuliaInterface/gap/convert.gd
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
#! <Item>strings</Item>
#! </Row>
#! <Row>
#! <Item>Symbol</Item>
#! <Item><C>Symbol</C></Item>
#! <Item><C>IsString</C></Item>
#! <Item>strings</Item>
#! </Row>
Expand Down
18 changes: 18 additions & 0 deletions src/julia_to_gap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,24 @@ julia> GAP.julia_to_gap([ [1, 2], [3, 4]], recursive = true)
GAP: [ [ 1, 2 ], [ 3, 4 ] ]

```

The following `julia_to_gap` conversions are supported by GAP.jl.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the other direction? Are we actually "symmetric" in what we support? Might be good to state, too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, of course the other direction makes sense. If you think the current proposal is more or less o.k. for julia_to_gap then I will update it to include also the other direction.

(Other Julia packages may provide conversions for more Julia objects.)

| Julia type | GAP filter |
|--------------------------------------|------------|
| `Int8`, `Int16`, ..., `BigInt` | `IsInt` |
| `GapFFE` | `IsFFE` |
| `Bool` | `IsBool` |
| `Rational{T}` | `IsRat` |
| `Float16`, `Float32`, `Float64` | `IsFloat` |
| `AbstractString` | `IsString` |
| `Symbol` | `IsString` |
| `Vector{T}` | `IsList` |
| `Vector{Bool}`, `BitVector` | `IsBList` |
| `Tuple{T}` | `IsList` |
| `Dict{String, T}`, `Dict{Symbol, T}` | `IsRecord` |
| `UnitRange{T}`, `StepRange{T}` | `IsRange` |
"""
julia_to_gap(x::FFE) = x # Default for actual GAP objects is to do nothing
julia_to_gap(x::Bool) = x # Default for actual GAP objects is to do nothing
Expand Down