Skip to content

Commit

Permalink
[ workaround ] Do not optimise single-alternative oneOfs, don't los…
Browse files Browse the repository at this point in the history
…e descr
  • Loading branch information
buzden committed Sep 15, 2023
1 parent 53541d0 commit 635b8eb
Show file tree
Hide file tree
Showing 81 changed files with 3,492 additions and 2,044 deletions.
2 changes: 1 addition & 1 deletion src/Deriving/DepTyCheck/Util/Reflection.idr
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ liftWeight1 = `(Data.Nat.Pos.one)

export
callOneOf : (desc : String) -> List TTImp -> TTImp
callOneOf _ [v] = v
--callOneOf _ [v] = v -- commented out to not to lose the description; uncomment back as soon as we have proper model coverage nodes
callOneOf desc variants = `(Test.DepTyCheck.Gen.oneOf {description=Just ~(primVal $ Str desc)} {em=MaybeEmpty}) .$ liftList variants

-- List of weights and subgenerators
Expand Down
10 changes: 5 additions & 5 deletions tests/derivation/core/norec nodep noext 001/expected
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ False
-----
False
-----
False
-----
False
-----
True
-----
True
-----
True
False
-----
True
-----
False
-----
False
-----
True
12 changes: 6 additions & 6 deletions tests/derivation/core/norec nodep noext 002/expected
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ X1 False
-----
X0
-----
X0
X1 True
-----
X0
-----
X1 True
-----
X1 True
X1 False
-----
X0
-----
X1 True
-----
X2 False True
X1 False
-----
X0
X1 False
-----
X2 False True
10 changes: 5 additions & 5 deletions tests/derivation/core/norec nodep w_ext 001/expected
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@
Generated values:
-----
-----
MkX "a"
-----
MkX ""
-----
MkX ""
MkX "a"
-----
MkX ""
-----
MkX ""
MkX "bc"
-----
MkX "a"
MkX ""
-----
MkX "a"
-----
Expand All @@ -22,3 +20,5 @@ MkX "a"
MkX ""
-----
MkX "a"
-----
MkX "bc"
14 changes: 7 additions & 7 deletions tests/derivation/core/norec nodep w_ext 002/expected
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
Generated values:
-----
-----
MkX "a" ""
-----
MkX "" ""
-----
MkX "" "a"
-----
MkX "a" "a"
-----
MkX "" "a"
-----
MkX "a" "bc"
MkX "" ""
-----
MkX "a" "a"
-----
MkX "" ""
-----
MkX "bc" "a"
MkX "a" ""
-----
MkX "a" "a"
MkX "a" "bc"
-----
MkX "a" ""
-----
MkX "a" "a"
14 changes: 7 additions & 7 deletions tests/derivation/core/norec nodep w_ext 003/expected
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
Generated values:
-----
-----
MkX "a" 0
-----
MkX "" 0
-----
MkX "" 10
-----
MkX "a" 10
-----
MkX "" 10
-----
MkX "a" 0
-----
MkX "" 10
-----
MkX "" 0
MkX "a" 10
-----
MkX "a" 0
-----
MkX "a" 10
-----
MkX "bc" 10
-----
MkX "a" 0
-----
MkX "a" 10
16 changes: 8 additions & 8 deletions tests/derivation/core/norec nodep w_ext 004/expected
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ Generated values:
-----
X2 0
-----
X1 "" 0
X1 "a" 10
-----
X2 10
-----
X2 10
X1 "a" 0
-----
X1 "a" 10
X1 "" 0
-----
X3 ""
X2 10
-----
X1 "bc" 10
X2 0
-----
X2 10
X1 "a" 10
-----
X2 10
X1 "bc" 10
-----
X1 "" 0
X3 "a"
8 changes: 4 additions & 4 deletions tests/derivation/core/norec nodep w_ext 006/expected
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
Generated values:
-----
-----
MkX True
-----
MkX False
-----
MkX False
MkX True
-----
MkX False
-----
Expand All @@ -19,6 +17,8 @@ MkX True
-----
MkX True
-----
MkX True
MkX False
-----
MkX True
-----
MkX False
10 changes: 5 additions & 5 deletions tests/derivation/core/norec t-..->p. noext 001/expected
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
Generated values:
-----
-----
(False ** (False ** MkX False False))
-----
(True ** (False ** MkX True False))
-----
(False ** (False ** MkX False False))
-----
(False ** (True ** MkX False True))
(True ** (True ** MkX True True))
-----
(True ** (True ** MkX True True))
-----
(True ** (True ** MkX True True))
-----
(False ** (True ** MkX False True))
(False ** (False ** MkX False False))
-----
(True ** (False ** MkX True False))
-----
(False ** (True ** MkX False True))
(True ** (True ** MkX True True))
-----
(False ** (False ** MkX False False))
-----
(True ** (True ** MkX True True))
14 changes: 7 additions & 7 deletions tests/derivation/core/norec t-..->p. noext 002/expected
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ Generated values:
-----
(False ** (False ** X1))
-----
(False ** (True ** X0 False True))
(False ** (True ** X1))
-----
(False ** (False ** X1))
-----
(True ** (True ** X1))
-----
(True ** (False ** X1))
(True ** (True ** X0 True True))
-----
(False ** (False ** X1))
(True ** (True ** X0 True True))
-----
(False ** (False ** X1))
-----
(True ** (True ** X1))
-----
(False ** (True ** X1))
-----
(False ** (True ** X0 False True))
(True ** (True ** X0 True True))
-----
(False ** (True ** X1))
(False ** (False ** X0 False False))
34 changes: 17 additions & 17 deletions tests/derivation/core/norec t-p.->.. noext 002/expected
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,22 @@ X0 True False
-----
X0 True False
-----
X0 True False
-----
X0 True False
-----
X1
-----
X1
-----
X1
X0 True False
-----
X1
-----
X1
X0 True False
-----
X0 True False
-----
X1
-----
X0 True True
-----
X0 True True
X1
-----
X0 True True
-----
Expand All @@ -38,18 +34,18 @@ X1
-----
X1
-----
X1
X0 True True
-----
X1
-----
X1
X0 True True
-----
X0 True True
-----
X1
-----
X0 False True
-----
X0 False True
X1
-----
X0 False True
-----
Expand All @@ -59,18 +55,18 @@ X1
-----
X1
-----
X1
X0 False True
-----
X1
-----
X1
X0 False True
-----
X0 False True
-----
X1
-----
X0 False False
-----
X0 False False
X1
-----
X0 False False
-----
Expand All @@ -80,8 +76,12 @@ X1
-----
X1
-----
X1
X0 False False
-----
X1
-----
X0 False False
-----
X0 False False
-----
X1
Loading

0 comments on commit 635b8eb

Please sign in to comment.