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 ae51fe0 commit d513933Copy full SHA for d513933
src/Nix/Type/Infer.hs
@@ -257,9 +257,8 @@ inferType env ex = do
257
258
-- | Solve for the toplevel type of an expression in a given environment
259
inferExpr :: Env -> NExpr -> Either InferError [Scheme]
260
-inferExpr env ex = case runInfer (inferType env ex) of
261
- Left err -> Left err
262
- Right xs -> Right $ fmap (\(subst, ty) -> closeOver (subst `apply` ty)) xs
+inferExpr env ex =
+ (fmap . fmap) (\(subst, ty) -> closeOver (subst `apply` ty)) $ runInfer $ inferType env ex
263
264
-- | Canonicalize and return the polymorphic toplevel type.
265
closeOver :: Type -> Scheme
0 commit comments