-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Document some guarantees that should be provided by isequal
#34798
Conversation
986351d
to
a9b34bb
Compare
0aec17a
to
e5186ad
Compare
I addressed the review comments, and added a examples of |
e5186ad
to
1189869
Compare
Thanks everyone - though I feel like I had got more things wrong than I got right! |
Is it OK to merge this? |
Test whether `x` is less than `y`, according to a fixed total order. | ||
`isless` is not defined on all pairs of values `(x, y)`. However, if it | ||
Test whether `x` is less than `y`, according to a fixed total order (defined together with | ||
[`isequal`](@ref)). `isless` is not defined on all pairs of values `(x, y)`. However, if it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this addition feels redundant to me with the first bullet point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to sneak in a @ref
, mostly. I could revert it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could add the @ref
to the first bullet point instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I need to ref just isequal
don't I? I can't add a link to inside a code snippet/block - I need to wrap an entire snippet. Or is the @ref
thing actually smart enough to know I'm referring to just the function, like ?
at the REPL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to get this one in. What remains to be done? |
Test whether `x` is less than `y`, according to a fixed total order. | ||
`isless` is not defined on all pairs of values `(x, y)`. However, if it | ||
Test whether `x` is less than `y`, according to a fixed total order (defined together with | ||
[`isequal`](@ref)). `isless` is not defined on all pairs of values `(x, y)`. However, if it | ||
is defined, it is expected to satisfy the following: | ||
- If `isless(x, y)` is defined, then so is `isless(y, x)` and `isequal(x, y)`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe like so?
- If `isless(x, y)` is defined, then so is `isless(y, x)` and `isequal(x, y)`, | |
- If `isless(x, y)` is defined, then so is `isless(y, x)` and [`isequal(x, y)`](@ref isequal), |
I tried to test whether this works as intended, but make html
keeps failing:
...
[ Info: CrossReferences: building cross-references.
┌ Warning: reference for 'Inner-Constructor-Methods' could not be found in src/base/base.md.
└ @ Documenter.CrossReferences ~/Projects/julia/doc/deps/packages/Documenter/QQWIJ/src/CrossReferences.jl:104
┌ Warning: no doc found for reference '[`GetLastError`](@ref)' in src/base/c.md.
└ @ Documenter.CrossReferences ~/Projects/julia/doc/deps/packages/Documenter/QQWIJ/src/CrossReferences.jl:160
┌ Warning: no doc found for reference '[`errno`](@ref)' in src/base/c.md.
└ @ Documenter.CrossReferences ~/Projects/julia/doc/deps/packages/Documenter/QQWIJ/src/CrossReferences.jl:160
┌ Warning: no doc found for reference '[`@NamedTuple`](@ref)' in src/manual/types.md.
└ @ Documenter.CrossReferences ~/Projects/julia/doc/deps/packages/Documenter/QQWIJ/src/CrossReferences.jl:160
┌ Warning: no doc found for reference '[`StackTraces.lookup`](@ref)' in src/manual/stacktraces.md.
└ @ Documenter.CrossReferences ~/Projects/julia/doc/deps/packages/Documenter/QQWIJ/src/CrossReferences.jl:160
┌ Warning: no doc found for reference '[`mean`](@ref)' in src/manual/interfaces.md.
└ @ Documenter.CrossReferences ~/Projects/julia/doc/deps/packages/Documenter/QQWIJ/src/CrossReferences.jl:160
┌ Warning: no doc found for reference '[`std`](@ref)' in src/manual/interfaces.md.
└ @ Documenter.CrossReferences ~/Projects/julia/doc/deps/packages/Documenter/QQWIJ/src/CrossReferences.jl:160
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
ERROR: LoadError: `makedocs` encountered errors. Terminating build
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] runner(::Type{Documenter.Builder.RenderDocument}, ::Documenter.Documents.Document) at /Users/jonas/Projects/julia/doc/deps/packages/Documenter/QQWIJ/src/Builder.jl:242
[3] dispatch(::Type{Documenter.Builder.DocumentPipeline}, ::Documenter.Documents.Document) at /Users/jonas/Projects/julia/doc/deps/packages/Documenter/QQWIJ/src/Utilities/Selectors.jl:167
[4] #2 at /Users/jonas/Projects/julia/doc/deps/packages/Documenter/QQWIJ/src/Documenter.jl:237 [inlined]
[5] cd(::Documenter.var"##2#3"{Documenter.Documents.Document}, ::String) at ./file.jl:104
[6] #makedocs#1 at /Users/jonas/Projects/julia/doc/deps/packages/Documenter/QQWIJ/src/Documenter.jl:236 [inlined]
[7] (::Documenter.var"#kw##makedocs")(::NamedTuple{(:build, :modules, :clean, :doctest, :linkcheck, :linkcheck_ignore, :strict, :checkdocs, :format, :sitename, :authors, :pages),Tuple{String,Array{Module,1},Bool,Bool,Bool,Array{String,1},Bool,Symbol,Documenter.Writers.HTMLWriter.HTML,String,String,Array{Any,1}}}, ::typeof(makedocs)) at /Users/jonas/Projects/julia/doc/deps/packages/Documenter/QQWIJ/src/Documenter.jl:235
[8] top-level scope at /Users/jonas/Projects/julia/doc/make.jl:183
[9] include(::Module, ::String) at ./Base.jl:377
[10] exec_options(::Base.JLOptions) at ./client.jl:297
[11] _start() at ./client.jl:493
in expression starting at /Users/jonas/Projects/julia/doc/make.jl:183
make: *** [html] Error 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems right. I don't know what those errors mean, since it seems like they are happening elsewhere.
Some documentation additions to
isequal
following the discussion at #34744 (comment).