summaryrefslogtreecommitdiff
path: root/testdata
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-05-06 14:21:24 +0200
committerPéter Diviánszky <divipp@gmail.com>2016-05-06 14:21:24 +0200
commitdea5e2c619c55ca7e7e897edb9898d9b5105fc92 (patch)
tree79f67084d0f669558f7a6f3d2352264ad6dbf595 /testdata
parentf69178d9e65103c8d1ba2ba47c9fb9f834780621 (diff)
tweak hnf handling
Diffstat (limited to 'testdata')
-rw-r--r--testdata/PrimReduce.out5
-rw-r--r--testdata/editor-examples/Heartbeat.lc8
-rw-r--r--testdata/editor-examples/Heartbeat.out11
-rw-r--r--testdata/editor-examples/LambdaCube.out5
-rw-r--r--testdata/example07.out7
-rw-r--r--testdata/fragment01.out5
-rw-r--r--testdata/fragment04ifthenelse.out5
-rw-r--r--testdata/language-features/basic-list/listcomp09.out2
-rw-r--r--testdata/language-features/basic-values/infix01.out2
-rw-r--r--testdata/let.out2
10 files changed, 16 insertions, 36 deletions
diff --git a/testdata/PrimReduce.out b/testdata/PrimReduce.out
index 0fc353f0..d8eb17d7 100644
--- a/testdata/PrimReduce.out
+++ b/testdata/PrimReduce.out
@@ -47,12 +47,9 @@ Pipeline
47 return texture(s,uv); 47 return texture(s,uv);
48 } 48 }
49 out vec4 f0; 49 out vec4 f0;
50 vec4 rgb(float z0,float z1,float z2) {
51 return vec4 (z0,z1,z2,1.0);
52 }
53 vec4 blue; 50 vec4 blue;
54 void main() { 51 void main() {
55 blue = rgb (0.0,0.0,1.0); 52 blue = vec4 (0.0,0.0,1.0,1.0);
56 f0 = blue; 53 f0 = blue;
57 } 54 }
58 """ 55 """
diff --git a/testdata/editor-examples/Heartbeat.lc b/testdata/editor-examples/Heartbeat.lc
index 920c9097..29a0464e 100644
--- a/testdata/editor-examples/Heartbeat.lc
+++ b/testdata/editor-examples/Heartbeat.lc
@@ -7,8 +7,6 @@ triangleRasterCtx = TriangleCtx CullNone PolygonFill NoOffset LastVertex
7triangles = triangleRasterCtx 7triangles = triangleRasterCtx
8colorFragmentCtx = (DepthOp Less True, ColorOp NoBlending (V4 True True True True)) 8colorFragmentCtx = (DepthOp Less True, ColorOp NoBlending (V4 True True True True))
9 9
10rasterizeWith s = rasterizePrimitives triangles ((Smooth)) s
11
12cubeVertexStream = fetch "stream4" (Attribute "position4" :: Vec 4 Float, Attribute "vertexUV" :: Vec 2 Float) 10cubeVertexStream = fetch "stream4" (Attribute "position4" :: Vec 4 Float, Attribute "vertexUV" :: Vec 2 Float)
13mapFragments2 s fs = accumulate colorFragmentCtx (\((a)) -> ((fs a))) s clear 11mapFragments2 s fs = accumulate colorFragmentCtx (\((a)) -> ((fs a))) s clear
14 12
@@ -22,7 +20,7 @@ rotate' v = projmat *. v
22texImage = PrjImageColor $ 20texImage = PrjImageColor $
23 cubeVertexStream -- cube vertices 21 cubeVertexStream -- cube vertices
24 & mapPrimitives (\(x, y) -> (scale 1.0 x, V2 y%x (1-y%y))) 22 & mapPrimitives (\(x, y) -> (scale 1.0 x, V2 y%x (1-y%y)))
25 & rasterizeWith -- rasterize 23 & rasterizePrimitives triangles ((Smooth)) -- rasterize
26 `mapFragments2` 24 `mapFragments2`
27 (\xy -> let 25 (\xy -> let
28 x = ((xy :: Vec 2 Float)%x :: Float) -! 0.85 26 x = ((xy :: Vec 2 Float)%x :: Float) -! 0.85
@@ -39,7 +37,7 @@ texImage = PrjImageColor $
39sampler = Sampler LinearFilter MirroredRepeat $ Texture2D (V2 128 128) texImage 37sampler = Sampler LinearFilter MirroredRepeat $ Texture2D (V2 128 128) texImage
40 38
41main = cubeVertexStream -- cube vertices 39main = cubeVertexStream -- cube vertices
42 & mapPrimitives (\(x, y) -> (scale 0.5 . rotate' $ x, y)) 40 & mapPrimitives (\(x, y) -> (scale 0.5 . rotate' $ x, y))
43 & rasterizeWith -- rasterize 41 & rasterizePrimitives triangles ((Smooth)) -- rasterize
44 `mapFragments2` (texture2D sampler) 42 `mapFragments2` (texture2D sampler)
45 & ScreenOut -- draw into screen 43 & ScreenOut -- draw into screen
diff --git a/testdata/editor-examples/Heartbeat.out b/testdata/editor-examples/Heartbeat.out
index 6c435c7e..56f659dc 100644
--- a/testdata/editor-examples/Heartbeat.out
+++ b/testdata/editor-examples/Heartbeat.out
@@ -103,20 +103,17 @@ Pipeline
103 uniform float Time; 103 uniform float Time;
104 smooth in vec2 vo1; 104 smooth in vec2 vo1;
105 out vec4 f0; 105 out vec4 f0;
106 vec4 rgb(float z0,float z1,float z2) {
107 return vec4 (z0,z1,z2,1.0);
108 }
109 vec4 blue; 106 vec4 blue;
110 vec4 navy; 107 vec4 navy;
111 float ti; 108 float ti;
112 vec4 white; 109 vec4 white;
113 vec4 yellow; 110 vec4 yellow;
114 void main() { 111 void main() {
115 blue = rgb (0.0,0.0,1.0); 112 blue = vec4 (0.0,0.0,1.0,1.0);
116 navy = rgb (0.0,0.0,0.5); 113 navy = vec4 (0.0,0.0,0.5,1.0);
117 ti = abs ((sin ((Time) * (4.0))) - (0.37)); 114 ti = abs ((sin ((Time) * (4.0))) - (0.37));
118 white = rgb (1.0,1.0,1.0); 115 white = vec4 (1.0,1.0,1.0,1.0);
119 yellow = rgb (1.0,1.0,0.0); 116 yellow = vec4 (1.0,1.0,0.0,1.0);
120 f0 = 117 f0 =
121 ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((5.0e-4) * (sin 118 ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((5.0e-4) * (sin
122 (((3.0) * (atan (((vo1).x) - (0.85) 119 (((3.0) * (atan (((vo1).x) - (0.85)
diff --git a/testdata/editor-examples/LambdaCube.out b/testdata/editor-examples/LambdaCube.out
index 68796786..fa7afdb9 100644
--- a/testdata/editor-examples/LambdaCube.out
+++ b/testdata/editor-examples/LambdaCube.out
@@ -65,9 +65,6 @@ Pipeline
65 } 65 }
66 smooth in vec4 vo1; 66 smooth in vec4 vo1;
67 out vec4 f0; 67 out vec4 f0;
68 vec4 rgb(float z0,float z1,float z2) {
69 return vec4 (z0,z1,z2,1.0);
70 }
71 vec4 black; 68 vec4 black;
72 vec4 leftSide(vec2 z0) { 69 vec4 leftSide(vec2 z0) {
73 return vec4 (0.0 70 return vec4 (0.0
@@ -89,7 +86,7 @@ Pipeline
89 ,vec2 (1.0,-1.0))) < (0.0)) ? 0.0 : 1.0); 86 ,vec2 (1.0,-1.0))) < (0.0)) ? 0.0 : 1.0);
90 } 87 }
91 void main() { 88 void main() {
92 black = rgb (0.0,0.0,0.0); 89 black = vec4 (0.0,0.0,0.0,1.0);
93 f0 = (abs ((vo1).x)) > (0.99999) ? rightSide_2 (((((vo1).yz) * (sign 90 f0 = (abs ((vo1).x)) > (0.99999) ? rightSide_2 (((((vo1).yz) * (sign
94 ((vo1).x))) * (0.5)) + (0.5)) : (abs ((vo1).y)) > (0.99999) ? topSide 91 ((vo1).x))) * (0.5)) + (0.5)) : (abs ((vo1).y)) > (0.99999) ? topSide
95 (((((vo1).zx) * (sign ((vo1).y))) * (0.5)) + (0.5)) : (abs 92 (((((vo1).zx) * (sign ((vo1).y))) * (0.5)) + (0.5)) : (abs
diff --git a/testdata/example07.out b/testdata/example07.out
index 29991b12..cac517a9 100644
--- a/testdata/example07.out
+++ b/testdata/example07.out
@@ -47,14 +47,11 @@ Pipeline
47 } 47 }
48 smooth in vec4 vo1; 48 smooth in vec4 vo1;
49 out vec4 f0; 49 out vec4 f0;
50 vec4 rgb(float z0,float z1,float z2) {
51 return vec4 (z0,z1,z2,1.0);
52 }
53 vec4 blue; 50 vec4 blue;
54 vec4 red; 51 vec4 red;
55 void main() { 52 void main() {
56 blue = rgb (0.0,0.0,1.0); 53 blue = vec4 (0.0,0.0,1.0,1.0);
57 red = rgb (1.0,0.0,0.0); 54 red = vec4 (1.0,0.0,0.0,1.0);
58 f0 = ((vo1).x) < (0.5) ? blue : red; 55 f0 = ((vo1).x) < (0.5) ? blue : red;
59 } 56 }
60 """ 57 """
diff --git a/testdata/fragment01.out b/testdata/fragment01.out
index f3e048fe..059ae787 100644
--- a/testdata/fragment01.out
+++ b/testdata/fragment01.out
@@ -37,12 +37,9 @@ Pipeline
37 return texture(s,uv); 37 return texture(s,uv);
38 } 38 }
39 out vec4 f0; 39 out vec4 f0;
40 vec4 rgb(float z0,float z1,float z2) {
41 return vec4 (z0,z1,z2,1.0);
42 }
43 vec4 blue; 40 vec4 blue;
44 void main() { 41 void main() {
45 blue = rgb (0.0,0.0,1.0); 42 blue = vec4 (0.0,0.0,1.0,1.0);
46 f0 = blue; 43 f0 = blue;
47 } 44 }
48 """ 45 """
diff --git a/testdata/fragment04ifthenelse.out b/testdata/fragment04ifthenelse.out
index 53374903..4e91a227 100644
--- a/testdata/fragment04ifthenelse.out
+++ b/testdata/fragment04ifthenelse.out
@@ -41,12 +41,9 @@ Pipeline
41 uniform float Time; 41 uniform float Time;
42 smooth in vec4 vo1; 42 smooth in vec4 vo1;
43 out vec4 f0; 43 out vec4 f0;
44 vec4 rgb(float z0,float z1,float z2) {
45 return vec4 (z0,z1,z2,1.0);
46 }
47 vec4 blue; 44 vec4 blue;
48 void main() { 45 void main() {
49 blue = rgb (0.0,0.0,1.0); 46 blue = vec4 (0.0,0.0,1.0,1.0);
50 f0 = (Time) < (0.5) ? vo1 : blue; 47 f0 = (Time) < (0.5) ? vo1 : blue;
51 } 48 }
52 """ 49 """
diff --git a/testdata/language-features/basic-list/listcomp09.out b/testdata/language-features/basic-list/listcomp09.out
index 536f024a..b83e6611 100644
--- a/testdata/language-features/basic-list/listcomp09.out
+++ b/testdata/language-features/basic-list/listcomp09.out
@@ -4,7 +4,7 @@ value1
4 = _rhs (concatMap (\(_ :: _) -> [\(a :: _) -> hlistNilCase _ "Hello" a]) []) 4 = _rhs (concatMap (\(_ :: _) -> [\(a :: _) -> hlistNilCase _ "Hello" a]) [])
5------------ core code 5------------ core code
6value1 :: @Type -> [() -> String] 6value1 :: @Type -> [() -> String]
7value1 = \a -> _rhs [] 7value1 = \_ -> _rhs []
8------------ tooltips 8------------ tooltips
9testdata/language-features/basic-list/listcomp09.lc 1:1-1:7 9testdata/language-features/basic-list/listcomp09.lc 1:1-1:7
10 @Type -> [() -> String] 10 @Type -> [() -> String]
diff --git a/testdata/language-features/basic-values/infix01.out b/testdata/language-features/basic-values/infix01.out
index cee5de49..1ba2bd04 100644
--- a/testdata/language-features/basic-values/infix01.out
+++ b/testdata/language-features/basic-values/infix01.out
@@ -8,7 +8,7 @@ fun :: forall a b . a -> b -> ()
8fun = \_ _ _ _ -> _rhs () 8fun = \_ _ _ _ -> _rhs ()
9 9
10value :: forall a b . a -> b -> () 10value :: forall a b . a -> b -> ()
11value = \a b c d -> _rhs () 11value = \_ _ _ _ -> _rhs ()
12------------ tooltips 12------------ tooltips
13testdata/language-features/basic-values/infix01.lc 1:1-1:4 13testdata/language-features/basic-values/infix01.lc 1:1-1:4
14 forall a b . a -> b -> () 14 forall a b . a -> b -> ()
diff --git a/testdata/let.out b/testdata/let.out
index 538f8977..36c6a54f 100644
--- a/testdata/let.out
+++ b/testdata/let.out
@@ -5,7 +5,7 @@ id = \(a :: _) -> _rhs a
5f = \(a :: _) -> _rhs let b = _rhs (id a) in b 5f = \(a :: _) -> _rhs let b = _rhs (id a) in b
6------------ core code 6------------ core code
7f :: forall a . a -> a 7f :: forall a . a -> a
8f = \a b -> _rhs b 8f = \_ a -> _rhs a
9 9
10id :: forall a . a -> a 10id :: forall a . a -> a
11id = \_ a -> _rhs a 11id = \_ a -> _rhs a