git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge branch 'master' into nostatements
commit8302da983f3a09407826ba1aaa2efec56c153961 authorPhil Freeman <paf31@cantab.net> dateWed 12 Feb 2014, 16:44 (13 years ago) parent197ce89e384610
2 files changed+11−3
examples/passing/InferRecFunWithConstrainedArgument.purs+8 src/Language/PureScript/TypeChecker/Types.hs+3−3
examples/passing/InferRecFunWithConstrainedArgument.pursnew file+8
@@ -0,0 +1,8 @@
1+module Main where
2+
3+import Prelude
4+
5+test 100 = 100
6+test n = test(1 + n)
7+
8+main = Trace.print $ test 0
src/Language/PureScript/TypeChecker/Types.hs+3−3
@@ -869,9 +869,9 @@ checkFunctionApplication' fn (ForAll ident ty _) arg = do
869869 checkFunctionApplication fn replaced arg
870870checkFunctionApplication' fn u@(TUnknown _) arg = do
871871 arg' <- do
872− TypedValue _ v t <- infer arg
873− (v', t') <- instantiatePolyTypeWithUnknowns arg t
874− return $ TypedValue True v' t'
872+ TypedValue _ arg' t <- infer arg
873+ (arg'', t') <- instantiatePolyTypeWithUnknowns arg' t
874+ return $ TypedValue True arg'' t'
875875 let ty = (\(TypedValue _ _ t) -> t) arg'
876876 ret <- fresh
877877 u =?= function ty ret