We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfe790a commit ae51fe0Copy full SHA for ae51fe0
src/Nix/Type/Infer.hs
@@ -294,13 +294,13 @@ generalize free t = Forall as t
294
as = Set.toList $ ftv t `Set.difference` free
295
296
unops :: Type -> NUnaryOp -> [Constraint]
297
-unops u1 = \case
298
- NNot -> [EqConst u1 (typeFun [typeBool, typeBool])]
299
- NNeg ->
300
- [ EqConst
301
- u1
302
- (TMany [typeFun [typeInt, typeInt], typeFun [typeFloat, typeFloat]])
303
- ]
+unops u1 op =
+ [ EqConst u1
+ (case op of
+ NNot -> typeFun [typeBool , typeBool ]
+ NNeg -> TMany [typeFun [typeInt, typeInt], typeFun [typeFloat, typeFloat]]
+ )
+ ]
304
305
binops :: Type -> NBinaryOp -> [Constraint]
306
binops u1 = \case
0 commit comments