on master help sign in
Update tests to cover the bugs that got reported leading up to 0.9
fbad8eaEvan Czaplicki
tests/good/AliasSubstitution.elmnew file+6
@@ -0,0 +1,6 @@
1+
2+type Vec2Ext a = { a | x:Float, y:Float }
3+type Vec2 = Vec2Ext {}
4+
5+extractVec : Vec2Ext a -> Vec2
6+extractVec v = { x = v.x, y = v.y }
tests/good/Apply.elmdeleted−3
@@ -1,3 +0,0 @@
1−let apply f x = f x
2− id x = x
3− in apply id (apply id (apply id (apply id (apply id (apply id 4)))))
tests/good/Soundness.elmdeleted−8
@@ -1,8 +0,0 @@
1−
2−trickyID x = let y = x in y
3−
4−quad f = twice (twice f)
5−twice f x = f (f x)
6−
7−n = quad (quad trickyID) 4
8−c = twice trickyID 'a'
tests/good/Soundness/Apply.elmnew file+3
@@ -0,0 +1,3 @@
1+
2+apply f = let g x = f x
3+ in g
tests/good/Soundness/ApplyAnnotated.elmnew file+4
@@ -0,0 +1,4 @@
1+
2+apply : (a -> b) -> a -> b
3+apply f = let g x = f x
4+ in g
tests/good/Soundness1.elm → tests/good/Soundness/Id.elmrenamed+2−1
@@ -1,2 +1,3 @@
1−test =
1+
2+myId =
2 let id x = x in id
3 let id x = x in id
tests/good/SoundnessAnnotated1.elm → tests/good/Soundness/IdAnnotated.elmrenamed+2−1
@@ -1,3 +1,4 @@
1+
1−test = let id : a -> a
2+myId = let id : a -> a
2 id x = x
3 id x = x
3 in id
4 in id
tests/good/Soundness/TrickyId.elmnew file+2
@@ -0,0 +1,2 @@
1+
2+myId x = let y = x in y
tests/good/Soundness/TrickyIdAnnotated.elmnew file+3
@@ -0,0 +1,3 @@
1+
2+myId : a -> a
3+myId x = let y = x in y
tests/good/Soundness2.elmdeleted−1
@@ -1 +0,0 @@
1−test x = let y = x in y
tests/good/Soundness3.elmdeleted−2
@@ -1,2 +0,0 @@
1−test f = let g x = f x
2− in g
tests/good/SoundnessAnnotated2.elmdeleted−2
@@ -1,2 +0,0 @@
1−test : a -> a
2−test x = let y = x in y
tests/good/SoundnessAnnotated3.elmdeleted−3
@@ -1,3 +0,0 @@
1−test : (a -> b) -> a -> b
2−test f = let g x = f x
3− in g
tests/good/Unify/LockedVars.elmnew file+6
@@ -0,0 +1,6 @@
1+-- unify flexible and locked types
2+import Dict
3+
4+multiplyKey ((i,j), _) = (i*j)
5+
6+x = map multiplyKey (Dict.toList (Dict.singleton (1,2) 0))
tests/good/Unify/NonHomogeneousRecords.elmnew file+8
@@ -0,0 +1,8 @@
1+
2+type Thing = { x:Float, y:Float }
3+
4+f : Thing -> Thing
5+f t =
6+ let x = t.x
7+ y = t.y
8+ in t