@@ -112,13 +112,13 @@ rebracket externs modules = do
112112 renameAliasedOperators valueAliased typeAliased (Module ss coms mn ds exts) =
113113 Module ss coms mn <$> mapM f' ds <*> pure exts
114114 where
115− (goDecl', goExpr') = updateTypes goType
115+ (goDecl', goExpr', goBinder') = updateTypes goType
116116 (f', _, _, _, _) =
117117 everywhereWithContextOnValuesM
118118 Nothing
119119 (\pos -> uncurry goDecl <=< goDecl' pos)
120120 (\pos -> uncurry goExpr <=< goExpr' pos)
121− goBinder
121+ (\pos -> uncurry goBinder <=< goBinder' pos)
122122 defS
123123 defS
124124
@@ -182,9 +182,9 @@ rebracketModule valueOpTable typeOpTable (Module ss coms mn ds exts) =
182182 everywhereOnValuesTopDownM
183183 (decontextify goDecl)
184184 (goExpr <=< decontextify goExpr')
185− goBinder
185+ (goBinder <=< decontextify goBinder')
186186
187− (goDecl, goExpr') = updateTypes (const goType)
187+ (goDecl, goExpr', goBinder') = updateTypes (const goType)
188188
189189 goExpr :: Expr -> m Expr
190190 goExpr = return . matchExprOperators valueOpTable
@@ -205,9 +205,9 @@ removeParens = f
205205 everywhereOnValues
206206 (decontextify goDecl)
207207 (goExpr . decontextify goExpr')
208− goBinder
208+ (goBinder . decontextify goBinder')
209209
210− (goDecl, goExpr') = updateTypes (\_ -> return . goType)
210+ (goDecl, goExpr', goBinder') = updateTypes (\_ -> return . goType)
211211
212212 goExpr :: Expr -> Expr
213213 goExpr (Parens val) = val
@@ -294,10 +294,11 @@ updateTypes
294294 :: forall m
295295 . Monad m
296296 => (Maybe SourceSpan -> Type -> m Type)
297− -> ( Maybe SourceSpan -> Declaration -> m (Maybe SourceSpan, Declaration)
298− , Maybe SourceSpan -> Expr -> m (Maybe SourceSpan, Expr)
297+ -> ( Maybe SourceSpan -> Declaration -> m (Maybe SourceSpan, Declaration)
298+ , Maybe SourceSpan -> Expr -> m (Maybe SourceSpan, Expr)
299+ , Maybe SourceSpan -> Binder -> m (Maybe SourceSpan, Binder)
299300 )
300−updateTypes goType = (goDecl, goExpr)
301+updateTypes goType = (goDecl, goExpr, goBinder)
301302 where
302303
303304 goType' :: Maybe SourceSpan -> Type -> m Type
@@ -339,6 +340,13 @@ updateTypes goType = (goDecl, goExpr)
339340 return (pos, TypedValue check v ty')
340341 goExpr pos other = return (pos, other)
341342
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)
349+
342350-- |
343351-- Checks all the fixity exports within a module to ensure that members aliased
344352-- by the operators are also exported from the module.