git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Add some TODOs for polymorphic typed binders
880de6eBenjamin Kovach
src/Language/PureScript/Parser/Declarations.hs+1
@@ -527,6 +527,7 @@ parseBinder = withSourceSpan PositionedBinder (P.buildExpressionParser operators
527 where
527 where
528 -- TODO: remove this deprecation warning in 0.8
528 -- TODO: remove this deprecation warning in 0.8
529 operators = [ [ P.Infix (P.try $ C.indented *> colon *> featureWasRemoved "Cons binders are no longer supported. Consider using purescript-lists or purescript-sequences instead.") P.AssocRight ] ]
529 operators = [ [ P.Infix (P.try $ C.indented *> colon *> featureWasRemoved "Cons binders are no longer supported. Consider using purescript-lists or purescript-sequences instead.") P.AssocRight ] ]
530+ -- TODO: parsePolyType when adding support for polymorphic types
530 postfixTable = [ \b -> flip TypedBinder b <$> (P.try (indented *> doubleColon) *> parseType)
531 postfixTable = [ \b -> flip TypedBinder b <$> (P.try (indented *> doubleColon) *> parseType)
531 ]
532 ]
532 parseBinderAtom :: TokenParser Binder
533 parseBinderAtom :: TokenParser Binder
src/Language/PureScript/TypeChecker/Types.hs+2
@@ -370,6 +370,8 @@ inferBinder val (NamedBinder name binder) = do
370 return $ M.insert name val m
370 return $ M.insert name val m
371inferBinder val (PositionedBinder pos _ binder) =
371inferBinder val (PositionedBinder pos _ binder) =
372 warnAndRethrowWithPosition pos $ inferBinder val binder
372 warnAndRethrowWithPosition pos $ inferBinder val binder
373+-- TODO: When adding support for polymorphic types, check subsumption here
374+-- and change the definition of `binderRequiresMonotype`
373inferBinder val (TypedBinder ty binder) = val =?= ty >> inferBinder val binder
375inferBinder val (TypedBinder ty binder) = val =?= ty >> inferBinder val binder
374
376
375-- | Returns true if a binder requires its argument type to be a monotype.
377-- | Returns true if a binder requires its argument type to be a monotype.