| 1 | {-# LANGUAGE FlexibleContexts, MultiParamTypeClasses, |
|---|
| 2 | GADTs, TypeFamilies, FunctionalDependencies, TypeOperators #-} |
|---|
| 3 | |
|---|
| 4 | -- This file demonstrate an bug with HAppS, producing: |
|---|
| 5 | -- |
|---|
| 6 | -- test2.o: In function `r4nX_info': |
|---|
| 7 | -- (.text+0xf3c7): undefined reference to `base_DataziTuple_Z63T_con_info' |
|---|
| 8 | -- |
|---|
| 9 | -- when linking it. The core seems to contain more hints. |
|---|
| 10 | |
|---|
| 11 | class (Serialize ev) => UpdateEvent ev res | ev -> res |
|---|
| 12 | -- class (Serialize ev, Serialize res) => UpdateEvent ev res | ev -> res |
|---|
| 13 | -- class UpdateEvent ev res | ev -> res |
|---|
| 14 | |
|---|
| 15 | -- type Update state = Ev (StateT state STM) |
|---|
| 16 | type Update state = Maybe |
|---|
| 17 | |
|---|
| 18 | data Method st where |
|---|
| 19 | Update :: (UpdateEvent ev res) => (ev -> Update st res) -> Method st |
|---|
| 20 | -- Query :: (QueryEvent ev res) => (ev -> Query st res) -> Method st |
|---|
| 21 | |
|---|
| 22 | class Methods a where |
|---|
| 23 | methods :: [Method a] |
|---|
| 24 | |
|---|
| 25 | class Serialize a |
|---|
| 26 | |
|---|
| 27 | data MyState = MyState Int |
|---|
| 28 | |
|---|
| 29 | method1 :: (Monad m) => m () |
|---|
| 30 | method1 = undefined |
|---|
| 31 | method2 :: (Monad m) => m () |
|---|
| 32 | method2 = undefined |
|---|
| 33 | method3 :: (Monad m) => m () |
|---|
| 34 | method3 = undefined |
|---|
| 35 | method4 :: (Monad m) => m () |
|---|
| 36 | method4 = undefined |
|---|
| 37 | method5 :: (Monad m) => m () |
|---|
| 38 | method5 = undefined |
|---|
| 39 | method6 :: (Monad m) => m () |
|---|
| 40 | method6 = undefined |
|---|
| 41 | method7 :: (Monad m) => m () |
|---|
| 42 | method7 = undefined |
|---|
| 43 | method8 :: (Monad m) => m () |
|---|
| 44 | method8 = undefined |
|---|
| 45 | method9 :: (Monad m) => m () |
|---|
| 46 | method9 = undefined |
|---|
| 47 | method10 :: (Monad m) => m () |
|---|
| 48 | method10 = undefined |
|---|
| 49 | method11 :: (Monad m) => m () |
|---|
| 50 | method11 = undefined |
|---|
| 51 | method12 :: (Monad m) => m () |
|---|
| 52 | method12 = undefined |
|---|
| 53 | method13 :: (Monad m) => m () |
|---|
| 54 | method13 = undefined |
|---|
| 55 | method14 :: (Monad m) => m () |
|---|
| 56 | method14 = undefined |
|---|
| 57 | method15 :: (Monad m) => m () |
|---|
| 58 | method15 = undefined |
|---|
| 59 | method16 :: (Monad m) => m () |
|---|
| 60 | method16 = undefined |
|---|
| 61 | method17 :: (Monad m) => m () |
|---|
| 62 | method17 = undefined |
|---|
| 63 | method18 :: (Monad m) => m () |
|---|
| 64 | method18 = undefined |
|---|
| 65 | method19 :: (Monad m) => m () |
|---|
| 66 | method19 = undefined |
|---|
| 67 | method20 :: (Monad m) => m () |
|---|
| 68 | method20 = undefined |
|---|
| 69 | method21 :: (Monad m) => m () |
|---|
| 70 | method21 = undefined |
|---|
| 71 | method22 :: (Monad m) => m () |
|---|
| 72 | method22 = undefined |
|---|
| 73 | method23 :: (Monad m) => m () |
|---|
| 74 | method23 = undefined |
|---|
| 75 | method24 :: (Monad m) => m () |
|---|
| 76 | method24 = undefined |
|---|
| 77 | method25 :: (Monad m) => m () |
|---|
| 78 | method25 = undefined |
|---|
| 79 | method26 :: (Monad m) => m () |
|---|
| 80 | method26 = undefined |
|---|
| 81 | method27 :: (Monad m) => m () |
|---|
| 82 | method27 = undefined |
|---|
| 83 | method28 :: (Monad m) => m () |
|---|
| 84 | method28 = undefined |
|---|
| 85 | method29 :: (Monad m) => m () |
|---|
| 86 | method29 = undefined |
|---|
| 87 | method30 :: (Monad m) => m () |
|---|
| 88 | method30 = undefined |
|---|
| 89 | method31 :: (Monad m) => m () |
|---|
| 90 | method31 = undefined |
|---|
| 91 | method32 :: (Monad m) => m () |
|---|
| 92 | method32 = undefined |
|---|
| 93 | method33 :: (Monad m) => m () |
|---|
| 94 | method33 = undefined |
|---|
| 95 | method34 :: (Monad m) => m () |
|---|
| 96 | method34 = undefined |
|---|
| 97 | method35 :: (Monad m) => m () |
|---|
| 98 | method35 = undefined |
|---|
| 99 | method36 :: (Monad m) => m () |
|---|
| 100 | method36 = undefined |
|---|
| 101 | method37 :: (Monad m) => m () |
|---|
| 102 | method37 = undefined |
|---|
| 103 | method38 :: (Monad m) => m () |
|---|
| 104 | method38 = undefined |
|---|
| 105 | method39 :: (Monad m) => m () |
|---|
| 106 | method39 = undefined |
|---|
| 107 | method40 :: (Monad m) => m () |
|---|
| 108 | method40 = undefined |
|---|
| 109 | method41 :: (Monad m) => m () |
|---|
| 110 | method41 = undefined |
|---|
| 111 | method42 :: (Monad m) => m () |
|---|
| 112 | method42 = undefined |
|---|
| 113 | method43 :: (Monad m) => m () |
|---|
| 114 | method43 = undefined |
|---|
| 115 | method44 :: (Monad m) => m () |
|---|
| 116 | method44 = undefined |
|---|
| 117 | method45 :: (Monad m) => m () |
|---|
| 118 | method45 = undefined |
|---|
| 119 | method46 :: (Monad m) => m () |
|---|
| 120 | method46 = undefined |
|---|
| 121 | method47 :: (Monad m) => m () |
|---|
| 122 | method47 = undefined |
|---|
| 123 | method48 :: (Monad m) => m () |
|---|
| 124 | method48 = undefined |
|---|
| 125 | method49 :: (Monad m) => m () |
|---|
| 126 | method49 = undefined |
|---|
| 127 | method50 :: (Monad m) => m () |
|---|
| 128 | method50 = undefined |
|---|
| 129 | method51 :: (Monad m) => m () |
|---|
| 130 | method51 = undefined |
|---|
| 131 | method52 :: (Monad m) => m () |
|---|
| 132 | method52 = undefined |
|---|
| 133 | method53 :: (Monad m) => m () |
|---|
| 134 | method53 = undefined |
|---|
| 135 | method54 :: (Monad m) => m () |
|---|
| 136 | method54 = undefined |
|---|
| 137 | method55 :: (Monad m) => m () |
|---|
| 138 | method55 = undefined |
|---|
| 139 | method56 :: (Monad m) => m () |
|---|
| 140 | method56 = undefined |
|---|
| 141 | method57 :: (Monad m) => m () |
|---|
| 142 | method57 = undefined |
|---|
| 143 | method58 :: (Monad m) => m () |
|---|
| 144 | method58 = undefined |
|---|
| 145 | method59 :: (Monad m) => m () |
|---|
| 146 | method59 = undefined |
|---|
| 147 | method60 :: (Monad m) => m () |
|---|
| 148 | method60 = undefined |
|---|
| 149 | method61 :: (Monad m) => m () |
|---|
| 150 | method61 = undefined |
|---|
| 151 | method62 :: (Monad m) => m () |
|---|
| 152 | method62 = undefined |
|---|
| 153 | method63 :: (Monad m) => m () |
|---|
| 154 | method63 = undefined |
|---|
| 155 | |
|---|
| 156 | instance (Serialize Method1) => UpdateEvent Method1 () |
|---|
| 157 | instance (Serialize Method2) => UpdateEvent Method2 () |
|---|
| 158 | instance (Serialize Method3) => UpdateEvent Method3 () |
|---|
| 159 | instance (Serialize Method4) => UpdateEvent Method4 () |
|---|
| 160 | instance (Serialize Method5) => UpdateEvent Method5 () |
|---|
| 161 | instance (Serialize Method6) => UpdateEvent Method6 () |
|---|
| 162 | instance (Serialize Method7) => UpdateEvent Method7 () |
|---|
| 163 | instance (Serialize Method8) => UpdateEvent Method8 () |
|---|
| 164 | instance (Serialize Method9) => UpdateEvent Method9 () |
|---|
| 165 | instance (Serialize Method10) => UpdateEvent Method10 () |
|---|
| 166 | instance (Serialize Method11) => UpdateEvent Method11 () |
|---|
| 167 | instance (Serialize Method12) => UpdateEvent Method12 () |
|---|
| 168 | instance (Serialize Method13) => UpdateEvent Method13 () |
|---|
| 169 | instance (Serialize Method14) => UpdateEvent Method14 () |
|---|
| 170 | instance (Serialize Method15) => UpdateEvent Method15 () |
|---|
| 171 | instance (Serialize Method16) => UpdateEvent Method16 () |
|---|
| 172 | instance (Serialize Method17) => UpdateEvent Method17 () |
|---|
| 173 | instance (Serialize Method18) => UpdateEvent Method18 () |
|---|
| 174 | instance (Serialize Method19) => UpdateEvent Method19 () |
|---|
| 175 | instance (Serialize Method20) => UpdateEvent Method20 () |
|---|
| 176 | instance (Serialize Method21) => UpdateEvent Method21 () |
|---|
| 177 | instance (Serialize Method22) => UpdateEvent Method22 () |
|---|
| 178 | instance (Serialize Method23) => UpdateEvent Method23 () |
|---|
| 179 | instance (Serialize Method24) => UpdateEvent Method24 () |
|---|
| 180 | instance (Serialize Method25) => UpdateEvent Method25 () |
|---|
| 181 | instance (Serialize Method26) => UpdateEvent Method26 () |
|---|
| 182 | instance (Serialize Method27) => UpdateEvent Method27 () |
|---|
| 183 | instance (Serialize Method28) => UpdateEvent Method28 () |
|---|
| 184 | instance (Serialize Method29) => UpdateEvent Method29 () |
|---|
| 185 | instance (Serialize Method30) => UpdateEvent Method30 () |
|---|
| 186 | instance (Serialize Method31) => UpdateEvent Method31 () |
|---|
| 187 | instance (Serialize Method32) => UpdateEvent Method32 () |
|---|
| 188 | instance (Serialize Method33) => UpdateEvent Method33 () |
|---|
| 189 | instance (Serialize Method34) => UpdateEvent Method34 () |
|---|
| 190 | instance (Serialize Method35) => UpdateEvent Method35 () |
|---|
| 191 | instance (Serialize Method36) => UpdateEvent Method36 () |
|---|
| 192 | instance (Serialize Method37) => UpdateEvent Method37 () |
|---|
| 193 | instance (Serialize Method38) => UpdateEvent Method38 () |
|---|
| 194 | instance (Serialize Method39) => UpdateEvent Method39 () |
|---|
| 195 | instance (Serialize Method40) => UpdateEvent Method40 () |
|---|
| 196 | instance (Serialize Method41) => UpdateEvent Method41 () |
|---|
| 197 | instance (Serialize Method42) => UpdateEvent Method42 () |
|---|
| 198 | instance (Serialize Method43) => UpdateEvent Method43 () |
|---|
| 199 | instance (Serialize Method44) => UpdateEvent Method44 () |
|---|
| 200 | instance (Serialize Method45) => UpdateEvent Method45 () |
|---|
| 201 | instance (Serialize Method46) => UpdateEvent Method46 () |
|---|
| 202 | instance (Serialize Method47) => UpdateEvent Method47 () |
|---|
| 203 | instance (Serialize Method48) => UpdateEvent Method48 () |
|---|
| 204 | instance (Serialize Method49) => UpdateEvent Method49 () |
|---|
| 205 | instance (Serialize Method50) => UpdateEvent Method50 () |
|---|
| 206 | instance (Serialize Method51) => UpdateEvent Method51 () |
|---|
| 207 | instance (Serialize Method52) => UpdateEvent Method52 () |
|---|
| 208 | instance (Serialize Method53) => UpdateEvent Method53 () |
|---|
| 209 | instance (Serialize Method54) => UpdateEvent Method54 () |
|---|
| 210 | instance (Serialize Method55) => UpdateEvent Method55 () |
|---|
| 211 | instance (Serialize Method56) => UpdateEvent Method56 () |
|---|
| 212 | instance (Serialize Method57) => UpdateEvent Method57 () |
|---|
| 213 | instance (Serialize Method58) => UpdateEvent Method58 () |
|---|
| 214 | instance (Serialize Method59) => UpdateEvent Method59 () |
|---|
| 215 | instance (Serialize Method60) => UpdateEvent Method60 () |
|---|
| 216 | instance (Serialize Method61) => UpdateEvent Method61 () |
|---|
| 217 | instance (Serialize Method62) => UpdateEvent Method62 () |
|---|
| 218 | instance (Serialize Method63) => UpdateEvent Method63 () |
|---|
| 219 | |
|---|
| 220 | instance Methods Main.MyState where |
|---|
| 221 | { methods = [ Update (\ Method1 -> Main.method1), |
|---|
| 222 | Update (\ Method2 -> Main.method2), |
|---|
| 223 | Update (\ Method3 -> Main.method3), |
|---|
| 224 | Update (\ Method4 -> Main.method4), |
|---|
| 225 | Update (\ Method5 -> Main.method5), |
|---|
| 226 | Update (\ Method6 -> Main.method6), |
|---|
| 227 | Update (\ Method7 -> Main.method7), |
|---|
| 228 | Update (\ Method8 -> Main.method8), |
|---|
| 229 | Update (\ Method9 -> Main.method9), |
|---|
| 230 | Update (\ Method10 -> Main.method10), |
|---|
| 231 | Update (\ Method11 -> Main.method11), |
|---|
| 232 | Update (\ Method12 -> Main.method12), |
|---|
| 233 | Update (\ Method13 -> Main.method13), |
|---|
| 234 | Update (\ Method14 -> Main.method14), |
|---|
| 235 | Update (\ Method15 -> Main.method15), |
|---|
| 236 | Update (\ Method16 -> Main.method16), |
|---|
| 237 | Update (\ Method17 -> Main.method17), |
|---|
| 238 | Update (\ Method18 -> Main.method18), |
|---|
| 239 | Update (\ Method19 -> Main.method19), |
|---|
| 240 | Update (\ Method20 -> Main.method20), |
|---|
| 241 | Update (\ Method21 -> Main.method21), |
|---|
| 242 | Update (\ Method22 -> Main.method22), |
|---|
| 243 | Update (\ Method23 -> Main.method23), |
|---|
| 244 | Update (\ Method24 -> Main.method24), |
|---|
| 245 | Update (\ Method25 -> Main.method25), |
|---|
| 246 | Update (\ Method26 -> Main.method26), |
|---|
| 247 | Update (\ Method27 -> Main.method27), |
|---|
| 248 | Update (\ Method28 -> Main.method28), |
|---|
| 249 | Update (\ Method29 -> Main.method29), |
|---|
| 250 | Update (\ Method30 -> Main.method30), |
|---|
| 251 | Update (\ Method31 -> Main.method31), |
|---|
| 252 | Update (\ Method32 -> Main.method32), |
|---|
| 253 | Update (\ Method33 -> Main.method33), |
|---|
| 254 | Update (\ Method34 -> Main.method34), |
|---|
| 255 | Update (\ Method35 -> Main.method35), |
|---|
| 256 | Update (\ Method36 -> Main.method36), |
|---|
| 257 | Update (\ Method37 -> Main.method37), |
|---|
| 258 | Update (\ Method38 -> Main.method38), |
|---|
| 259 | Update (\ Method39 -> Main.method39), |
|---|
| 260 | Update (\ Method40 -> Main.method40), |
|---|
| 261 | Update (\ Method41 -> Main.method41), |
|---|
| 262 | Update (\ Method42 -> Main.method42), |
|---|
| 263 | Update (\ Method43 -> Main.method43), |
|---|
| 264 | Update (\ Method44 -> Main.method44), |
|---|
| 265 | Update (\ Method45 -> Main.method45), |
|---|
| 266 | Update (\ Method46 -> Main.method46), |
|---|
| 267 | Update (\ Method47 -> Main.method47), |
|---|
| 268 | Update (\ Method48 -> Main.method48), |
|---|
| 269 | Update (\ Method49 -> Main.method49), |
|---|
| 270 | Update (\ Method50 -> Main.method50), |
|---|
| 271 | Update (\ Method51 -> Main.method51), |
|---|
| 272 | Update (\ Method52 -> Main.method52), |
|---|
| 273 | Update (\ Method53 -> Main.method53), |
|---|
| 274 | Update (\ Method54 -> Main.method54), |
|---|
| 275 | Update (\ Method55 -> Main.method55), |
|---|
| 276 | Update (\ Method56 -> Main.method56), |
|---|
| 277 | Update (\ Method57 -> Main.method57), |
|---|
| 278 | Update (\ Method58 -> Main.method58), |
|---|
| 279 | Update (\ Method59 -> Main.method59), |
|---|
| 280 | Update (\ Method60 -> Main.method60), |
|---|
| 281 | Update (\ Method61 -> Main.method61), |
|---|
| 282 | Update (\ Method62 -> Main.method62), |
|---|
| 283 | Update (\ Method63 -> Main.method63)] } |
|---|
| 284 | data Method1 = Method1 |
|---|
| 285 | data Method2 = Method2 |
|---|
| 286 | data Method3 = Method3 |
|---|
| 287 | data Method4 = Method4 |
|---|
| 288 | data Method5 = Method5 |
|---|
| 289 | data Method6 = Method6 |
|---|
| 290 | data Method7 = Method7 |
|---|
| 291 | data Method8 = Method8 |
|---|
| 292 | data Method9 = Method9 |
|---|
| 293 | data Method10 = Method10 |
|---|
| 294 | data Method11 = Method11 |
|---|
| 295 | data Method12 = Method12 |
|---|
| 296 | data Method13 = Method13 |
|---|
| 297 | data Method14 = Method14 |
|---|
| 298 | data Method15 = Method15 |
|---|
| 299 | data Method16 = Method16 |
|---|
| 300 | data Method17 = Method17 |
|---|
| 301 | data Method18 = Method18 |
|---|
| 302 | data Method19 = Method19 |
|---|
| 303 | data Method20 = Method20 |
|---|
| 304 | data Method21 = Method21 |
|---|
| 305 | data Method22 = Method22 |
|---|
| 306 | data Method23 = Method23 |
|---|
| 307 | data Method24 = Method24 |
|---|
| 308 | data Method25 = Method25 |
|---|
| 309 | data Method26 = Method26 |
|---|
| 310 | data Method27 = Method27 |
|---|
| 311 | data Method28 = Method28 |
|---|
| 312 | data Method29 = Method29 |
|---|
| 313 | data Method30 = Method30 |
|---|
| 314 | data Method31 = Method31 |
|---|
| 315 | data Method32 = Method32 |
|---|
| 316 | data Method33 = Method33 |
|---|
| 317 | data Method34 = Method34 |
|---|
| 318 | data Method35 = Method35 |
|---|
| 319 | data Method36 = Method36 |
|---|
| 320 | data Method37 = Method37 |
|---|
| 321 | data Method38 = Method38 |
|---|
| 322 | data Method39 = Method39 |
|---|
| 323 | data Method40 = Method40 |
|---|
| 324 | data Method41 = Method41 |
|---|
| 325 | data Method42 = Method42 |
|---|
| 326 | data Method43 = Method43 |
|---|
| 327 | data Method44 = Method44 |
|---|
| 328 | data Method45 = Method45 |
|---|
| 329 | data Method46 = Method46 |
|---|
| 330 | data Method47 = Method47 |
|---|
| 331 | data Method48 = Method48 |
|---|
| 332 | data Method49 = Method49 |
|---|
| 333 | data Method50 = Method50 |
|---|
| 334 | data Method51 = Method51 |
|---|
| 335 | data Method52 = Method52 |
|---|
| 336 | data Method53 = Method53 |
|---|
| 337 | data Method54 = Method54 |
|---|
| 338 | data Method55 = Method55 |
|---|
| 339 | data Method56 = Method56 |
|---|
| 340 | data Method57 = Method57 |
|---|
| 341 | data Method58 = Method58 |
|---|
| 342 | data Method59 = Method59 |
|---|
| 343 | data Method60 = Method60 |
|---|
| 344 | data Method61 = Method61 |
|---|
| 345 | data Method62 = Method62 |
|---|
| 346 | data Method63 = Method63 |
|---|
| 347 | |
|---|
| 348 | instance Serialize Method1 |
|---|
| 349 | instance Serialize Method2 |
|---|
| 350 | instance Serialize Method3 |
|---|
| 351 | instance Serialize Method4 |
|---|
| 352 | instance Serialize Method5 |
|---|
| 353 | instance Serialize Method6 |
|---|
| 354 | instance Serialize Method7 |
|---|
| 355 | instance Serialize Method8 |
|---|
| 356 | instance Serialize Method9 |
|---|
| 357 | instance Serialize Method10 |
|---|
| 358 | instance Serialize Method11 |
|---|
| 359 | instance Serialize Method12 |
|---|
| 360 | instance Serialize Method13 |
|---|
| 361 | instance Serialize Method14 |
|---|
| 362 | instance Serialize Method15 |
|---|
| 363 | instance Serialize Method16 |
|---|
| 364 | instance Serialize Method17 |
|---|
| 365 | instance Serialize Method18 |
|---|
| 366 | instance Serialize Method19 |
|---|
| 367 | instance Serialize Method20 |
|---|
| 368 | instance Serialize Method21 |
|---|
| 369 | instance Serialize Method22 |
|---|
| 370 | instance Serialize Method23 |
|---|
| 371 | instance Serialize Method24 |
|---|
| 372 | instance Serialize Method25 |
|---|
| 373 | instance Serialize Method26 |
|---|
| 374 | instance Serialize Method27 |
|---|
| 375 | instance Serialize Method28 |
|---|
| 376 | instance Serialize Method29 |
|---|
| 377 | instance Serialize Method30 |
|---|
| 378 | instance Serialize Method31 |
|---|
| 379 | instance Serialize Method32 |
|---|
| 380 | instance Serialize Method33 |
|---|
| 381 | instance Serialize Method34 |
|---|
| 382 | instance Serialize Method35 |
|---|
| 383 | instance Serialize Method36 |
|---|
| 384 | instance Serialize Method37 |
|---|
| 385 | instance Serialize Method38 |
|---|
| 386 | instance Serialize Method39 |
|---|
| 387 | instance Serialize Method40 |
|---|
| 388 | instance Serialize Method41 |
|---|
| 389 | instance Serialize Method42 |
|---|
| 390 | instance Serialize Method43 |
|---|
| 391 | instance Serialize Method44 |
|---|
| 392 | instance Serialize Method45 |
|---|
| 393 | instance Serialize Method46 |
|---|
| 394 | instance Serialize Method47 |
|---|
| 395 | instance Serialize Method48 |
|---|
| 396 | instance Serialize Method49 |
|---|
| 397 | instance Serialize Method50 |
|---|
| 398 | instance Serialize Method51 |
|---|
| 399 | instance Serialize Method52 |
|---|
| 400 | instance Serialize Method53 |
|---|
| 401 | instance Serialize Method54 |
|---|
| 402 | instance Serialize Method55 |
|---|
| 403 | instance Serialize Method56 |
|---|
| 404 | instance Serialize Method57 |
|---|
| 405 | instance Serialize Method58 |
|---|
| 406 | instance Serialize Method59 |
|---|
| 407 | instance Serialize Method60 |
|---|
| 408 | instance Serialize Method61 |
|---|
| 409 | instance Serialize Method62 |
|---|
| 410 | instance Serialize Method63 |
|---|
| 411 | |
|---|
| 412 | main = return () |
|---|