Skip to content

Commit

Permalink
Fix up bool pattern matching
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPenner committed Dec 2, 2024
1 parent 845833c commit 17531ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unison-runtime/src/Unison/Runtime/Stack.hs
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ matchBoolVal = \case
pattern BoolVal :: Bool -> Val
pattern BoolVal b <- (matchBoolVal -> Just b)
where
BoolVal b = if b then (BoxedVal (Enum Ty.booleanRef TT.trueTag)) else (BoxedVal (Enum Ty.booleanRef TT.trueTag))
BoolVal b = if b then trueVal else falseVal

-- Define singletons we can use for the bools to prevent allocation where possible.
falseVal :: Val
Expand Down

0 comments on commit 17531ab

Please sign in to comment.