| 114 | | {- Previously generated by DrIFT : Look, but Don't Touch. -} |
| 115 | | |
| 116 | | instance Perl5 TParam where |
| 117 | | showPerl5 (MkTParam aa ab) = showP5HashObj "MkTParam" |
| 118 | | [("tpParam", showPerl5 aa) , ("tpDefault", showPerl5 ab)] |
| 119 | | |
| 120 | | instance Perl5 TCxt where |
| 121 | | showPerl5 (TCxtVoid) = showP5Class "TCxtVoid" |
| 122 | | showPerl5 (TCxtLValue aa) = showP5ArrayObj "TCxtLValue" |
| 123 | | [showPerl5 aa] |
| 124 | | showPerl5 (TCxtItem aa) = showP5ArrayObj "TCxtItem" [showPerl5 aa] |
| 125 | | showPerl5 (TCxtSlurpy aa) = showP5ArrayObj "TCxtSlurpy" |
| 126 | | [showPerl5 aa] |
| 127 | | showPerl5 (TTailCall aa) = showP5ArrayObj "TTailCall" |
| 128 | | [showPerl5 aa] |
| 129 | | |
| 130 | | instance Perl5 TEnv where |
| 131 | | showPerl5 (MkTEnv aa ab ac ad ae) = showP5HashObj "MkTEnv" |
| 132 | | [("tLexDepth", showPerl5 aa) , ("tTokDepth", showPerl5 ab) , |
| 133 | | ("tCxt", showPerl5 ac) , ("tReg", showPerl5 ad) , |
| 134 | | ("tLabel", showPerl5 ae)] |
| 135 | | |
| 136 | | instance Perl5 Val where |
| 137 | | showPerl5 (VUndef) = showP5Class "VUndef" |
| 138 | | showPerl5 (VBool aa) = showP5ArrayObj "VBool" [showPerl5 aa] |
| 139 | | showPerl5 (VInt aa) = showP5ArrayObj "VInt" [showPerl5 aa] |
| 140 | | showPerl5 (VRat aa) = showP5ArrayObj "VRat" [showPerl5 aa] |
| 141 | | showPerl5 (VNum aa) = showP5ArrayObj "VNum" [showPerl5 aa] |
| 142 | | showPerl5 (VStr aa) = showP5ArrayObj "VStr" [showPerl5 aa] |
| 143 | | showPerl5 (VList aa) = showP5ArrayObj "VList" [showPerl5 aa] |
| 144 | | showPerl5 (VType aa) = showP5ArrayObj "VType" [showPerl5 aa] |
| 145 | | showPerl5 _ = "(warn '<val>')" |
| 146 | | |
| 147 | | instance Perl5 Cxt where |
| 148 | | showPerl5 (CxtVoid) = showP5Class "CxtVoid" |
| 149 | | showPerl5 (CxtItem aa) = showP5ArrayObj "CxtItem" [showPerl5 aa] |
| 150 | | showPerl5 (CxtSlurpy aa) = showP5ArrayObj "CxtSlurpy" |
| 151 | | [showPerl5 aa] |
| 152 | | |
| 153 | | instance Perl5 Type where |
| 154 | | showPerl5 (MkType aa) = showP5ArrayObj "MkType" [showPerl5 aa] |
| 155 | | showPerl5 (TypeOr aa ab) = showP5ArrayObj "TypeOr" |
| 156 | | [showPerl5 aa , showPerl5 ab] |
| 157 | | showPerl5 (TypeAnd aa ab) = showP5ArrayObj "TypeAnd" |
| 158 | | [showPerl5 aa , showPerl5 ab] |
| 159 | | |
| 160 | | instance Perl5 Param where |
| 161 | | showPerl5 (MkParam aa ab ac ad ae af ag ah ai) = |
| 162 | | showP5HashObj "MkParam" |
| 163 | | [("isInvocant", showPerl5 aa) , ("isOptional", showPerl5 ab) , |
| 164 | | ("isNamed", showPerl5 ac) , ("isLValue", showPerl5 ad) , |
| 165 | | ("isWritable", showPerl5 ae) , ("isLazy", showPerl5 af) , |
| 166 | | ("paramName", showPerl5 ag) , ("paramContext", showPerl5 ah) , |
| 167 | | ("paramDefault", showPerl5 ai)] |
| 168 | | |
| 169 | | instance Perl5 Pos where |
| 170 | | showPerl5 (MkPos aa ab ac ad ae) = showP5HashObj "MkPos" |
| 171 | | [("posName", showPerl5 aa) , ("posBeginLine", showPerl5 ab) , |
| 172 | | ("posBeginColumn", showPerl5 ac) , ("posEndLine", showPerl5 ad) , |
| 173 | | ("posEndColumn", showPerl5 ae)] |
| 174 | | |
| | 385 | instance Haskell2Xml PIL_LValue where |
| | 386 | toHType v = |
| | 387 | Defined "PIL_LValue" [] |
| | 388 | [Constr "PVar" [] [toHType aa], |
| | 389 | Constr "PApp" [] [toHType ab,toHType ac,toHType ad,toHType ae], |
| | 390 | Constr "PAssign" [] [toHType af,toHType ag], |
| | 391 | Constr "PBind" [] [toHType ah,toHType ai]] |
| | 392 | where |
| | 393 | (PVar aa) = v |
| | 394 | (PApp ab ac ad ae) = v |
| | 395 | (PAssign af ag) = v |
| | 396 | (PBind ah ai) = v |
| | 397 | fromContents (CElem (Elem constr [] cs):etc) |
| | 398 | | "PVar" `isPrefixOf` constr = |
| | 399 | (\(aa,_)-> (PVar aa, etc)) (fromContents cs) |
| | 400 | | "PBind" `isPrefixOf` constr = |
| | 401 | (\(ah,cs00)-> (\(ai,_)-> (PBind ah ai, etc)) (fromContents cs00)) |
| | 402 | (fromContents cs) |
| | 403 | | "PAssign" `isPrefixOf` constr = |
| | 404 | (\(af,cs00)-> (\(ag,_)-> (PAssign af ag, etc)) (fromContents cs00)) |
| | 405 | (fromContents cs) |
| | 406 | | "PApp" `isPrefixOf` constr = |
| | 407 | (\(ab,cs00)-> (\(ac,cs01)-> (\(ad,cs02)-> (\(ae, |
| | 408 | _)-> (PApp ab ac ad ae, etc)) |
| | 409 | (fromContents cs02)) |
| | 410 | (fromContents cs01)) |
| | 411 | (fromContents cs00)) |
| | 412 | (fromContents cs) |
| | 413 | toContents v@(PVar aa) = |
| | 414 | [mkElemC (showConstr 0 (toHType v)) (toContents aa)] |
| | 415 | toContents v@(PApp ab ac ad ae) = |
| | 416 | [mkElemC (showConstr 1 (toHType v)) (concat [toContents ab, |
| | 417 | toContents ac,toContents ad,toContents ae])] |
| | 418 | toContents v@(PAssign af ag) = |
| | 419 | [mkElemC (showConstr 2 (toHType v)) (concat [toContents af, |
| | 420 | toContents ag])] |
| | 421 | toContents v@(PBind ah ai) = |
| | 422 | [mkElemC (showConstr 3 (toHType v)) (concat [toContents ah, |
| | 423 | toContents ai])] |
| | 424 | |
| | 425 | instance Perl5 TParam where |
| | 426 | showPerl5 (MkTParam aa ab) = showP5HashObj "MkTParam" |
| | 427 | [("tpParam", showPerl5 aa) , ("tpDefault", showPerl5 ab)] |
| | 428 | |
| | 429 | instance Haskell2Xml TParam where |
| | 430 | toHType v = |
| | 431 | Defined "TParam" [] [Constr "MkTParam" [] [toHType aa,toHType ab]] |
| | 432 | where |
| | 433 | (MkTParam aa ab) = v |
| | 434 | fromContents (CElem (Elem constr [] cs):etc) |
| | 435 | | "MkTParam" `isPrefixOf` constr = |
| | 436 | (\(aa,cs00)-> (\(ab,_)-> (MkTParam aa ab, etc)) |
| | 437 | (fromContents cs00)) |
| | 438 | (fromContents cs) |
| | 439 | toContents v@(MkTParam aa ab) = |
| | 440 | [mkElemC (showConstr 0 (toHType v)) (concat [toContents aa, |
| | 441 | toContents ab])] |
| | 442 | |
| | 443 | instance Perl5 TCxt where |
| | 444 | showPerl5 (TCxtVoid) = showP5Class "TCxtVoid" |
| | 445 | showPerl5 (TCxtLValue aa) = showP5ArrayObj "TCxtLValue" |
| | 446 | [showPerl5 aa] |
| | 447 | showPerl5 (TCxtItem aa) = showP5ArrayObj "TCxtItem" [showPerl5 aa] |
| | 448 | showPerl5 (TCxtSlurpy aa) = showP5ArrayObj "TCxtSlurpy" |
| | 449 | [showPerl5 aa] |
| | 450 | showPerl5 (TTailCall aa) = showP5ArrayObj "TTailCall" |
| | 451 | [showPerl5 aa] |
| | 452 | |
| | 453 | instance Haskell2Xml TCxt where |
| | 454 | toHType v = |
| | 455 | Defined "TCxt" [] |
| | 456 | [Constr "TCxtVoid" [] [],Constr "TCxtLValue" [] [toHType aa], |
| | 457 | Constr "TCxtItem" [] [toHType ab], |
| | 458 | Constr "TCxtSlurpy" [] [toHType ac], |
| | 459 | Constr "TTailCall" [] [toHType ad]] |
| | 460 | where |
| | 461 | (TCxtLValue aa) = v |
| | 462 | (TCxtItem ab) = v |
| | 463 | (TCxtSlurpy ac) = v |
| | 464 | (TTailCall ad) = v |
| | 465 | fromContents (CElem (Elem constr [] cs):etc) |
| | 466 | | "TTailCall" `isPrefixOf` constr = |
| | 467 | (\(ad,_)-> (TTailCall ad, etc)) (fromContents cs) |
| | 468 | | "TCxtVoid" `isPrefixOf` constr = |
| | 469 | (TCxtVoid,etc) |
| | 470 | | "TCxtSlurpy" `isPrefixOf` constr = |
| | 471 | (\(ac,_)-> (TCxtSlurpy ac, etc)) (fromContents cs) |
| | 472 | | "TCxtLValue" `isPrefixOf` constr = |
| | 473 | (\(aa,_)-> (TCxtLValue aa, etc)) (fromContents cs) |
| | 474 | | "TCxtItem" `isPrefixOf` constr = |
| | 475 | (\(ab,_)-> (TCxtItem ab, etc)) (fromContents cs) |
| | 476 | toContents v@TCxtVoid = |
| | 477 | [mkElemC (showConstr 0 (toHType v)) []] |
| | 478 | toContents v@(TCxtLValue aa) = |
| | 479 | [mkElemC (showConstr 1 (toHType v)) (toContents aa)] |
| | 480 | toContents v@(TCxtItem ab) = |
| | 481 | [mkElemC (showConstr 2 (toHType v)) (toContents ab)] |
| | 482 | toContents v@(TCxtSlurpy ac) = |
| | 483 | [mkElemC (showConstr 3 (toHType v)) (toContents ac)] |
| | 484 | toContents v@(TTailCall ad) = |
| | 485 | [mkElemC (showConstr 4 (toHType v)) (toContents ad)] |
| | 486 | |
| | 487 | instance Perl5 TEnv where |
| | 488 | showPerl5 (MkTEnv aa ab ac ad ae) = showP5HashObj "MkTEnv" |
| | 489 | [("tLexDepth", showPerl5 aa) , ("tTokDepth", showPerl5 ab) , |
| | 490 | ("tCxt", showPerl5 ac) , ("tReg", showPerl5 ad) , |
| | 491 | ("tLabel", showPerl5 ae)] |
| | 492 | |
| | 493 | instance Haskell2Xml TEnv where |
| | 494 | toHType v = |
| | 495 | Defined "TEnv" [] |
| | 496 | [Constr "MkTEnv" [] |
| | 497 | [toHType aa,toHType ab,toHType ac,toHType ad,toHType ae]] |
| | 498 | where |
| | 499 | (MkTEnv aa ab ac ad ae) = v |
| | 500 | fromContents (CElem (Elem constr [] cs):etc) |
| | 501 | | "MkTEnv" `isPrefixOf` constr = |
| | 502 | (\(aa,cs00)-> (\(ab,cs01)-> (\(ac,cs02)-> (\(ad,cs03)-> (\(ae, |
| | 503 | _)-> (MkTEnv aa ab ac ad ae, etc)) |
| | 504 | (fromContents cs03)) |
| | 505 | (fromContents cs02)) |
| | 506 | (fromContents cs01)) |
| | 507 | (fromContents cs00)) |
| | 508 | (fromContents cs) |
| | 509 | toContents v@(MkTEnv aa ab ac ad ae) = |
| | 510 | [mkElemC (showConstr 0 (toHType v)) (concat [toContents aa, |
| | 511 | toContents ab,toContents ac,toContents ad, |
| | 512 | toContents ae])] |
| | 513 | |
| | 514 | instance Perl5 Scope where |
| | 515 | showPerl5 (SState) = showP5Class "SState" |
| | 516 | showPerl5 (SMy) = showP5Class "SMy" |
| | 517 | showPerl5 (SOur) = showP5Class "SOur" |
| | 518 | showPerl5 (SLet) = showP5Class "SLet" |
| | 519 | showPerl5 (STemp) = showP5Class "STemp" |
| | 520 | showPerl5 (SGlobal) = showP5Class "SGlobal" |
| | 521 | |
| | 522 | instance Haskell2Xml Scope where |
| | 523 | toHType v = |
| | 524 | Defined "Scope" [] |
| | 525 | [Constr "SState" [] [],Constr "SMy" [] [],Constr "SOur" [] [], |
| | 526 | Constr "SLet" [] [],Constr "STemp" [] [],Constr "SGlobal" [] []] |
| | 527 | fromContents (CElem (Elem constr [] cs):etc) |
| | 528 | | "STemp" `isPrefixOf` constr = |
| | 529 | (STemp,etc) |
| | 530 | | "SState" `isPrefixOf` constr = |
| | 531 | (SState,etc) |
| | 532 | | "SOur" `isPrefixOf` constr = |
| | 533 | (SOur,etc) |
| | 534 | | "SMy" `isPrefixOf` constr = |
| | 535 | (SMy,etc) |
| | 536 | | "SLet" `isPrefixOf` constr = |
| | 537 | (SLet,etc) |
| | 538 | | "SGlobal" `isPrefixOf` constr = |
| | 539 | (SGlobal,etc) |
| | 540 | toContents v@SState = |
| | 541 | [mkElemC (showConstr 0 (toHType v)) []] |
| | 542 | toContents v@SMy = |
| | 543 | [mkElemC (showConstr 1 (toHType v)) []] |
| | 544 | toContents v@SOur = |
| | 545 | [mkElemC (showConstr 2 (toHType v)) []] |
| | 546 | toContents v@SLet = |
| | 547 | [mkElemC (showConstr 3 (toHType v)) []] |
| | 548 | toContents v@STemp = |
| | 549 | [mkElemC (showConstr 4 (toHType v)) []] |
| | 550 | toContents v@SGlobal = |
| | 551 | [mkElemC (showConstr 5 (toHType v)) []] |
| | 552 | |
| | 553 | instance Perl5 SubType where |
| | 554 | showPerl5 (SubMethod) = showP5Class "SubMethod" |
| | 555 | showPerl5 (SubCoroutine) = showP5Class "SubCoroutine" |
| | 556 | showPerl5 (SubMacro) = showP5Class "SubMacro" |
| | 557 | showPerl5 (SubRoutine) = showP5Class "SubRoutine" |
| | 558 | showPerl5 (SubBlock) = showP5Class "SubBlock" |
| | 559 | showPerl5 (SubPointy) = showP5Class "SubPointy" |
| | 560 | showPerl5 (SubPrim) = showP5Class "SubPrim" |
| | 561 | |
| | 562 | instance Haskell2Xml SubType where |
| | 563 | toHType v = |
| | 564 | Defined "SubType" [] |
| | 565 | [Constr "SubMethod" [] [],Constr "SubCoroutine" [] [], |
| | 566 | Constr "SubMacro" [] [],Constr "SubRoutine" [] [], |
| | 567 | Constr "SubBlock" [] [],Constr "SubPointy" [] [], |
| | 568 | Constr "SubPrim" [] []] |
| | 569 | fromContents (CElem (Elem constr [] cs):etc) |
| | 570 | | "SubRoutine" `isPrefixOf` constr = |
| | 571 | (SubRoutine,etc) |
| | 572 | | "SubPrim" `isPrefixOf` constr = |
| | 573 | (SubPrim,etc) |
| | 574 | | "SubPointy" `isPrefixOf` constr = |
| | 575 | (SubPointy,etc) |
| | 576 | | "SubMethod" `isPrefixOf` constr = |
| | 577 | (SubMethod,etc) |
| | 578 | | "SubMacro" `isPrefixOf` constr = |
| | 579 | (SubMacro,etc) |
| | 580 | | "SubCoroutine" `isPrefixOf` constr = |
| | 581 | (SubCoroutine,etc) |
| | 582 | | "SubBlock" `isPrefixOf` constr = |
| | 583 | (SubBlock,etc) |
| | 584 | toContents v@SubMethod = |
| | 585 | [mkElemC (showConstr 0 (toHType v)) []] |
| | 586 | toContents v@SubCoroutine = |
| | 587 | [mkElemC (showConstr 1 (toHType v)) []] |
| | 588 | toContents v@SubMacro = |
| | 589 | [mkElemC (showConstr 2 (toHType v)) []] |
| | 590 | toContents v@SubRoutine = |
| | 591 | [mkElemC (showConstr 3 (toHType v)) []] |
| | 592 | toContents v@SubBlock = |
| | 593 | [mkElemC (showConstr 4 (toHType v)) []] |
| | 594 | toContents v@SubPointy = |
| | 595 | [mkElemC (showConstr 5 (toHType v)) []] |
| | 596 | toContents v@SubPrim = |
| | 597 | [mkElemC (showConstr 6 (toHType v)) []] |
| | 598 | |
| | 599 | instance Perl5 Val where |
| | 600 | showPerl5 (VUndef) = showP5Class "VUndef" |
| | 601 | showPerl5 (VBool aa) = showP5ArrayObj "VBool" [showPerl5 aa] |
| | 602 | showPerl5 (VInt aa) = showP5ArrayObj "VInt" [showPerl5 aa] |
| | 603 | showPerl5 (VRat aa) = showP5ArrayObj "VRat" [showPerl5 aa] |
| | 604 | showPerl5 (VNum aa) = showP5ArrayObj "VNum" [showPerl5 aa] |
| | 605 | showPerl5 (VStr aa) = showP5ArrayObj "VStr" [showPerl5 aa] |
| | 606 | showPerl5 (VList aa) = showP5ArrayObj "VList" [showPerl5 aa] |
| | 607 | showPerl5 (VType aa) = showP5ArrayObj "VType" [showPerl5 aa] |
| | 608 | |
| | 609 | instance Haskell2Xml Val where |
| | 610 | toHType v = |
| | 611 | Defined "Val" [] |
| | 612 | [Constr "VUndef" [] [],Constr "VBool" [] [toHType aa], |
| | 613 | Constr "VInt" [] [toHType ab],Constr "VRat" [] [toHType ac], |
| | 614 | Constr "VNum" [] [toHType ad],Constr "VStr" [] [toHType ae], |
| | 615 | Constr "VList" [] [toHType af],Constr "VType" [] [toHType ag]] |
| | 616 | where |
| | 617 | (VBool aa) = v |
| | 618 | (VInt ab) = v |
| | 619 | (VRat ac) = v |
| | 620 | (VNum ad) = v |
| | 621 | (VStr ae) = v |
| | 622 | (VList af) = v |
| | 623 | (VType ag) = v |
| | 624 | fromContents (CElem (Elem constr [] cs):etc) |
| | 625 | | "VUndef" `isPrefixOf` constr = |
| | 626 | (VUndef,etc) |
| | 627 | | "VType" `isPrefixOf` constr = |
| | 628 | (\(ag,_)-> (VType ag, etc)) (fromContents cs) |
| | 629 | | "VStr" `isPrefixOf` constr = |
| | 630 | (\(ae,_)-> (VStr ae, etc)) (fromContents cs) |
| | 631 | | "VRat" `isPrefixOf` constr = |
| | 632 | (\(ac,_)-> (VRat ac, etc)) (fromContents cs) |
| | 633 | | "VNum" `isPrefixOf` constr = |
| | 634 | (\(ad,_)-> (VNum ad, etc)) (fromContents cs) |
| | 635 | | "VList" `isPrefixOf` constr = |
| | 636 | (\(af,_)-> (VList af, etc)) (fromContents cs) |
| | 637 | | "VInt" `isPrefixOf` constr = |
| | 638 | (\(ab,_)-> (VInt ab, etc)) (fromContents cs) |
| | 639 | | "VBool" `isPrefixOf` constr = |
| | 640 | (\(aa,_)-> (VBool aa, etc)) (fromContents cs) |
| | 641 | toContents v@VUndef = |
| | 642 | [mkElemC (showConstr 0 (toHType v)) []] |
| | 643 | toContents v@(VBool aa) = |
| | 644 | [mkElemC (showConstr 1 (toHType v)) (toContents aa)] |
| | 645 | toContents v@(VInt ab) = |
| | 646 | [mkElemC (showConstr 2 (toHType v)) (toContents ab)] |
| | 647 | toContents v@(VRat ac) = |
| | 648 | [mkElemC (showConstr 3 (toHType v)) (toContents ac)] |
| | 649 | toContents v@(VNum ad) = |
| | 650 | [mkElemC (showConstr 4 (toHType v)) (toContents ad)] |
| | 651 | toContents v@(VStr ae) = |
| | 652 | [mkElemC (showConstr 5 (toHType v)) (toContents ae)] |
| | 653 | toContents v@(VList af) = |
| | 654 | [mkElemC (showConstr 6 (toHType v)) (toContents af)] |
| | 655 | toContents v@(VType ag) = |
| | 656 | [mkElemC (showConstr 7 (toHType v)) (toContents ag)] |
| | 657 | |
| | 658 | instance Perl5 Cxt where |
| | 659 | showPerl5 (CxtVoid) = showP5Class "CxtVoid" |
| | 660 | showPerl5 (CxtItem aa) = showP5ArrayObj "CxtItem" [showPerl5 aa] |
| | 661 | showPerl5 (CxtSlurpy aa) = showP5ArrayObj "CxtSlurpy" |
| | 662 | [showPerl5 aa] |
| | 663 | |
| | 664 | instance Haskell2Xml Cxt where |
| | 665 | toHType v = |
| | 666 | Defined "Cxt" [] |
| | 667 | [Constr "CxtVoid" [] [],Constr "CxtItem" [] [toHType aa], |
| | 668 | Constr "CxtSlurpy" [] [toHType ab]] |
| | 669 | where |
| | 670 | (CxtItem aa) = v |
| | 671 | (CxtSlurpy ab) = v |
| | 672 | fromContents (CElem (Elem constr [] cs):etc) |
| | 673 | | "CxtVoid" `isPrefixOf` constr = |
| | 674 | (CxtVoid,etc) |
| | 675 | | "CxtSlurpy" `isPrefixOf` constr = |
| | 676 | (\(ab,_)-> (CxtSlurpy ab, etc)) (fromContents cs) |
| | 677 | | "CxtItem" `isPrefixOf` constr = |
| | 678 | (\(aa,_)-> (CxtItem aa, etc)) (fromContents cs) |
| | 679 | toContents v@CxtVoid = |
| | 680 | [mkElemC (showConstr 0 (toHType v)) []] |
| | 681 | toContents v@(CxtItem aa) = |
| | 682 | [mkElemC (showConstr 1 (toHType v)) (toContents aa)] |
| | 683 | toContents v@(CxtSlurpy ab) = |
| | 684 | [mkElemC (showConstr 2 (toHType v)) (toContents ab)] |
| | 685 | |
| | 686 | instance Perl5 Type where |
| | 687 | showPerl5 (MkType aa) = showP5ArrayObj "MkType" [showPerl5 aa] |
| | 688 | showPerl5 (TypeOr aa ab) = showP5ArrayObj "TypeOr" |
| | 689 | [showPerl5 aa , showPerl5 ab] |
| | 690 | showPerl5 (TypeAnd aa ab) = showP5ArrayObj "TypeAnd" |
| | 691 | [showPerl5 aa , showPerl5 ab] |
| | 692 | |
| | 693 | instance Haskell2Xml Type where |
| | 694 | toHType v = |
| | 695 | Defined "Type" [] |
| | 696 | [Constr "MkType" [] [toHType aa], |
| | 697 | Constr "TypeOr" [] [toHType ab,toHType ac], |
| | 698 | Constr "TypeAnd" [] [toHType ad,toHType ae]] |
| | 699 | where |
| | 700 | (MkType aa) = v |
| | 701 | (TypeOr ab ac) = v |
| | 702 | (TypeAnd ad ae) = v |
| | 703 | fromContents (CElem (Elem constr [] cs):etc) |
| | 704 | | "TypeOr" `isPrefixOf` constr = |
| | 705 | (\(ab,cs00)-> (\(ac,_)-> (TypeOr ab ac, etc)) (fromContents cs00)) |
| | 706 | (fromContents cs) |
| | 707 | | "TypeAnd" `isPrefixOf` constr = |
| | 708 | (\(ad,cs00)-> (\(ae,_)-> (TypeAnd ad ae, etc)) (fromContents cs00)) |
| | 709 | (fromContents cs) |
| | 710 | | "MkType" `isPrefixOf` constr = |
| | 711 | (\(aa,_)-> (MkType aa, etc)) (fromContents cs) |
| | 712 | toContents v@(MkType aa) = |
| | 713 | [mkElemC (showConstr 0 (toHType v)) (toContents aa)] |
| | 714 | toContents v@(TypeOr ab ac) = |
| | 715 | [mkElemC (showConstr 1 (toHType v)) (concat [toContents ab, |
| | 716 | toContents ac])] |
| | 717 | toContents v@(TypeAnd ad ae) = |
| | 718 | [mkElemC (showConstr 2 (toHType v)) (concat [toContents ad, |
| | 719 | toContents ae])] |
| | 720 | |
| | 721 | instance Perl5 Param where |
| | 722 | showPerl5 (MkParam aa ab ac ad ae af ag ah ai) = |
| | 723 | showP5HashObj "MkParam" |
| | 724 | [("isInvocant", showPerl5 aa) , ("isOptional", showPerl5 ab) , |
| | 725 | ("isNamed", showPerl5 ac) , ("isLValue", showPerl5 ad) , |
| | 726 | ("isWritable", showPerl5 ae) , ("isLazy", showPerl5 af) , |
| | 727 | ("paramName", showPerl5 ag) , ("paramContext", showPerl5 ah) , |
| | 728 | ("paramDefault", showPerl5 ai)] |
| | 729 | |
| | 730 | instance Haskell2Xml Param where |
| | 731 | toHType v = |
| | 732 | Defined "Param" [] |
| | 733 | [Constr "MkParam" [] |
| | 734 | [toHType aa,toHType ab,toHType ac,toHType ad,toHType ae,toHType af, |
| | 735 | toHType ag,toHType ah,toHType ai]] |
| | 736 | where |
| | 737 | (MkParam aa ab ac ad ae af ag ah ai) = v |
| | 738 | |