Skip to content

Commit aeecbec

Browse files
authored
Doc updates (#43)
* Test and update doc (@example) * test doc * Update doc to debug DocumenterVitePress
1 parent 9d0a9da commit aeecbec

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

src/Constraints.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ include("constraint.jl")
3838
## SECTION - Usual constraints (based on and including XCSP3-core categories)
3939
include("usual_constraints.jl")
4040

41-
# SECTION - Generic Constraints: intension, extension
42-
include("constraints/intension.jl")
41+
# SECTION - Generic Constraints: intention, extension
42+
include("constraints/intention.jl")
4343
include("constraints/extension.jl")
4444

4545
# SECTION - Constraints defined from Languages

src/constraints/intension.jl renamed to src/constraints/intention.jl

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,27 @@ concept(:dist_different)(x)
2323
```
2424
2525
# Examples
26-
```julia
26+
27+
````@example debug2
28+
2 + 2
29+
````
30+
31+
```@example debug1
32+
2 + 2
33+
```
34+
35+
```@example intention1
36+
using Constraints # hide
2737
c = concept(:dist_different)
28-
c([1, 2, 3, 3]) # true
29-
c([1, 2, 3, 4]) # false
38+
c([1, 2, 3, 3]) && !c([1, 2, 3, 4])
3039
```
40+
41+
````@example intention2
42+
using Constraints # hide
43+
c = concept(:dist_different)
44+
c([1, 2, 3, 3]) && !c([1, 2, 3, 4])
45+
````
46+
3147
"""
3248
xcsp_intension(; list, predicate) = predicate(list)
3349

src/usual_constraints.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ concept(:all_different, [1, 2, 3])
225225
```
226226
"""
227227
concept(s::Symbol, args...; kargs...) = concept(USUAL_CONSTRAINTS[s])(args...; kargs...)
228+
concept(s::Symbol) = concept(USUAL_CONSTRAINTS[s])
228229

229230
## SECTION - Test Items
230231
@testitem "Usual constraints" tags = [:usual, :constraints] default_imports = false begin

0 commit comments

Comments
 (0)