@@ -585,7 +585,8 @@ inferLetBinding seen [] ret j = (,) seen <$> j ret
585inferLetBinding seen (ValueDeclaration ident nameKind [] Nothing val : rest) ret j = do
585inferLetBinding seen (ValueDeclaration ident nameKind [] Nothing val : rest) ret j = do
586 valTy <- fresh
586 valTy <- fresh
587 Just moduleName <- checkCurrentModule <$> get
587 Just moduleName <- checkCurrentModule <$> get
588− TypedValue _ val' valTy' <- bindNames (M.singleton (moduleName, ident) (valTy, nameKind)) $ infer val
588+ let dict = if isFunction val then M.singleton (moduleName, ident) (valTy, nameKind) else M.empty
589+ TypedValue _ val' valTy' <- bindNames dict $ infer val
589 valTy =?= valTy'
590 valTy =?= valTy'
590 bindNames (M.singleton (moduleName, ident) (valTy', nameKind)) $ inferLetBinding (seen ++ [ValueDeclaration ident nameKind [] Nothing val']) rest ret j
591 bindNames (M.singleton (moduleName, ident) (valTy', nameKind)) $ inferLetBinding (seen ++ [ValueDeclaration ident nameKind [] Nothing val']) rest ret j
591inferLetBinding seen (BindingGroupDeclaration ds : rest) ret j = do
592inferLetBinding seen (BindingGroupDeclaration ds : rest) ret j = do