git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Add some TODOs for polymorphic typed binders
commit880de6eb4d5552a857a9747f8d72f622728631b7 authorBenjamin Kovach <bkovach5@uga.edu> dateThu 15 Oct 2015, 21:19 (11 years ago) parentbb853e2
2 files changed+3
src/Language/PureScript/Parser/Declarations.hs+1 src/Language/PureScript/TypeChecker/Types.hs+2
src/Language/PureScript/Parser/Declarations.hs+1
@@ -527,6 +527,7 @@ parseBinder = withSourceSpan PositionedBinder (P.buildExpressionParser operators
527527 where
528528 -- TODO: remove this deprecation warning in 0.8
529529 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
530531 postfixTable = [ \b -> flip TypedBinder b <$> (P.try (indented *> doubleColon) *> parseType)
531532 ]
532533 parseBinderAtom :: TokenParser Binder
src/Language/PureScript/TypeChecker/Types.hs+2
@@ -370,6 +370,8 @@ inferBinder val (NamedBinder name binder) = do
370370 return $ M.insert name val m
371371inferBinder val (PositionedBinder pos _ binder) =
372372 warnAndRethrowWithPosition pos $ inferBinder val binder
373+-- TODO: When adding support for polymorphic types, check subsumption here
374+-- and change the definition of `binderRequiresMonotype`
373375inferBinder val (TypedBinder ty binder) = val =?= ty >> inferBinder val binder
374376
375377-- | Returns true if a binder requires its argument type to be a monotype.