Skip to content

Commit

Permalink
remove/soften "experimental" warnings
Browse files Browse the repository at this point in the history
- Elements() and Properties() aren't experimental anymore
- getall and setall docstring made more concrete
  • Loading branch information
aplavin committed Jan 6, 2024
1 parent d5bf87b commit de35100
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/getsetall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Extract all parts of `obj` that are selected by `optic`.
Returns a flat `Tuple` of values, or an `AbstractVector` if the selected parts contain arrays.
This function is experimental and we might change the precise output container in the future.
The details of `getall` behavior are consireded experimental: in particular, the precise output container type might change in the future.
See also [`setall`](@ref).
Expand All @@ -29,7 +29,7 @@ function getall end
Replace a part of `obj` that is selected by `optic` with `values`.
The `values` collection should have the same number of elements as selected by `optic`.
This function is experimental and might change in the future.
The details of `setall` behavior are consireded experimental: in particular, supported container types for the `values` argument might change in the future.
See also [`getall`](@ref), [`set`](@ref). The former is dual to `setall`:
Expand Down
5 changes: 1 addition & 4 deletions src/optics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ using CompositionsBase
using Base: getproperty
using Base

const EXPERIMENTAL = """This function/method/type is experimental. It can be changed or deleted at any point without warning"""
const EXPERIMENTAL = """This function/type is experimental. It can be changed or deleted at any point without warning"""

"""
modify(f, obj, optic)
Expand Down Expand Up @@ -223,7 +223,6 @@ julia> set(obj, Elements(), 0)
julia> modify(x -> 2x, obj, Elements())
(2, 4, 6)
```
$EXPERIMENTAL
"""
struct Elements end
OpticStyle(::Type{<:Elements}) = ModifyBased()
Expand Down Expand Up @@ -313,8 +312,6 @@ julia> modify(x -> 2x, obj, Properties())
(a = 2, b = 4, c = 6)
```
Based on [`mapproperties`](@ref).
$EXPERIMENTAL
"""
struct Properties end
OpticStyle(::Type{<:Properties}) = ModifyBased()
Expand Down

0 comments on commit de35100

Please sign in to comment.