File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
unison-runtime/tests/Unison/Test Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ import Unison.Util.Text qualified as Unison.Text
17
17
genSmallWord64 :: Gen Word64
18
18
genSmallWord64 = Gen. word64 (Range. linear 0 100 )
19
19
20
+ genBool :: Gen Bool
21
+ genBool = Gen. choice [pure False , pure True ]
22
+
20
23
genSmallInt :: Gen Int
21
24
genSmallInt = Gen. int (Range. linear 0 100 )
22
25
Original file line number Diff line number Diff line change @@ -83,6 +83,8 @@ denormalize (TLet _ v _ bn bo)
83
83
where
84
84
dbn = denormalize bn
85
85
dbo = denormalize bo
86
+ denormalize (TLets {}) =
87
+ error " can't denormalize non-unary let bindings"
86
88
denormalize (TName _ _ _ _) =
87
89
error " can't denormalize by-name bindings"
88
90
denormalize (TMatch v cs) =
@@ -106,7 +108,8 @@ denormalize (TApp f args) = Term.apps' df (Term.var () <$> args)
106
108
denormalize (TFrc _) = error " denormalize TFrc"
107
109
denormalize (TDiscard _) = error " denormalize TDiscard"
108
110
denormalize (TLocal _ _) = error " denormalize TLocal"
109
- denormalize (TUpdate _ _) = error " denormalize TUpdate"
111
+ denormalize (TUpdate _ _ _) = error " denormalize TUpdate"
112
+ denormalize (TAbs _ _) = error " denormalize TAbs"
110
113
111
114
denormalizeRef :: RTag -> Reference
112
115
denormalizeRef r
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ genInstr =
113
113
[ Prim1 <$> genPrim1 <*> genSmallInt,
114
114
Prim2 <$> genPrim2 <*> genSmallInt <*> genSmallInt,
115
115
ForeignCall <$> Gen. bool <*> genForeignCall <*> genArgs,
116
- SetAff <$> genSmallInt <*> genSmallInt,
116
+ SetAff <$> genBool <*> genSmallInt <*> genSmallInt,
117
117
Capture <$> genSmallWord64,
118
118
Name <$> genGRef <*> genArgs,
119
119
Info <$> Gen. string (Range. linear 0 10 ) Gen. alphaNum,
@@ -175,6 +175,8 @@ genStoredCache =
175
175
<$> (genEnumMap genSmallWord64 genCombs)
176
176
<*> (genEnumMap genSmallWord64 genReference)
177
177
<*> (genEnumSet genSmallWord64)
178
+ -- don't generate inlining info for reasons below
179
+ <*> pure (mempty , mempty )
178
180
<*> (genEnumMap genSmallWord64 genReference)
179
181
<*> genSmallWord64
180
182
<*> genSmallWord64
You can’t perform that action at this time.
0 commit comments