diff options
Diffstat (limited to 'testdata/performance/Material.out')
-rw-r--r-- | testdata/performance/Material.out | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/testdata/performance/Material.out b/testdata/performance/Material.out index a9cebf12..ef9a0f94 100644 --- a/testdata/performance/Material.out +++ b/testdata/performance/Material.out | |||
@@ -1,16 +1,23 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | identityLight :: Float | 3 | identityLight :: Float |
3 | identityLight = _rhs (fromInt 1) | 4 | identityLight = _rhs (fromInt 1) |
5 | |||
4 | data Entity :: Type where | 6 | data Entity :: Type where |
5 | Entity | 7 | Entity |
6 | :: Vec (fromInt 4) Float | 8 | :: Vec (fromInt 4) Float |
7 | -> Vec (fromInt 4) Float | 9 | -> Vec (fromInt 4) Float |
8 | -> Vec (fromInt 3) Float -> Vec (fromInt 4) Float -> Entity | 10 | -> Vec (fromInt 3) Float -> Vec (fromInt 4) Float -> Entity |
11 | |||
9 | eAmbientLight = \(a :: _) -> case'Entity (\_ -> _) (\(b :: _) _ _ _ -> _rhs b) a | 12 | eAmbientLight = \(a :: _) -> case'Entity (\_ -> _) (\(b :: _) _ _ _ -> _rhs b) a |
13 | |||
10 | eDirectedLight | 14 | eDirectedLight |
11 | = \(a :: _) -> case'Entity (\_ -> _) (\_ (b :: _) _ _ -> _rhs b) a | 15 | = \(a :: _) -> case'Entity (\_ -> _) (\_ (b :: _) _ _ -> _rhs b) a |
16 | |||
12 | eLightDir = \(a :: _) -> case'Entity (\_ -> _) (\_ _ (b :: _) _ -> _rhs b) a | 17 | eLightDir = \(a :: _) -> case'Entity (\_ -> _) (\_ _ (b :: _) _ -> _rhs b) a |
18 | |||
13 | eShaderRGBA = \(a :: _) -> case'Entity (\_ -> _) (\_ _ _ (b :: _) -> _rhs b) a | 19 | eShaderRGBA = \(a :: _) -> case'Entity (\_ -> _) (\_ _ _ (b :: _) -> _rhs b) a |
20 | |||
14 | data WaveType :: Type where | 21 | data WaveType :: Type where |
15 | WT_Sin :: WaveType | 22 | WT_Sin :: WaveType |
16 | WT_Triangle :: WaveType | 23 | WT_Triangle :: WaveType |
@@ -18,8 +25,10 @@ data WaveType :: Type where | |||
18 | WT_Sawtooth :: WaveType | 25 | WT_Sawtooth :: WaveType |
19 | WT_InverseSawtooth :: WaveType | 26 | WT_InverseSawtooth :: WaveType |
20 | WT_Noise :: WaveType | 27 | WT_Noise :: WaveType |
28 | |||
21 | data Wave :: Type where | 29 | data Wave :: Type where |
22 | Wave :: WaveType -> Float -> Float -> Float -> Float -> Wave | 30 | Wave :: WaveType -> Float -> Float -> Float -> Float -> Wave |
31 | |||
23 | data Deform :: Type where | 32 | data Deform :: Type where |
24 | D_AutoSprite :: Deform | 33 | D_AutoSprite :: Deform |
25 | D_AutoSprite2 :: Deform | 34 | D_AutoSprite2 :: Deform |
@@ -36,10 +45,12 @@ data Deform :: Type where | |||
36 | D_Text6 :: Deform | 45 | D_Text6 :: Deform |
37 | D_Text7 :: Deform | 46 | D_Text7 :: Deform |
38 | D_Wave :: Float -> Wave -> Deform | 47 | D_Wave :: Float -> Wave -> Deform |
48 | |||
39 | data CullType :: Type where | 49 | data CullType :: Type where |
40 | CT_FrontSided :: CullType | 50 | CT_FrontSided :: CullType |
41 | CT_BackSided :: CullType | 51 | CT_BackSided :: CullType |
42 | CT_TwoSided :: CullType | 52 | CT_TwoSided :: CullType |
53 | |||
43 | data Blending' :: Type where | 54 | data Blending' :: Type where |
44 | B_DstAlpha :: Blending' | 55 | B_DstAlpha :: Blending' |
45 | B_DstColor :: Blending' | 56 | B_DstColor :: Blending' |
@@ -52,6 +63,7 @@ data Blending' :: Type where | |||
52 | B_SrcAlphaSaturate :: Blending' | 63 | B_SrcAlphaSaturate :: Blending' |
53 | B_SrcColor :: Blending' | 64 | B_SrcColor :: Blending' |
54 | B_Zero :: Blending' | 65 | B_Zero :: Blending' |
66 | |||
55 | data RGBGen :: Type where | 67 | data RGBGen :: Type where |
56 | RGB_Wave :: Wave -> RGBGen | 68 | RGB_Wave :: Wave -> RGBGen |
57 | RGB_Const :: Float -> Float -> Float -> RGBGen | 69 | RGB_Const :: Float -> Float -> Float -> RGBGen |
@@ -64,6 +76,7 @@ data RGBGen :: Type where | |||
64 | RGB_LightingDiffuse :: RGBGen | 76 | RGB_LightingDiffuse :: RGBGen |
65 | RGB_OneMinusVertex :: RGBGen | 77 | RGB_OneMinusVertex :: RGBGen |
66 | RGB_Undefined :: RGBGen | 78 | RGB_Undefined :: RGBGen |
79 | |||
67 | data AlphaGen :: Type where | 80 | data AlphaGen :: Type where |
68 | A_Wave :: Wave -> AlphaGen | 81 | A_Wave :: Wave -> AlphaGen |
69 | A_Const :: Float -> AlphaGen | 82 | A_Const :: Float -> AlphaGen |
@@ -74,12 +87,14 @@ data AlphaGen :: Type where | |||
74 | A_Vertex :: AlphaGen | 87 | A_Vertex :: AlphaGen |
75 | A_LightingSpecular :: AlphaGen | 88 | A_LightingSpecular :: AlphaGen |
76 | A_OneMinusVertex :: AlphaGen | 89 | A_OneMinusVertex :: AlphaGen |
90 | |||
77 | data TCGen :: Type where | 91 | data TCGen :: Type where |
78 | TG_Base :: TCGen | 92 | TG_Base :: TCGen |
79 | TG_Lightmap :: TCGen | 93 | TG_Lightmap :: TCGen |
80 | TG_Environment :: TCGen | 94 | TG_Environment :: TCGen |
81 | TG_Vector :: Vec (fromInt 3) Float -> Vec (fromInt 3) Float -> TCGen | 95 | TG_Vector :: Vec (fromInt 3) Float -> Vec (fromInt 3) Float -> TCGen |
82 | TG_Undefined :: TCGen | 96 | TG_Undefined :: TCGen |
97 | |||
83 | data TCMod :: Type where | 98 | data TCMod :: Type where |
84 | TM_EntityTranslate :: TCMod | 99 | TM_EntityTranslate :: TCMod |
85 | TM_Rotate :: Float -> TCMod | 100 | TM_Rotate :: Float -> TCMod |
@@ -88,19 +103,23 @@ data TCMod :: Type where | |||
88 | TM_Stretch :: Wave -> TCMod | 103 | TM_Stretch :: Wave -> TCMod |
89 | TM_Transform :: Float -> Float -> Float -> Float -> Float -> Float -> TCMod | 104 | TM_Transform :: Float -> Float -> Float -> Float -> Float -> Float -> TCMod |
90 | TM_Turb :: Float -> Float -> Float -> Float -> TCMod | 105 | TM_Turb :: Float -> Float -> Float -> Float -> TCMod |
106 | |||
91 | data StageTexture :: Type where | 107 | data StageTexture :: Type where |
92 | ST_Map :: String -> StageTexture | 108 | ST_Map :: String -> StageTexture |
93 | ST_ClampMap :: String -> StageTexture | 109 | ST_ClampMap :: String -> StageTexture |
94 | ST_AnimMap :: Float -> [String] -> StageTexture | 110 | ST_AnimMap :: Float -> [String] -> StageTexture |
95 | ST_Lightmap :: StageTexture | 111 | ST_Lightmap :: StageTexture |
96 | ST_WhiteImage :: StageTexture | 112 | ST_WhiteImage :: StageTexture |
113 | |||
97 | data AlphaFunction :: Type where | 114 | data AlphaFunction :: Type where |
98 | A_Gt0 :: AlphaFunction | 115 | A_Gt0 :: AlphaFunction |
99 | A_Lt128 :: AlphaFunction | 116 | A_Lt128 :: AlphaFunction |
100 | A_Ge128 :: AlphaFunction | 117 | A_Ge128 :: AlphaFunction |
118 | |||
101 | data DepthFunction :: Type where | 119 | data DepthFunction :: Type where |
102 | D_Equal :: DepthFunction | 120 | D_Equal :: DepthFunction |
103 | D_Lequal :: DepthFunction | 121 | D_Lequal :: DepthFunction |
122 | |||
104 | data StageAttrs :: Type where | 123 | data StageAttrs :: Type where |
105 | StageAttrs | 124 | StageAttrs |
106 | :: Maybe (HList (Blending' : Blending' : '[])) | 125 | :: Maybe (HList (Blending' : Blending' : '[])) |
@@ -110,61 +129,73 @@ data StageAttrs :: Type where | |||
110 | -> [TCMod] | 129 | -> [TCMod] |
111 | -> StageTexture | 130 | -> StageTexture |
112 | -> Bool -> DepthFunction -> Maybe AlphaFunction -> Bool -> String -> StageAttrs | 131 | -> Bool -> DepthFunction -> Maybe AlphaFunction -> Bool -> String -> StageAttrs |
132 | |||
113 | saBlend | 133 | saBlend |
114 | = \(a :: _) -> case'StageAttrs | 134 | = \(a :: _) -> case'StageAttrs |
115 | (\_ -> _) | 135 | (\_ -> _) |
116 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) | 136 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) |
117 | a | 137 | a |
138 | |||
118 | saRGBGen | 139 | saRGBGen |
119 | = \(a :: _) -> case'StageAttrs | 140 | = \(a :: _) -> case'StageAttrs |
120 | (\_ -> _) | 141 | (\_ -> _) |
121 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) | 142 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) |
122 | a | 143 | a |
144 | |||
123 | saAlphaGen | 145 | saAlphaGen |
124 | = \(a :: _) -> case'StageAttrs | 146 | = \(a :: _) -> case'StageAttrs |
125 | (\_ -> _) | 147 | (\_ -> _) |
126 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) | 148 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) |
127 | a | 149 | a |
150 | |||
128 | saTCGen | 151 | saTCGen |
129 | = \(a :: _) -> case'StageAttrs | 152 | = \(a :: _) -> case'StageAttrs |
130 | (\_ -> _) | 153 | (\_ -> _) |
131 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) | 154 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) |
132 | a | 155 | a |
156 | |||
133 | saTCMod | 157 | saTCMod |
134 | = \(a :: _) -> case'StageAttrs | 158 | = \(a :: _) -> case'StageAttrs |
135 | (\_ -> _) | 159 | (\_ -> _) |
136 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) | 160 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) |
137 | a | 161 | a |
162 | |||
138 | saTexture | 163 | saTexture |
139 | = \(a :: _) -> case'StageAttrs | 164 | = \(a :: _) -> case'StageAttrs |
140 | (\_ -> _) | 165 | (\_ -> _) |
141 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) | 166 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) |
142 | a | 167 | a |
168 | |||
143 | saDepthWrite | 169 | saDepthWrite |
144 | = \(a :: _) -> case'StageAttrs | 170 | = \(a :: _) -> case'StageAttrs |
145 | (\_ -> _) | 171 | (\_ -> _) |
146 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) | 172 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) |
147 | a | 173 | a |
174 | |||
148 | saDepthFunc | 175 | saDepthFunc |
149 | = \(a :: _) -> case'StageAttrs | 176 | = \(a :: _) -> case'StageAttrs |
150 | (\_ -> _) | 177 | (\_ -> _) |
151 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) | 178 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) |
152 | a | 179 | a |
180 | |||
153 | saAlphaFunc | 181 | saAlphaFunc |
154 | = \(a :: _) -> case'StageAttrs | 182 | = \(a :: _) -> case'StageAttrs |
155 | (\_ -> _) | 183 | (\_ -> _) |
156 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) | 184 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) |
157 | a | 185 | a |
186 | |||
158 | saDepthMaskExplicit | 187 | saDepthMaskExplicit |
159 | = \(a :: _) -> case'StageAttrs | 188 | = \(a :: _) -> case'StageAttrs |
160 | (\_ -> _) | 189 | (\_ -> _) |
161 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) | 190 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) |
162 | a | 191 | a |
192 | |||
163 | saTextureUniform | 193 | saTextureUniform |
164 | = \(a :: _) -> case'StageAttrs | 194 | = \(a :: _) -> case'StageAttrs |
165 | (\_ -> _) | 195 | (\_ -> _) |
166 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) | 196 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) |
167 | a | 197 | a |
198 | |||
168 | defaultStageAttrs :: StageAttrs | 199 | defaultStageAttrs :: StageAttrs |
169 | defaultStageAttrs | 200 | defaultStageAttrs |
170 | = _rhs | 201 | = _rhs |
@@ -180,6 +211,7 @@ defaultStageAttrs | |||
180 | Nothing | 211 | Nothing |
181 | False | 212 | False |
182 | "") | 213 | "") |
214 | |||
183 | data CommonAttrs :: Type where | 215 | data CommonAttrs :: Type where |
184 | CommonAttrs | 216 | CommonAttrs |
185 | :: HList '[] | 217 | :: HList '[] |
@@ -189,66 +221,79 @@ data CommonAttrs :: Type where | |||
189 | -> Bool | 221 | -> Bool |
190 | -> Bool | 222 | -> Bool |
191 | -> CullType -> [Deform] -> Bool -> Bool -> [StageAttrs] -> Bool -> CommonAttrs | 223 | -> CullType -> [Deform] -> Bool -> Bool -> [StageAttrs] -> Bool -> CommonAttrs |
224 | |||
192 | caSkyParms | 225 | caSkyParms |
193 | = \(a :: _) -> case'CommonAttrs | 226 | = \(a :: _) -> case'CommonAttrs |
194 | (\_ -> _) | 227 | (\_ -> _) |
195 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ _ -> _rhs b) | 228 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ _ -> _rhs b) |
196 | a | 229 | a |
230 | |||
197 | caFogParms | 231 | caFogParms |
198 | = \(a :: _) -> case'CommonAttrs | 232 | = \(a :: _) -> case'CommonAttrs |
199 | (\_ -> _) | 233 | (\_ -> _) |
200 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) | 234 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) |
201 | a | 235 | a |
236 | |||
202 | caPortal | 237 | caPortal |
203 | = \(a :: _) -> case'CommonAttrs | 238 | = \(a :: _) -> case'CommonAttrs |
204 | (\_ -> _) | 239 | (\_ -> _) |
205 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) | 240 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) |
206 | a | 241 | a |
242 | |||
207 | caSort | 243 | caSort |
208 | = \(a :: _) -> case'CommonAttrs | 244 | = \(a :: _) -> case'CommonAttrs |
209 | (\_ -> _) | 245 | (\_ -> _) |
210 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) | 246 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) |
211 | a | 247 | a |
248 | |||
212 | caEntityMergable | 249 | caEntityMergable |
213 | = \(a :: _) -> case'CommonAttrs | 250 | = \(a :: _) -> case'CommonAttrs |
214 | (\_ -> _) | 251 | (\_ -> _) |
215 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) | 252 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) |
216 | a | 253 | a |
254 | |||
217 | caFogOnly | 255 | caFogOnly |
218 | = \(a :: _) -> case'CommonAttrs | 256 | = \(a :: _) -> case'CommonAttrs |
219 | (\_ -> _) | 257 | (\_ -> _) |
220 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) | 258 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) |
221 | a | 259 | a |
260 | |||
222 | caCull | 261 | caCull |
223 | = \(a :: _) -> case'CommonAttrs | 262 | = \(a :: _) -> case'CommonAttrs |
224 | (\_ -> _) | 263 | (\_ -> _) |
225 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) | 264 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) |
226 | a | 265 | a |
266 | |||
227 | caDeformVertexes | 267 | caDeformVertexes |
228 | = \(a :: _) -> case'CommonAttrs | 268 | = \(a :: _) -> case'CommonAttrs |
229 | (\_ -> _) | 269 | (\_ -> _) |
230 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) | 270 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) |
231 | a | 271 | a |
272 | |||
232 | caNoMipMaps | 273 | caNoMipMaps |
233 | = \(a :: _) -> case'CommonAttrs | 274 | = \(a :: _) -> case'CommonAttrs |
234 | (\_ -> _) | 275 | (\_ -> _) |
235 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) | 276 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) |
236 | a | 277 | a |
278 | |||
237 | caPolygonOffset | 279 | caPolygonOffset |
238 | = \(a :: _) -> case'CommonAttrs | 280 | = \(a :: _) -> case'CommonAttrs |
239 | (\_ -> _) | 281 | (\_ -> _) |
240 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) | 282 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) |
241 | a | 283 | a |
284 | |||
242 | caStages | 285 | caStages |
243 | = \(a :: _) -> case'CommonAttrs | 286 | = \(a :: _) -> case'CommonAttrs |
244 | (\_ -> _) | 287 | (\_ -> _) |
245 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) | 288 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) |
246 | a | 289 | a |
290 | |||
247 | caIsSky | 291 | caIsSky |
248 | = \(a :: _) -> case'CommonAttrs | 292 | = \(a :: _) -> case'CommonAttrs |
249 | (\_ -> _) | 293 | (\_ -> _) |
250 | (\_ _ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) | 294 | (\_ _ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) |
251 | a | 295 | a |
296 | |||
252 | defaultCommonAttrs :: CommonAttrs | 297 | defaultCommonAttrs :: CommonAttrs |
253 | defaultCommonAttrs | 298 | defaultCommonAttrs |
254 | = _rhs | 299 | = _rhs |
@@ -265,7 +310,6 @@ defaultCommonAttrs | |||
265 | False | 310 | False |
266 | [] | 311 | [] |
267 | False) | 312 | False) |
268 | main is not found | ||
269 | ------------ trace | 313 | ------------ trace |
270 | identityLight :: Float | 314 | identityLight :: Float |
271 | 'Entity :: Type | 315 | 'Entity :: Type |