Jeffrey Rosenbluth
0a669431c2
Fix issue #34
2017-01-01 12:32:18 -07:00
Stephen Diehl
d5b2af46fd
spelling
2015-12-22 13:27:34 -05:00
Stephen Diehl
8b91de803d
poly constraint generator solver
2015-12-22 12:55:45 -05:00
Stephen Diehl
480252bf0e
rework poly directory
2015-12-22 12:52:10 -05:00
Stephen Diehl
51d32c6f89
update poly implementation to use stack
2015-12-11 11:48:26 -05:00
Stephen Diehl
dcad87a9fb
add test output
2015-01-28 09:51:29 -05:00
Stephen Diehl
53f1e5c7b3
should_fail
2015-01-28 09:48:51 -05:00
Stephen Diehl
710d1c8905
added failure cases for poly
2015-01-28 09:31:19 -05:00
Stephen Diehl
efae2ed8bb
Merge pull request #44 from chsievers/text
...
Text
2015-01-28 09:10:42 -05:00
Christian Sievers
8b7669e5f0
poly{,_constraints}: simplify normalize
...
Local function fv doesn't need its first argument.
BTW, the versions in poly and poly_constraints differ in their
usage of fmap vs. map.
2015-01-22 14:38:31 +01:00
Christian Sievers
f36dae83ba
poly{,_constraints}: s/the the/the/ in error msg
2015-01-20 22:27:43 +01:00
Christian Sievers
1f43ad3e1b
poly: fix type inference
...
inferPrim has to apply the substitution when calling unify.
Test case:
\f n -> if True then n else (f (n+1))
2015-01-20 21:02:31 +01:00
Christian Sievers
9096471580
poly: factored out common code in infer
2015-01-20 08:46:23 +01:00
Christian Sievers
7f589b1c48
poly: fix type inference for If, Fix and Op cases in a uniform way
2015-01-20 07:26:17 +01:00
Christian Sievers
8af47fc101
poly: fix composition order of substitutions in Let case
2015-01-20 07:24:12 +01:00
Stephen Diehl
43a97a69fb
attoparsec and operators
2015-01-19 10:45:58 -05:00
Stephen Diehl
04dbc4085c
added test case
2015-01-18 19:31:58 -05:00
Stephen Diehl
165d264ad8
explicit inlining of pull request #33
2015-01-18 19:24:09 -05:00
Christian Sievers
448c75be0a
Fix type inference in poly.
...
Fixes type checking error in these examples:
Poly> (\x -> if x then x else (x+1))
<<closure>> : Int -> Int
(shouldn't type check)
Poly> (\x -> fix (x 0))
<<closure>> : forall a b. a -> b
(should give forall a. (Int -> a -> a) -> a)
Instead of finding out how to correctly infer types for the
If, Fix and Op cases, this fix delegates to the App case.
2015-01-18 15:13:11 +01:00
Stephen Diehl
07ae2b3c8b
PolyML -> Poly
2015-01-07 14:26:12 -05:00
Stephen Diehl
9241ebe43c
initial commit
2015-01-05 02:54:15 -05:00