@@ -112,13 +112,13 @@ rebracket externs modules = do
112 renameAliasedOperators valueAliased typeAliased (Module ss coms mn ds exts) =
112 renameAliasedOperators valueAliased typeAliased (Module ss coms mn ds exts) =
113 Module ss coms mn <$> mapM f' ds <*> pure exts
113 Module ss coms mn <$> mapM f' ds <*> pure exts
115− (goDecl', goExpr') = updateTypes goType
115+ (goDecl', goExpr', goBinder') = updateTypes goType
116 (f', _, _, _, _) =
116 (f', _, _, _, _) =
117 everywhereWithContextOnValuesM
117 everywhereWithContextOnValuesM
119 (\pos -> uncurry goDecl <=< goDecl' pos)
119 (\pos -> uncurry goDecl <=< goDecl' pos)
120 (\pos -> uncurry goExpr <=< goExpr' pos)
120 (\pos -> uncurry goExpr <=< goExpr' pos)
121− goBinder
121+ (\pos -> uncurry goBinder <=< goBinder' pos)
@@ -182,9 +182,9 @@ rebracketModule valueOpTable typeOpTable (Module ss coms mn ds exts) =
182 everywhereOnValuesTopDownM
182 everywhereOnValuesTopDownM
183 (decontextify goDecl)
183 (decontextify goDecl)
184 (goExpr <=< decontextify goExpr')
184 (goExpr <=< decontextify goExpr')
185− goBinder
185+ (goBinder <=< decontextify goBinder')
187− (goDecl, goExpr') = updateTypes (const goType)
187+ (goDecl, goExpr', goBinder') = updateTypes (const goType)
189 goExpr :: Expr -> m Expr
189 goExpr :: Expr -> m Expr
190 goExpr = return . matchExprOperators valueOpTable
190 goExpr = return . matchExprOperators valueOpTable
@@ -205,9 +205,9 @@ removeParens = f
205 everywhereOnValues
205 everywhereOnValues
206 (decontextify goDecl)
206 (decontextify goDecl)
207 (goExpr . decontextify goExpr')
207 (goExpr . decontextify goExpr')
208− goBinder
208+ (goBinder . decontextify goBinder')
210− (goDecl, goExpr') = updateTypes (\_ -> return . goType)
210+ (goDecl, goExpr', goBinder') = updateTypes (\_ -> return . goType)
212 goExpr :: Expr -> Expr
212 goExpr :: Expr -> Expr
213 goExpr (Parens val) = val
213 goExpr (Parens val) = val
@@ -294,10 +294,11 @@ updateTypes
294 :: forall m
294 :: forall m
295 . Monad m
295 . Monad m
296 => (Maybe SourceSpan -> Type -> m Type)
296 => (Maybe SourceSpan -> Type -> m Type)
297− -> ( Maybe SourceSpan -> Declaration -> m (Maybe SourceSpan, Declaration)
297+ -> ( Maybe SourceSpan -> Declaration -> m (Maybe SourceSpan, Declaration)
298− , Maybe SourceSpan -> Expr -> m (Maybe SourceSpan, Expr)
298+ , Maybe SourceSpan -> Expr -> m (Maybe SourceSpan, Expr)
299+ , Maybe SourceSpan -> Binder -> m (Maybe SourceSpan, Binder)
300−updateTypes goType = (goDecl, goExpr)
301+updateTypes goType = (goDecl, goExpr, goBinder)
303 goType' :: Maybe SourceSpan -> Type -> m Type
304 goType' :: Maybe SourceSpan -> Type -> m Type
@@ -339,6 +340,13 @@ updateTypes goType = (goDecl, goExpr)
339 return (pos, TypedValue check v ty')
340 return (pos, TypedValue check v ty')
340 goExpr pos other = return (pos, other)
341 goExpr pos other = return (pos, other)
343+ goBinder :: Maybe SourceSpan -> Binder -> m (Maybe SourceSpan, Binder)
344+ goBinder _ e@(PositionedBinder pos _ _) = return (Just pos, e)
345+ goBinder pos (TypedBinder ty b) = do
346+ ty' <- goType' pos ty
347+ return (pos, TypedBinder ty' b)
348+ goBinder pos other = return (pos, other)
343-- Checks all the fixity exports within a module to ensure that members aliased
351-- Checks all the fixity exports within a module to ensure that members aliased
344-- by the operators are also exported from the module.
352-- by the operators are also exported from the module.