/usr/share/doc/libghc-src-exts-doc/html/haskell-src-exts.txt is in libghc-src-exts-doc 1.14.0.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 | -- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer
--
-- Haskell-Source with Extensions (HSE, haskell-src-exts) is an extension
-- of the standard haskell-src package, and handles most registered
-- syntactic extensions to Haskell, including:
--
-- <ul>
-- <li>Multi-parameter type classes with functional dependencies</li>
-- <li>Indexed type families (including associated types)</li>
-- <li>Empty data declarations</li>
-- <li>GADTs</li>
-- <li>Implicit parameters</li>
-- <li>Template Haskell</li>
-- </ul>
--
-- and a few more. All extensions implemented in GHC are supported. Apart
-- from these standard extensions, it also handles regular patterns as
-- per the HaRP extension as well as HSX-style embedded XML syntax.
@package haskell-src-exts
@version 1.14.0.1
-- | A suite of datatypes describing the (semi-concrete) abstract syntax of
-- Haskell 98 <a>http://www.haskell.org/onlinereport/</a> plus registered
-- extensions, including:
--
-- <ul>
-- <li>multi-parameter type classes with functional dependencies
-- (MultiParamTypeClasses, FunctionalDependencies)</li>
-- <li>parameters of type class assertions are unrestricted
-- (FlexibleContexts)</li>
-- <li><tt>forall</tt> types as universal and existential quantification
-- (RankNTypes, ExistentialQuantification, etc)</li>
-- <li>pattern guards (PatternGuards)</li>
-- <li>implicit parameters (ImplicitParameters)</li>
-- <li>generalised algebraic data types (GADTs)</li>
-- <li>template haskell (TemplateHaskell)</li>
-- <li>empty data type declarations (EmptyDataDecls)</li>
-- <li>unboxed tuples (UnboxedTuples)</li>
-- <li>regular patterns (RegularPatterns)</li>
-- <li>HSP-style XML expressions and patterns (XmlSyntax)</li>
-- </ul>
--
-- All nodes in the syntax tree are annotated with something of a
-- user-definable data type. When parsing, this annotation will contain
-- information about the source location that the particular node comes
-- from.
module Language.Haskell.Exts.Annotated.Syntax
-- | A complete Haskell source module.
data Module l
-- | an ordinary Haskell module
Module :: l -> (Maybe (ModuleHead l)) -> [ModulePragma l] -> [ImportDecl l] -> [Decl l] -> Module l
-- | a module consisting of a single XML document. The ModuleName never
-- appears in the source but is needed for semantic purposes, it will be
-- the same as the file name.
XmlPage :: l -> (ModuleName l) -> [ModulePragma l] -> (XName l) -> [XAttr l] -> (Maybe (Exp l)) -> [Exp l] -> Module l
-- | a hybrid module combining an XML document with an ordinary module
XmlHybrid :: l -> (Maybe (ModuleHead l)) -> [ModulePragma l] -> [ImportDecl l] -> [Decl l] -> (XName l) -> [XAttr l] -> (Maybe (Exp l)) -> [Exp l] -> Module l
-- | The head of a module, including the name and export specification.
data ModuleHead l
ModuleHead :: l -> (ModuleName l) -> (Maybe (WarningText l)) -> (Maybe (ExportSpecList l)) -> ModuleHead l
-- | Warning text to optionally use in the module header of e.g. a
-- deprecated module.
data WarningText l
DeprText :: l -> String -> WarningText l
WarnText :: l -> String -> WarningText l
-- | An explicit export specification.
data ExportSpecList l
ExportSpecList :: l -> [ExportSpec l] -> ExportSpecList l
-- | An item in a module's export specification.
data ExportSpec l
-- | variable
EVar :: l -> (QName l) -> ExportSpec l
-- | <tt>T</tt>: a class or datatype exported abstractly, or a type
-- synonym.
EAbs :: l -> (QName l) -> ExportSpec l
-- | <tt>T(..)</tt>: a class exported with all of its methods, or a
-- datatype exported with all of its constructors.
EThingAll :: l -> (QName l) -> ExportSpec l
-- | <tt>T(C_1,...,C_n)</tt>: a class exported with some of its methods, or
-- a datatype exported with some of its constructors.
EThingWith :: l -> (QName l) -> [CName l] -> ExportSpec l
-- | <tt>module M</tt>: re-export a module.
EModuleContents :: l -> (ModuleName l) -> ExportSpec l
-- | An import declaration.
data ImportDecl l
ImportDecl :: l -> (ModuleName l) -> Bool -> Bool -> Maybe String -> Maybe (ModuleName l) -> Maybe (ImportSpecList l) -> ImportDecl l
-- | annotation, used by parser for position of the <tt>import</tt>
-- keyword.
importAnn :: ImportDecl l -> l
-- | name of the module imported.
importModule :: ImportDecl l -> (ModuleName l)
-- | imported <tt>qualified</tt>?
importQualified :: ImportDecl l -> Bool
-- | imported with <tt>{-# SOURCE #-}</tt>?
importSrc :: ImportDecl l -> Bool
-- | imported with explicit package name
importPkg :: ImportDecl l -> Maybe String
-- | optional alias name in an <tt>as</tt> clause.
importAs :: ImportDecl l -> Maybe (ModuleName l)
-- | optional list of import specifications.
importSpecs :: ImportDecl l -> Maybe (ImportSpecList l)
-- | An explicit import specification list.
data ImportSpecList l
ImportSpecList :: l -> Bool -> [ImportSpec l] -> ImportSpecList l
-- | An import specification, representing a single explicit item imported
-- (or hidden) from a module.
data ImportSpec l
-- | variable
IVar :: l -> (Name l) -> ImportSpec l
-- | <tt>T</tt>: the name of a class, datatype or type synonym.
IAbs :: l -> (Name l) -> ImportSpec l
-- | <tt>T(..)</tt>: a class imported with all of its methods, or a
-- datatype imported with all of its constructors.
IThingAll :: l -> (Name l) -> ImportSpec l
-- | <tt>T(C_1,...,C_n)</tt>: a class imported with some of its methods, or
-- a datatype imported with some of its constructors.
IThingWith :: l -> (Name l) -> [CName l] -> ImportSpec l
-- | Associativity of an operator.
data Assoc l
-- | non-associative operator (declared with <tt>infix</tt>)
AssocNone :: l -> Assoc l
-- | left-associative operator (declared with <tt>infixl</tt>).
AssocLeft :: l -> Assoc l
-- | right-associative operator (declared with <tt>infixr</tt>)
AssocRight :: l -> Assoc l
-- | A top-level declaration.
data Decl l
-- | A type declaration
TypeDecl :: l -> (DeclHead l) -> (Type l) -> Decl l
-- | A type family declaration
TypeFamDecl :: l -> (DeclHead l) -> (Maybe (Kind l)) -> Decl l
-- | A data OR newtype declaration
DataDecl :: l -> (DataOrNew l) -> (Maybe (Context l)) -> (DeclHead l) -> [QualConDecl l] -> (Maybe (Deriving l)) -> Decl l
-- | A data OR newtype declaration, GADT style
GDataDecl :: l -> (DataOrNew l) -> (Maybe (Context l)) -> (DeclHead l) -> (Maybe (Kind l)) -> [GadtDecl l] -> (Maybe (Deriving l)) -> Decl l
-- | A data family declaration
DataFamDecl :: l -> (Maybe (Context l)) -> (DeclHead l) -> (Maybe (Kind l)) -> Decl l
-- | A type family instance declaration
TypeInsDecl :: l -> (Type l) -> (Type l) -> Decl l
-- | A data family instance declaration
DataInsDecl :: l -> (DataOrNew l) -> (Type l) -> [QualConDecl l] -> (Maybe (Deriving l)) -> Decl l
-- | A data family instance declaration, GADT style
GDataInsDecl :: l -> (DataOrNew l) -> (Type l) -> (Maybe (Kind l)) -> [GadtDecl l] -> (Maybe (Deriving l)) -> Decl l
-- | A declaration of a type class
ClassDecl :: l -> (Maybe (Context l)) -> (DeclHead l) -> [FunDep l] -> (Maybe [ClassDecl l]) -> Decl l
-- | An declaration of a type class instance
InstDecl :: l -> (Maybe (Context l)) -> (InstHead l) -> (Maybe [InstDecl l]) -> Decl l
-- | A standalone deriving declaration
DerivDecl :: l -> (Maybe (Context l)) -> (InstHead l) -> Decl l
-- | A declaration of operator fixity
InfixDecl :: l -> (Assoc l) -> (Maybe Int) -> [Op l] -> Decl l
-- | A declaration of default types
DefaultDecl :: l -> [Type l] -> Decl l
-- | A Template Haskell splicing declaration
SpliceDecl :: l -> (Exp l) -> Decl l
-- | A type signature declaration
TypeSig :: l -> [Name l] -> (Type l) -> Decl l
-- | A set of function binding clauses
FunBind :: l -> [Match l] -> Decl l
-- | A pattern binding
PatBind :: l -> (Pat l) -> (Maybe (Type l)) -> (Rhs l) -> (Maybe (Binds l)) -> Decl l
-- | A foreign import declaration
ForImp :: l -> (CallConv l) -> (Maybe (Safety l)) -> (Maybe String) -> (Name l) -> (Type l) -> Decl l
-- | A foreign export declaration
ForExp :: l -> (CallConv l) -> (Maybe String) -> (Name l) -> (Type l) -> Decl l
-- | A RULES pragma
RulePragmaDecl :: l -> [Rule l] -> Decl l
-- | A DEPRECATED pragma
DeprPragmaDecl :: l -> [([Name l], String)] -> Decl l
-- | A WARNING pragma
WarnPragmaDecl :: l -> [([Name l], String)] -> Decl l
-- | An INLINE pragma
InlineSig :: l -> Bool -> (Maybe (Activation l)) -> (QName l) -> Decl l
-- | An INLINE CONLIKE pragma
InlineConlikeSig :: l -> (Maybe (Activation l)) -> (QName l) -> Decl l
-- | A SPECIALISE pragma
SpecSig :: l -> (Maybe (Activation l)) -> (QName l) -> [Type l] -> Decl l
-- | A SPECIALISE INLINE pragma
SpecInlineSig :: l -> Bool -> (Maybe (Activation l)) -> (QName l) -> [Type l] -> Decl l
-- | A SPECIALISE instance pragma
InstSig :: l -> (Maybe (Context l)) -> (InstHead l) -> Decl l
-- | An ANN pragma
AnnPragma :: l -> (Annotation l) -> Decl l
-- | The head of a type or class declaration.
data DeclHead l
DHead :: l -> (Name l) -> [TyVarBind l] -> DeclHead l
DHInfix :: l -> (TyVarBind l) -> (Name l) -> (TyVarBind l) -> DeclHead l
DHParen :: l -> (DeclHead l) -> DeclHead l
-- | The head of an instance declaration.
data InstHead l
IHead :: l -> (QName l) -> [Type l] -> InstHead l
IHInfix :: l -> (Type l) -> (QName l) -> (Type l) -> InstHead l
IHParen :: l -> (InstHead l) -> InstHead l
-- | A binding group inside a <tt>let</tt> or <tt>where</tt> clause.
data Binds l
-- | An ordinary binding group
BDecls :: l -> [Decl l] -> Binds l
-- | A binding group for implicit parameters
IPBinds :: l -> [IPBind l] -> Binds l
-- | A binding of an implicit parameter.
data IPBind l
IPBind :: l -> (IPName l) -> (Exp l) -> IPBind l
-- | Declarations inside a class declaration.
data ClassDecl l
-- | ordinary declaration
ClsDecl :: l -> (Decl l) -> ClassDecl l
-- | declaration of an associated data type
ClsDataFam :: l -> (Maybe (Context l)) -> (DeclHead l) -> (Maybe (Kind l)) -> ClassDecl l
-- | declaration of an associated type synonym
ClsTyFam :: l -> (DeclHead l) -> (Maybe (Kind l)) -> ClassDecl l
-- | default choice for an associated type synonym
ClsTyDef :: l -> (Type l) -> (Type l) -> ClassDecl l
-- | Declarations inside an instance declaration.
data InstDecl l
-- | ordinary declaration
InsDecl :: l -> (Decl l) -> InstDecl l
-- | an associated type definition
InsType :: l -> (Type l) -> (Type l) -> InstDecl l
-- | an associated data type implementation
InsData :: l -> (DataOrNew l) -> (Type l) -> [QualConDecl l] -> (Maybe (Deriving l)) -> InstDecl l
-- | an associated data type implemented using GADT style
InsGData :: l -> (DataOrNew l) -> (Type l) -> (Maybe (Kind l)) -> [GadtDecl l] -> (Maybe (Deriving l)) -> InstDecl l
-- | A deriving clause following a data type declaration.
data Deriving l
Deriving :: l -> [InstHead l] -> Deriving l
-- | A flag stating whether a declaration is a data or newtype declaration.
data DataOrNew l
DataType :: l -> DataOrNew l
NewType :: l -> DataOrNew l
-- | Declaration of an ordinary data constructor.
data ConDecl l
-- | ordinary data constructor
ConDecl :: l -> (Name l) -> [BangType l] -> ConDecl l
-- | infix data constructor
InfixConDecl :: l -> (BangType l) -> (Name l) -> (BangType l) -> ConDecl l
-- | record constructor
RecDecl :: l -> (Name l) -> [FieldDecl l] -> ConDecl l
-- | Declaration of a (list of) named field(s).
data FieldDecl l
FieldDecl :: l -> [Name l] -> (BangType l) -> FieldDecl l
-- | A single constructor declaration within a data type declaration, which
-- may have an existential quantification binding.
data QualConDecl l
QualConDecl :: l -> (Maybe [TyVarBind l]) -> (Maybe (Context l)) -> (ConDecl l) -> QualConDecl l
-- | A single constructor declaration in a GADT data type declaration.
data GadtDecl l
GadtDecl :: l -> (Name l) -> (Type l) -> GadtDecl l
-- | The type of a constructor argument or field, optionally including a
-- strictness annotation.
data BangType l
-- | strict component, marked with "<tt>!</tt>"
BangedTy :: l -> (Type l) -> BangType l
-- | non-strict component
UnBangedTy :: l -> (Type l) -> BangType l
-- | unboxed component, marked with an UNPACK pragma
UnpackedTy :: l -> (Type l) -> BangType l
-- | Clauses of a function binding.
data Match l
-- | A clause defined with prefix notation, i.e. the function name followed
-- by its argument patterns, the right-hand side and an optional where
-- clause.
Match :: l -> (Name l) -> [Pat l] -> (Rhs l) -> (Maybe (Binds l)) -> Match l
-- | A clause defined with infix notation, i.e. first its first argument
-- pattern, then the function name, then its following argument(s), the
-- right-hand side and an optional where clause. Note that there can be
-- more than two arguments to a function declared infix, hence the list
-- of pattern arguments.
InfixMatch :: l -> (Pat l) -> (Name l) -> [Pat l] -> (Rhs l) -> (Maybe (Binds l)) -> Match l
-- | The right hand side of a function or pattern binding.
data Rhs l
-- | unguarded right hand side (<i>exp</i>)
UnGuardedRhs :: l -> (Exp l) -> Rhs l
-- | guarded right hand side (<i>gdrhs</i>)
GuardedRhss :: l -> [GuardedRhs l] -> Rhs l
-- | A guarded right hand side <tt>|</tt> <i>stmts</i> <tt>=</tt>
-- <i>exp</i>. The guard is a series of statements when using pattern
-- guards, otherwise it will be a single qualifier expression.
data GuardedRhs l
GuardedRhs :: l -> [Stmt l] -> (Exp l) -> GuardedRhs l
-- | A context is a set of assertions
data Context l
CxSingle :: l -> (Asst l) -> Context l
CxTuple :: l -> [Asst l] -> Context l
CxParen :: l -> (Context l) -> Context l
CxEmpty :: l -> Context l
-- | A functional dependency, given on the form l1 l2 ... ln -> r2 r3 ..
-- rn
data FunDep l
FunDep :: l -> [Name l] -> [Name l] -> FunDep l
-- | Class assertions. In Haskell 98, the argument would be a <i>tyvar</i>,
-- but this definition allows multiple parameters, and allows them to be
-- <i>type</i>s. Also extended with support for implicit parameters and
-- equality constraints.
data Asst l
-- | ordinary class assertion
ClassA :: l -> (QName l) -> [Type l] -> Asst l
-- | class assertion where the class name is given infix
InfixA :: l -> (Type l) -> (QName l) -> (Type l) -> Asst l
-- | implicit parameter assertion
IParam :: l -> (IPName l) -> (Type l) -> Asst l
-- | type equality constraint
EqualP :: l -> (Type l) -> (Type l) -> Asst l
-- | A type qualified with a context. An unqualified type has an empty
-- context.
data Type l
-- | qualified type
TyForall :: l -> (Maybe [TyVarBind l]) -> (Maybe (Context l)) -> (Type l) -> Type l
-- | function type
TyFun :: l -> (Type l) -> (Type l) -> Type l
-- | tuple type, possibly boxed
TyTuple :: l -> Boxed -> [Type l] -> Type l
-- | list syntax, e.g. [a], as opposed to [] a
TyList :: l -> (Type l) -> Type l
-- | application of a type constructor
TyApp :: l -> (Type l) -> (Type l) -> Type l
-- | type variable
TyVar :: l -> (Name l) -> Type l
-- | named type or type constructor
TyCon :: l -> (QName l) -> Type l
-- | type surrounded by parentheses
TyParen :: l -> (Type l) -> Type l
-- | infix type constructor
TyInfix :: l -> (Type l) -> (QName l) -> (Type l) -> Type l
-- | type with explicit kind signature
TyKind :: l -> (Type l) -> (Kind l) -> Type l
-- | Flag denoting whether a tuple is boxed or unboxed.
data Boxed
Boxed :: Boxed
Unboxed :: Boxed
-- | An explicit kind annotation.
data Kind l
-- | <tt>*</tt>, the kind of types
KindStar :: l -> Kind l
-- | <tt>!</tt>, the kind of unboxed types
KindBang :: l -> Kind l
-- | <tt>-></tt>, the kind of a type constructor
KindFn :: l -> (Kind l) -> (Kind l) -> Kind l
-- | a parenthesised kind
KindParen :: l -> (Kind l) -> Kind l
-- | a kind variable (as-of-yet unsupported by compilers)
KindVar :: l -> (Name l) -> Kind l
-- | A type variable declaration, optionally with an explicit kind
-- annotation.
data TyVarBind l
-- | variable binding with kind annotation
KindedVar :: l -> (Name l) -> (Kind l) -> TyVarBind l
-- | ordinary variable binding
UnkindedVar :: l -> (Name l) -> TyVarBind l
-- | Haskell expressions.
data Exp l
-- | variable
Var :: l -> (QName l) -> Exp l
-- | implicit parameter variable
IPVar :: l -> (IPName l) -> Exp l
-- | data constructor
Con :: l -> (QName l) -> Exp l
-- | literal constant
Lit :: l -> (Literal l) -> Exp l
-- | infix application
InfixApp :: l -> (Exp l) -> (QOp l) -> (Exp l) -> Exp l
-- | ordinary application
App :: l -> (Exp l) -> (Exp l) -> Exp l
-- | negation expression <tt>-<i>exp</i></tt> (unary minus)
NegApp :: l -> (Exp l) -> Exp l
-- | lambda expression
Lambda :: l -> [Pat l] -> (Exp l) -> Exp l
-- | local declarations with <tt>let</tt> ... <tt>in</tt> ...
Let :: l -> (Binds l) -> (Exp l) -> Exp l
-- | <tt>if</tt> <i>exp</i> <tt>then</tt> <i>exp</i> <tt>else</tt>
-- <i>exp</i>
If :: l -> (Exp l) -> (Exp l) -> (Exp l) -> Exp l
-- | <tt>case</tt> <i>exp</i> <tt>of</tt> <i>alts</i>
Case :: l -> (Exp l) -> [Alt l] -> Exp l
-- | <tt>do</tt>-expression: the last statement in the list should be an
-- expression.
Do :: l -> [Stmt l] -> Exp l
-- | <tt>mdo</tt>-expression
MDo :: l -> [Stmt l] -> Exp l
-- | tuple expression
Tuple :: l -> Boxed -> [Exp l] -> Exp l
-- | tuple section expression, e.g. <tt>(,,3)</tt>
TupleSection :: l -> Boxed -> [Maybe (Exp l)] -> Exp l
-- | list expression
List :: l -> [Exp l] -> Exp l
-- | parenthesised expression
Paren :: l -> (Exp l) -> Exp l
-- | left section <tt>(</tt><i>exp</i> <i>qop</i><tt>)</tt>
LeftSection :: l -> (Exp l) -> (QOp l) -> Exp l
-- | right section <tt>(</tt><i>qop</i> <i>exp</i><tt>)</tt>
RightSection :: l -> (QOp l) -> (Exp l) -> Exp l
-- | record construction expression
RecConstr :: l -> (QName l) -> [FieldUpdate l] -> Exp l
-- | record update expression
RecUpdate :: l -> (Exp l) -> [FieldUpdate l] -> Exp l
-- | unbounded arithmetic sequence, incrementing by 1: <tt>[from ..]</tt>
EnumFrom :: l -> (Exp l) -> Exp l
-- | bounded arithmetic sequence, incrementing by 1 <tt>[from .. to]</tt>
EnumFromTo :: l -> (Exp l) -> (Exp l) -> Exp l
-- | unbounded arithmetic sequence, with first two elements given
-- <tt>[from, then ..]</tt>
EnumFromThen :: l -> (Exp l) -> (Exp l) -> Exp l
-- | bounded arithmetic sequence, with first two elements given <tt>[from,
-- then .. to]</tt>
EnumFromThenTo :: l -> (Exp l) -> (Exp l) -> (Exp l) -> Exp l
-- | ordinary list comprehension
ListComp :: l -> (Exp l) -> [QualStmt l] -> Exp l
-- | parallel list comprehension
ParComp :: l -> (Exp l) -> [[QualStmt l]] -> Exp l
-- | expression with explicit type signature
ExpTypeSig :: l -> (Exp l) -> (Type l) -> Exp l
-- | <tt>'x</tt> for template haskell reifying of expressions
VarQuote :: l -> (QName l) -> Exp l
-- | <tt>''T</tt> for template haskell reifying of types
TypQuote :: l -> (QName l) -> Exp l
-- | template haskell bracket expression
BracketExp :: l -> (Bracket l) -> Exp l
-- | template haskell splice expression
SpliceExp :: l -> (Splice l) -> Exp l
-- | quasi-quotaion: <tt>[$<i>name</i>| <i>string</i> |]</tt>
QuasiQuote :: l -> String -> String -> Exp l
-- | xml element, with attributes and children
XTag :: l -> (XName l) -> [XAttr l] -> (Maybe (Exp l)) -> [Exp l] -> Exp l
-- | empty xml element, with attributes
XETag :: l -> (XName l) -> [XAttr l] -> (Maybe (Exp l)) -> Exp l
-- | PCDATA child element
XPcdata :: l -> String -> Exp l
-- | escaped haskell expression inside xml
XExpTag :: l -> (Exp l) -> Exp l
-- | children of an xml element
XChildTag :: l -> [Exp l] -> Exp l
-- | CORE pragma
CorePragma :: l -> String -> (Exp l) -> Exp l
-- | SCC pragma
SCCPragma :: l -> String -> (Exp l) -> Exp l
-- | GENERATED pragma
GenPragma :: l -> String -> (Int, Int) -> (Int, Int) -> (Exp l) -> Exp l
-- | arrows proc: <tt>proc</tt> <i>pat</i> <tt>-></tt> <i>exp</i>
Proc :: l -> (Pat l) -> (Exp l) -> Exp l
-- | arrow application (from left): <i>exp</i> <tt>-<</tt> <i>exp</i>
LeftArrApp :: l -> (Exp l) -> (Exp l) -> Exp l
-- | arrow application (from right): <i>exp</i> <tt>>-</tt> <i>exp</i>
RightArrApp :: l -> (Exp l) -> (Exp l) -> Exp l
-- | higher-order arrow application (from left): <i>exp</i>
-- <tt>-<<</tt> <i>exp</i>
LeftArrHighApp :: l -> (Exp l) -> (Exp l) -> Exp l
-- | higher-order arrow application (from right): <i>exp</i>
-- <tt>>>-</tt> <i>exp</i>
RightArrHighApp :: l -> (Exp l) -> (Exp l) -> Exp l
-- | A statement, representing both a <i>stmt</i> in a
-- <tt>do</tt>-expression, an ordinary <i>qual</i> in a list
-- comprehension, as well as a <i>stmt</i> in a pattern guard.
data Stmt l
-- | a generator: <i>pat</i> <tt><-</tt> <i>exp</i>
Generator :: l -> (Pat l) -> (Exp l) -> Stmt l
-- | an <i>exp</i> by itself: in a <tt>do</tt>-expression, an action whose
-- result is discarded; in a list comprehension and pattern guard, a
-- guard expression
Qualifier :: l -> (Exp l) -> Stmt l
-- | local bindings
LetStmt :: l -> (Binds l) -> Stmt l
-- | a recursive binding group for arrows
RecStmt :: l -> [Stmt l] -> Stmt l
-- | A general <i>transqual</i> in a list comprehension, which could
-- potentially be a transform of the kind enabled by TransformListComp.
data QualStmt l
-- | an ordinary statement
QualStmt :: l -> (Stmt l) -> QualStmt l
-- | <tt>then</tt> <i>exp</i>
ThenTrans :: l -> (Exp l) -> QualStmt l
-- | <tt>then</tt> <i>exp</i> <tt>by</tt> <i>exp</i>
ThenBy :: l -> (Exp l) -> (Exp l) -> QualStmt l
-- | <tt>then</tt> <tt>group</tt> <tt>by</tt> <i>exp</i>
GroupBy :: l -> (Exp l) -> QualStmt l
-- | <tt>then</tt> <tt>group</tt> <tt>using</tt> <i>exp</i>
GroupUsing :: l -> (Exp l) -> QualStmt l
-- | <tt>then</tt> <tt>group</tt> <tt>by</tt> <i>exp</i> <tt>using</tt>
-- <i>exp</i>
GroupByUsing :: l -> (Exp l) -> (Exp l) -> QualStmt l
-- | An <i>fbind</i> in a labeled construction or update expression.
data FieldUpdate l
-- | ordinary label-expresion pair
FieldUpdate :: l -> (QName l) -> (Exp l) -> FieldUpdate l
-- | record field pun
FieldPun :: l -> (Name l) -> FieldUpdate l
-- | record field wildcard
FieldWildcard :: l -> FieldUpdate l
-- | An <i>alt</i> alternative in a <tt>case</tt> expression.
data Alt l
Alt :: l -> (Pat l) -> (GuardedAlts l) -> (Maybe (Binds l)) -> Alt l
-- | The right-hand sides of a <tt>case</tt> alternative, which may be a
-- single right-hand side or a set of guarded ones.
data GuardedAlts l
-- | <tt>-></tt> <i>exp</i>
UnGuardedAlt :: l -> (Exp l) -> GuardedAlts l
-- | <i>gdpat</i>
GuardedAlts :: l -> [GuardedAlt l] -> GuardedAlts l
-- | A guarded case alternative <tt>|</tt> <i>stmts</i> <tt>-></tt>
-- <i>exp</i>.
data GuardedAlt l
GuardedAlt :: l -> [Stmt l] -> (Exp l) -> GuardedAlt l
-- | An xml attribute, which is a name-expression pair.
data XAttr l
XAttr :: l -> (XName l) -> (Exp l) -> XAttr l
-- | A pattern, to be matched against a value.
data Pat l
-- | variable
PVar :: l -> (Name l) -> Pat l
-- | literal constant
PLit :: l -> (Literal l) -> Pat l
-- | negated pattern
PNeg :: l -> (Pat l) -> Pat l
-- | n+k pattern
PNPlusK :: l -> (Name l) -> Integer -> Pat l
-- | pattern with an infix data constructor
PInfixApp :: l -> (Pat l) -> (QName l) -> (Pat l) -> Pat l
-- | data constructor and argument patterns
PApp :: l -> (QName l) -> [Pat l] -> Pat l
-- | tuple pattern
PTuple :: l -> Boxed -> [Pat l] -> Pat l
-- | list pattern
PList :: l -> [Pat l] -> Pat l
-- | parenthesized pattern
PParen :: l -> (Pat l) -> Pat l
-- | labelled pattern, record style
PRec :: l -> (QName l) -> [PatField l] -> Pat l
-- | <tt>@</tt>-pattern
PAsPat :: l -> (Name l) -> (Pat l) -> Pat l
-- | wildcard pattern: <tt>_</tt>
PWildCard :: l -> Pat l
-- | irrefutable pattern: <tt>~<i>pat</i></tt>
PIrrPat :: l -> (Pat l) -> Pat l
-- | pattern with type signature
PatTypeSig :: l -> (Pat l) -> (Type l) -> Pat l
-- | view patterns of the form <tt>(<i>exp</i> -> <i>pat</i>)</tt>
PViewPat :: l -> (Exp l) -> (Pat l) -> Pat l
-- | regular list pattern
PRPat :: l -> [RPat l] -> Pat l
-- | XML element pattern
PXTag :: l -> (XName l) -> [PXAttr l] -> (Maybe (Pat l)) -> [Pat l] -> Pat l
-- | XML singleton element pattern
PXETag :: l -> (XName l) -> [PXAttr l] -> (Maybe (Pat l)) -> Pat l
-- | XML PCDATA pattern
PXPcdata :: l -> String -> Pat l
-- | XML embedded pattern
PXPatTag :: l -> (Pat l) -> Pat l
-- | XML regular list pattern
PXRPats :: l -> [RPat l] -> Pat l
-- | Explicit generics style type argument e.g. <tt>f {| Int |} x =
-- ...</tt>
PExplTypeArg :: l -> (QName l) -> (Type l) -> Pat l
-- | quasi quote pattern: <tt>[$<i>name</i>| <i>string</i> |]</tt>
PQuasiQuote :: l -> String -> String -> Pat l
-- | strict (bang) pattern: <tt>f !x = ...</tt>
PBangPat :: l -> (Pat l) -> Pat l
-- | An <i>fpat</i> in a labeled record pattern.
data PatField l
-- | ordinary label-pattern pair
PFieldPat :: l -> (QName l) -> (Pat l) -> PatField l
-- | record field pun
PFieldPun :: l -> (Name l) -> PatField l
-- | record field wildcard
PFieldWildcard :: l -> PatField l
-- | An XML attribute in a pattern.
data PXAttr l
PXAttr :: l -> (XName l) -> (Pat l) -> PXAttr l
-- | An entity in a regular pattern.
data RPat l
-- | operator pattern, e.g. pat*
RPOp :: l -> (RPat l) -> (RPatOp l) -> RPat l
-- | choice pattern, e.g. (1 | 2)
RPEither :: l -> (RPat l) -> (RPat l) -> RPat l
-- | sequence pattern, e.g. (| 1, 2, 3 |)
RPSeq :: l -> [RPat l] -> RPat l
-- | guarded pattern, e.g. (| p | p < 3 |)
RPGuard :: l -> (Pat l) -> [Stmt l] -> RPat l
-- | non-linear variable binding, e.g. (foo@:(1 | 2))*
RPCAs :: l -> (Name l) -> (RPat l) -> RPat l
-- | linear variable binding, e.g. foo@(1 | 2)
RPAs :: l -> (Name l) -> (RPat l) -> RPat l
-- | parenthesised pattern, e.g. (2*)
RPParen :: l -> (RPat l) -> RPat l
-- | an ordinary pattern
RPPat :: l -> (Pat l) -> RPat l
-- | A regular pattern operator.
data RPatOp l
-- | <tt>*</tt> = 0 or more
RPStar :: l -> RPatOp l
-- | <tt>*!</tt> = 0 or more, greedy
RPStarG :: l -> RPatOp l
-- | <tt>+</tt> = 1 or more
RPPlus :: l -> RPatOp l
-- | <tt>+!</tt> = 1 or more, greedy
RPPlusG :: l -> RPatOp l
-- | <tt>?</tt> = 0 or 1
RPOpt :: l -> RPatOp l
-- | <tt>?!</tt> = 0 or 1, greedy
RPOptG :: l -> RPatOp l
-- | <i>literal</i> Values of this type hold the abstract value of the
-- literal, along with the precise string representation used. For
-- example, <tt>10</tt>, <tt>0o12</tt> and <tt>0xa</tt> have the same
-- value representation, but each carry a different string
-- representation.
data Literal l
-- | character literal
Char :: l -> Char -> String -> Literal l
-- | string literal
String :: l -> String -> String -> Literal l
-- | integer literal
Int :: l -> Integer -> String -> Literal l
-- | floating point literal
Frac :: l -> Rational -> String -> Literal l
-- | unboxed integer literal
PrimInt :: l -> Integer -> String -> Literal l
-- | unboxed word literal
PrimWord :: l -> Integer -> String -> Literal l
-- | unboxed float literal
PrimFloat :: l -> Rational -> String -> Literal l
-- | unboxed double literal
PrimDouble :: l -> Rational -> String -> Literal l
-- | unboxed character literal
PrimChar :: l -> Char -> String -> Literal l
-- | unboxed string literal
PrimString :: l -> String -> String -> Literal l
-- | The name of a Haskell module.
data ModuleName l
ModuleName :: l -> String -> ModuleName l
-- | This type is used to represent qualified variables, and also qualified
-- constructors.
data QName l
-- | name qualified with a module name
Qual :: l -> (ModuleName l) -> (Name l) -> QName l
-- | unqualified local name
UnQual :: l -> (Name l) -> QName l
-- | built-in constructor with special syntax
Special :: l -> (SpecialCon l) -> QName l
-- | This type is used to represent variables, and also constructors.
data Name l
-- | <i>varid</i> or <i>conid</i>.
Ident :: l -> String -> Name l
-- | <i>varsym</i> or <i>consym</i>
Symbol :: l -> String -> Name l
-- | Possibly qualified infix operators (<i>qop</i>), appearing in
-- expressions.
data QOp l
-- | variable operator (<i>qvarop</i>)
QVarOp :: l -> (QName l) -> QOp l
-- | constructor operator (<i>qconop</i>)
QConOp :: l -> (QName l) -> QOp l
-- | Operators appearing in <tt>infix</tt> declarations are never
-- qualified.
data Op l
-- | variable operator (<i>varop</i>)
VarOp :: l -> (Name l) -> Op l
-- | constructor operator (<i>conop</i>)
ConOp :: l -> (Name l) -> Op l
-- | Constructors with special syntax. These names are never qualified, and
-- always refer to builtin type or data constructors.
data SpecialCon l
-- | unit type and data constructor <tt>()</tt>
UnitCon :: l -> SpecialCon l
-- | list type constructor <tt>[]</tt>
ListCon :: l -> SpecialCon l
-- | function type constructor <tt>-></tt>
FunCon :: l -> SpecialCon l
-- | <i>n</i>-ary tuple type and data constructors <tt>(,)</tt> etc,
-- possibly boxed <tt>(#,#)</tt>
TupleCon :: l -> Boxed -> Int -> SpecialCon l
-- | list data constructor <tt>(:)</tt>
Cons :: l -> SpecialCon l
-- | unboxed singleton tuple constructor <tt>(# #)</tt>
UnboxedSingleCon :: l -> SpecialCon l
-- | A name (<i>cname</i>) of a component of a class or data type in an
-- <tt>import</tt> or export specification.
data CName l
-- | name of a method or field
VarName :: l -> (Name l) -> CName l
-- | name of a data constructor
ConName :: l -> (Name l) -> CName l
-- | An implicit parameter name.
data IPName l
-- | ?<i>ident</i>, non-linear implicit parameter
IPDup :: l -> String -> IPName l
-- | %<i>ident</i>, linear implicit parameter
IPLin :: l -> String -> IPName l
-- | The name of an xml element or attribute, possibly qualified with a
-- namespace.
data XName l
XName :: l -> String -> XName l
XDomName :: l -> String -> String -> XName l
-- | A template haskell bracket expression.
data Bracket l
-- | expression bracket: <tt>[| ... |]</tt>
ExpBracket :: l -> (Exp l) -> Bracket l
-- | pattern bracket: <tt>[p| ... |]</tt>
PatBracket :: l -> (Pat l) -> Bracket l
-- | type bracket: <tt>[t| ... |]</tt>
TypeBracket :: l -> (Type l) -> Bracket l
-- | declaration bracket: <tt>[d| ... |]</tt>
DeclBracket :: l -> [Decl l] -> Bracket l
-- | A template haskell splice expression
data Splice l
-- | variable splice: <tt>$var</tt>
IdSplice :: l -> String -> Splice l
-- | parenthesised expression splice: <tt>$(<i>exp</i>)</tt>
ParenSplice :: l -> (Exp l) -> Splice l
-- | The safety of a foreign function call.
data Safety l
-- | unsafe
PlayRisky :: l -> Safety l
-- | safe (<a>False</a>) or threadsafe (<a>True</a>)
PlaySafe :: l -> Bool -> Safety l
-- | interruptible
PlayInterruptible :: l -> Safety l
-- | The calling convention of a foreign function call.
data CallConv l
StdCall :: l -> CallConv l
CCall :: l -> CallConv l
CPlusPlus :: l -> CallConv l
DotNet :: l -> CallConv l
Jvm :: l -> CallConv l
Js :: l -> CallConv l
CApi :: l -> CallConv l
-- | A top level options pragma, preceding the module header.
data ModulePragma l
-- | LANGUAGE pragma
LanguagePragma :: l -> [Name l] -> ModulePragma l
-- | OPTIONS pragma, possibly qualified with a tool, e.g. OPTIONS_GHC
OptionsPragma :: l -> (Maybe Tool) -> String -> ModulePragma l
-- | ANN pragma with module scope
AnnModulePragma :: l -> (Annotation l) -> ModulePragma l
-- | Recognised tools for OPTIONS pragmas.
data Tool
GHC :: Tool
HUGS :: Tool
NHC98 :: Tool
YHC :: Tool
HADDOCK :: Tool
UnknownTool :: String -> Tool
-- | The body of a RULES pragma.
data Rule l
Rule :: l -> String -> (Maybe (Activation l)) -> (Maybe [RuleVar l]) -> (Exp l) -> (Exp l) -> Rule l
-- | Variables used in a RULES pragma, optionally annotated with types
data RuleVar l
RuleVar :: l -> (Name l) -> RuleVar l
TypedRuleVar :: l -> (Name l) -> (Type l) -> RuleVar l
-- | Activation clause of a RULES pragma.
data Activation l
ActiveFrom :: l -> Int -> Activation l
ActiveUntil :: l -> Int -> Activation l
-- | An annotation through an ANN pragma.
data Annotation l
-- | An annotation for a declared name.
Ann :: l -> (Name l) -> (Exp l) -> Annotation l
-- | An annotation for a declared type.
TypeAnn :: l -> (Name l) -> (Exp l) -> Annotation l
-- | An annotation for the defining module.
ModuleAnn :: l -> (Exp l) -> Annotation l
prelude_mod :: l -> ModuleName l
main_mod :: l -> ModuleName l
main_name :: l -> Name l
unit_con_name :: l -> QName l
tuple_con_name :: l -> Boxed -> Int -> QName l
list_cons_name :: l -> QName l
unboxed_singleton_con_name :: l -> QName l
unit_con :: l -> Exp l
tuple_con :: l -> Boxed -> Int -> Exp l
unboxed_singleton_con :: l -> Exp l
as_name :: l -> Name l
qualified_name :: l -> Name l
hiding_name :: l -> Name l
minus_name :: l -> Name l
bang_name :: l -> Name l
dot_name :: l -> Name l
star_name :: l -> Name l
export_name :: l -> Name l
safe_name :: l -> Name l
unsafe_name :: l -> Name l
threadsafe_name :: l -> Name l
stdcall_name :: l -> Name l
ccall_name :: l -> Name l
cplusplus_name :: l -> Name l
dotnet_name :: l -> Name l
jvm_name :: l -> Name l
js_name :: l -> Name l
forall_name :: l -> Name l
family_name :: l -> Name l
unit_tycon_name :: l -> QName l
fun_tycon_name :: l -> QName l
list_tycon_name :: l -> QName l
tuple_tycon_name :: l -> Boxed -> Int -> QName l
unboxed_singleton_tycon_name :: l -> QName l
unit_tycon :: l -> Type l
fun_tycon :: l -> Type l
list_tycon :: l -> Type l
tuple_tycon :: l -> Boxed -> Int -> Type l
unboxed_singleton_tycon :: l -> Type l
-- | AST nodes are annotated, and this class allows manipulation of the
-- annotations.
class Functor ast => Annotated ast
ann :: Annotated ast => ast l -> l
amap :: Annotated ast => (l -> l) -> ast l -> ast l
-- | Test if two AST elements are equal modulo annotations.
(=~=) :: (Annotated a, Eq (a ())) => a l1 -> a l2 -> Bool
instance Typeable1 ModuleName
instance Typeable1 Name
instance Typeable1 IPName
instance Typeable1 Op
instance Typeable1 CName
instance Typeable1 ImportSpec
instance Typeable1 ImportSpecList
instance Typeable1 ImportDecl
instance Typeable1 Assoc
instance Typeable1 DataOrNew
instance Typeable Boxed
instance Typeable1 SpecialCon
instance Typeable1 QName
instance Typeable1 ExportSpec
instance Typeable1 ExportSpecList
instance Typeable1 QOp
instance Typeable1 Kind
instance Typeable1 TyVarBind
instance Typeable1 DeclHead
instance Typeable1 FunDep
instance Typeable1 Asst
instance Typeable1 Type
instance Typeable1 Context
instance Typeable1 BangType
instance Typeable1 FieldDecl
instance Typeable1 ConDecl
instance Typeable1 GadtDecl
instance Typeable1 InstHead
instance Typeable1 Deriving
instance Typeable1 QualConDecl
instance Typeable1 Literal
instance Typeable1 XName
instance Typeable1 Safety
instance Typeable1 CallConv
instance Typeable Tool
instance Typeable1 Activation
instance Typeable1 RuleVar
instance Typeable1 WarningText
instance Typeable1 ModuleHead
instance Typeable1 RPatOp
instance Typeable1 GuardedAlt
instance Typeable1 Stmt
instance Typeable1 Pat
instance Typeable1 PatField
instance Typeable1 RPat
instance Typeable1 PXAttr
instance Typeable1 Exp
instance Typeable1 Alt
instance Typeable1 GuardedAlts
instance Typeable1 Binds
instance Typeable1 IPBind
instance Typeable1 Decl
instance Typeable1 Rule
instance Typeable1 Rhs
instance Typeable1 GuardedRhs
instance Typeable1 InstDecl
instance Typeable1 ClassDecl
instance Typeable1 Match
instance Typeable1 Annotation
instance Typeable1 FieldUpdate
instance Typeable1 QualStmt
instance Typeable1 Splice
instance Typeable1 Bracket
instance Typeable1 XAttr
instance Typeable1 ModulePragma
instance Typeable1 Module
instance Eq l => Eq (ModuleName l)
instance Ord l => Ord (ModuleName l)
instance Show l => Show (ModuleName l)
instance Data l => Data (ModuleName l)
instance Foldable ModuleName
instance Traversable ModuleName
instance Eq l => Eq (Name l)
instance Ord l => Ord (Name l)
instance Show l => Show (Name l)
instance Data l => Data (Name l)
instance Foldable Name
instance Traversable Name
instance Eq l => Eq (IPName l)
instance Ord l => Ord (IPName l)
instance Show l => Show (IPName l)
instance Data l => Data (IPName l)
instance Foldable IPName
instance Traversable IPName
instance Eq l => Eq (Op l)
instance Ord l => Ord (Op l)
instance Show l => Show (Op l)
instance Data l => Data (Op l)
instance Foldable Op
instance Traversable Op
instance Eq l => Eq (CName l)
instance Ord l => Ord (CName l)
instance Show l => Show (CName l)
instance Data l => Data (CName l)
instance Foldable CName
instance Traversable CName
instance Eq l => Eq (ImportSpec l)
instance Ord l => Ord (ImportSpec l)
instance Show l => Show (ImportSpec l)
instance Data l => Data (ImportSpec l)
instance Foldable ImportSpec
instance Traversable ImportSpec
instance Eq l => Eq (ImportSpecList l)
instance Ord l => Ord (ImportSpecList l)
instance Show l => Show (ImportSpecList l)
instance Data l => Data (ImportSpecList l)
instance Foldable ImportSpecList
instance Traversable ImportSpecList
instance Eq l => Eq (ImportDecl l)
instance Ord l => Ord (ImportDecl l)
instance Show l => Show (ImportDecl l)
instance Data l => Data (ImportDecl l)
instance Foldable ImportDecl
instance Traversable ImportDecl
instance Eq l => Eq (Assoc l)
instance Ord l => Ord (Assoc l)
instance Show l => Show (Assoc l)
instance Data l => Data (Assoc l)
instance Foldable Assoc
instance Traversable Assoc
instance Eq l => Eq (DataOrNew l)
instance Ord l => Ord (DataOrNew l)
instance Show l => Show (DataOrNew l)
instance Data l => Data (DataOrNew l)
instance Foldable DataOrNew
instance Traversable DataOrNew
instance Eq Boxed
instance Ord Boxed
instance Show Boxed
instance Data Boxed
instance Eq l => Eq (SpecialCon l)
instance Ord l => Ord (SpecialCon l)
instance Show l => Show (SpecialCon l)
instance Data l => Data (SpecialCon l)
instance Foldable SpecialCon
instance Traversable SpecialCon
instance Eq l => Eq (QName l)
instance Ord l => Ord (QName l)
instance Show l => Show (QName l)
instance Data l => Data (QName l)
instance Foldable QName
instance Traversable QName
instance Eq l => Eq (ExportSpec l)
instance Ord l => Ord (ExportSpec l)
instance Show l => Show (ExportSpec l)
instance Data l => Data (ExportSpec l)
instance Foldable ExportSpec
instance Traversable ExportSpec
instance Eq l => Eq (ExportSpecList l)
instance Ord l => Ord (ExportSpecList l)
instance Show l => Show (ExportSpecList l)
instance Data l => Data (ExportSpecList l)
instance Foldable ExportSpecList
instance Traversable ExportSpecList
instance Eq l => Eq (QOp l)
instance Ord l => Ord (QOp l)
instance Show l => Show (QOp l)
instance Data l => Data (QOp l)
instance Foldable QOp
instance Traversable QOp
instance Eq l => Eq (Kind l)
instance Ord l => Ord (Kind l)
instance Show l => Show (Kind l)
instance Data l => Data (Kind l)
instance Foldable Kind
instance Traversable Kind
instance Eq l => Eq (TyVarBind l)
instance Ord l => Ord (TyVarBind l)
instance Show l => Show (TyVarBind l)
instance Data l => Data (TyVarBind l)
instance Foldable TyVarBind
instance Traversable TyVarBind
instance Eq l => Eq (DeclHead l)
instance Ord l => Ord (DeclHead l)
instance Show l => Show (DeclHead l)
instance Data l => Data (DeclHead l)
instance Foldable DeclHead
instance Traversable DeclHead
instance Eq l => Eq (FunDep l)
instance Ord l => Ord (FunDep l)
instance Show l => Show (FunDep l)
instance Data l => Data (FunDep l)
instance Foldable FunDep
instance Traversable FunDep
instance Eq l => Eq (Asst l)
instance Ord l => Ord (Asst l)
instance Show l => Show (Asst l)
instance Data l => Data (Asst l)
instance Foldable Asst
instance Traversable Asst
instance Eq l => Eq (Type l)
instance Ord l => Ord (Type l)
instance Show l => Show (Type l)
instance Data l => Data (Type l)
instance Foldable Type
instance Traversable Type
instance Eq l => Eq (Context l)
instance Ord l => Ord (Context l)
instance Show l => Show (Context l)
instance Data l => Data (Context l)
instance Foldable Context
instance Traversable Context
instance Eq l => Eq (BangType l)
instance Ord l => Ord (BangType l)
instance Show l => Show (BangType l)
instance Data l => Data (BangType l)
instance Foldable BangType
instance Traversable BangType
instance Eq l => Eq (FieldDecl l)
instance Ord l => Ord (FieldDecl l)
instance Show l => Show (FieldDecl l)
instance Data l => Data (FieldDecl l)
instance Foldable FieldDecl
instance Traversable FieldDecl
instance Eq l => Eq (ConDecl l)
instance Ord l => Ord (ConDecl l)
instance Show l => Show (ConDecl l)
instance Data l => Data (ConDecl l)
instance Foldable ConDecl
instance Traversable ConDecl
instance Eq l => Eq (GadtDecl l)
instance Ord l => Ord (GadtDecl l)
instance Show l => Show (GadtDecl l)
instance Data l => Data (GadtDecl l)
instance Foldable GadtDecl
instance Traversable GadtDecl
instance Eq l => Eq (InstHead l)
instance Ord l => Ord (InstHead l)
instance Show l => Show (InstHead l)
instance Data l => Data (InstHead l)
instance Foldable InstHead
instance Traversable InstHead
instance Eq l => Eq (Deriving l)
instance Ord l => Ord (Deriving l)
instance Show l => Show (Deriving l)
instance Data l => Data (Deriving l)
instance Foldable Deriving
instance Traversable Deriving
instance Eq l => Eq (QualConDecl l)
instance Ord l => Ord (QualConDecl l)
instance Show l => Show (QualConDecl l)
instance Data l => Data (QualConDecl l)
instance Foldable QualConDecl
instance Traversable QualConDecl
instance Eq l => Eq (Literal l)
instance Ord l => Ord (Literal l)
instance Show l => Show (Literal l)
instance Data l => Data (Literal l)
instance Foldable Literal
instance Traversable Literal
instance Eq l => Eq (XName l)
instance Ord l => Ord (XName l)
instance Show l => Show (XName l)
instance Data l => Data (XName l)
instance Foldable XName
instance Traversable XName
instance Eq l => Eq (Safety l)
instance Ord l => Ord (Safety l)
instance Show l => Show (Safety l)
instance Data l => Data (Safety l)
instance Foldable Safety
instance Traversable Safety
instance Eq l => Eq (CallConv l)
instance Ord l => Ord (CallConv l)
instance Show l => Show (CallConv l)
instance Data l => Data (CallConv l)
instance Foldable CallConv
instance Traversable CallConv
instance Eq Tool
instance Ord Tool
instance Show Tool
instance Data Tool
instance Eq l => Eq (Activation l)
instance Ord l => Ord (Activation l)
instance Show l => Show (Activation l)
instance Data l => Data (Activation l)
instance Foldable Activation
instance Traversable Activation
instance Eq l => Eq (RuleVar l)
instance Ord l => Ord (RuleVar l)
instance Show l => Show (RuleVar l)
instance Data l => Data (RuleVar l)
instance Foldable RuleVar
instance Traversable RuleVar
instance Eq l => Eq (WarningText l)
instance Ord l => Ord (WarningText l)
instance Show l => Show (WarningText l)
instance Data l => Data (WarningText l)
instance Foldable WarningText
instance Traversable WarningText
instance Eq l => Eq (ModuleHead l)
instance Ord l => Ord (ModuleHead l)
instance Show l => Show (ModuleHead l)
instance Data l => Data (ModuleHead l)
instance Foldable ModuleHead
instance Traversable ModuleHead
instance Eq l => Eq (RPatOp l)
instance Ord l => Ord (RPatOp l)
instance Show l => Show (RPatOp l)
instance Data l => Data (RPatOp l)
instance Foldable RPatOp
instance Traversable RPatOp
instance Eq l => Eq (GuardedAlt l)
instance Ord l => Ord (GuardedAlt l)
instance Show l => Show (GuardedAlt l)
instance Data l => Data (GuardedAlt l)
instance Foldable GuardedAlt
instance Traversable GuardedAlt
instance Eq l => Eq (Stmt l)
instance Ord l => Ord (Stmt l)
instance Show l => Show (Stmt l)
instance Data l => Data (Stmt l)
instance Foldable Stmt
instance Traversable Stmt
instance Eq l => Eq (Pat l)
instance Ord l => Ord (Pat l)
instance Show l => Show (Pat l)
instance Data l => Data (Pat l)
instance Foldable Pat
instance Traversable Pat
instance Eq l => Eq (PatField l)
instance Ord l => Ord (PatField l)
instance Show l => Show (PatField l)
instance Data l => Data (PatField l)
instance Foldable PatField
instance Traversable PatField
instance Eq l => Eq (RPat l)
instance Ord l => Ord (RPat l)
instance Show l => Show (RPat l)
instance Data l => Data (RPat l)
instance Foldable RPat
instance Traversable RPat
instance Eq l => Eq (PXAttr l)
instance Ord l => Ord (PXAttr l)
instance Show l => Show (PXAttr l)
instance Data l => Data (PXAttr l)
instance Foldable PXAttr
instance Traversable PXAttr
instance Eq l => Eq (Exp l)
instance Ord l => Ord (Exp l)
instance Show l => Show (Exp l)
instance Data l => Data (Exp l)
instance Foldable Exp
instance Traversable Exp
instance Eq l => Eq (Alt l)
instance Ord l => Ord (Alt l)
instance Show l => Show (Alt l)
instance Data l => Data (Alt l)
instance Foldable Alt
instance Traversable Alt
instance Eq l => Eq (GuardedAlts l)
instance Ord l => Ord (GuardedAlts l)
instance Show l => Show (GuardedAlts l)
instance Data l => Data (GuardedAlts l)
instance Foldable GuardedAlts
instance Traversable GuardedAlts
instance Eq l => Eq (Binds l)
instance Ord l => Ord (Binds l)
instance Show l => Show (Binds l)
instance Data l => Data (Binds l)
instance Foldable Binds
instance Traversable Binds
instance Eq l => Eq (IPBind l)
instance Ord l => Ord (IPBind l)
instance Show l => Show (IPBind l)
instance Data l => Data (IPBind l)
instance Foldable IPBind
instance Traversable IPBind
instance Eq l => Eq (Decl l)
instance Ord l => Ord (Decl l)
instance Show l => Show (Decl l)
instance Data l => Data (Decl l)
instance Foldable Decl
instance Traversable Decl
instance Eq l => Eq (Rule l)
instance Ord l => Ord (Rule l)
instance Show l => Show (Rule l)
instance Data l => Data (Rule l)
instance Foldable Rule
instance Traversable Rule
instance Eq l => Eq (Rhs l)
instance Ord l => Ord (Rhs l)
instance Show l => Show (Rhs l)
instance Data l => Data (Rhs l)
instance Foldable Rhs
instance Traversable Rhs
instance Eq l => Eq (GuardedRhs l)
instance Ord l => Ord (GuardedRhs l)
instance Show l => Show (GuardedRhs l)
instance Data l => Data (GuardedRhs l)
instance Foldable GuardedRhs
instance Traversable GuardedRhs
instance Eq l => Eq (InstDecl l)
instance Ord l => Ord (InstDecl l)
instance Show l => Show (InstDecl l)
instance Data l => Data (InstDecl l)
instance Foldable InstDecl
instance Traversable InstDecl
instance Eq l => Eq (ClassDecl l)
instance Ord l => Ord (ClassDecl l)
instance Show l => Show (ClassDecl l)
instance Data l => Data (ClassDecl l)
instance Foldable ClassDecl
instance Traversable ClassDecl
instance Eq l => Eq (Match l)
instance Ord l => Ord (Match l)
instance Show l => Show (Match l)
instance Data l => Data (Match l)
instance Foldable Match
instance Traversable Match
instance Eq l => Eq (Annotation l)
instance Ord l => Ord (Annotation l)
instance Show l => Show (Annotation l)
instance Data l => Data (Annotation l)
instance Foldable Annotation
instance Traversable Annotation
instance Eq l => Eq (FieldUpdate l)
instance Ord l => Ord (FieldUpdate l)
instance Show l => Show (FieldUpdate l)
instance Data l => Data (FieldUpdate l)
instance Foldable FieldUpdate
instance Traversable FieldUpdate
instance Eq l => Eq (QualStmt l)
instance Ord l => Ord (QualStmt l)
instance Show l => Show (QualStmt l)
instance Data l => Data (QualStmt l)
instance Foldable QualStmt
instance Traversable QualStmt
instance Eq l => Eq (Splice l)
instance Ord l => Ord (Splice l)
instance Show l => Show (Splice l)
instance Data l => Data (Splice l)
instance Foldable Splice
instance Traversable Splice
instance Eq l => Eq (Bracket l)
instance Ord l => Ord (Bracket l)
instance Show l => Show (Bracket l)
instance Data l => Data (Bracket l)
instance Foldable Bracket
instance Traversable Bracket
instance Eq l => Eq (XAttr l)
instance Ord l => Ord (XAttr l)
instance Show l => Show (XAttr l)
instance Data l => Data (XAttr l)
instance Foldable XAttr
instance Traversable XAttr
instance Eq l => Eq (ModulePragma l)
instance Ord l => Ord (ModulePragma l)
instance Show l => Show (ModulePragma l)
instance Data l => Data (ModulePragma l)
instance Foldable ModulePragma
instance Traversable ModulePragma
instance Eq l => Eq (Module l)
instance Ord l => Ord (Module l)
instance Show l => Show (Module l)
instance Data l => Data (Module l)
instance Foldable Module
instance Traversable Module
instance Annotated GuardedAlt
instance Annotated GuardedAlts
instance Annotated Alt
instance Annotated FieldUpdate
instance Annotated QualStmt
instance Annotated Stmt
instance Annotated PatField
instance Annotated RPat
instance Annotated RPatOp
instance Annotated PXAttr
instance Annotated Pat
instance Annotated WarningText
instance Annotated RuleVar
instance Annotated Rule
instance Annotated Activation
instance Annotated ModulePragma
instance Annotated CallConv
instance Annotated Safety
instance Annotated Splice
instance Annotated Bracket
instance Annotated XAttr
instance Annotated XName
instance Annotated Exp
instance Annotated Literal
instance Annotated Asst
instance Annotated Context
instance Annotated FunDep
instance Annotated Kind
instance Annotated TyVarBind
instance Annotated Type
instance Annotated GuardedRhs
instance Annotated Rhs
instance Annotated BangType
instance Annotated InstDecl
instance Annotated ClassDecl
instance Annotated GadtDecl
instance Annotated FieldDecl
instance Annotated ConDecl
instance Annotated QualConDecl
instance Annotated Match
instance Annotated IPBind
instance Annotated Binds
instance Annotated InstHead
instance Annotated DeclHead
instance Annotated DataOrNew
instance Annotated Annotation
instance Annotated Decl
instance Annotated Deriving
instance Annotated Assoc
instance Annotated ImportSpec
instance Annotated ImportSpecList
instance Annotated ImportDecl
instance Annotated ExportSpec
instance Annotated ExportSpecList
instance Annotated ModuleHead
instance Annotated Module
instance Annotated CName
instance Annotated Op
instance Annotated QOp
instance Annotated IPName
instance Annotated Name
instance Annotated QName
instance Annotated SpecialCon
instance Annotated ModuleName
instance Functor GuardedAlt
instance Functor GuardedAlts
instance Functor Alt
instance Functor FieldUpdate
instance Functor QualStmt
instance Functor Stmt
instance Functor PatField
instance Functor RPat
instance Functor RPatOp
instance Functor PXAttr
instance Functor Pat
instance Functor WarningText
instance Functor RuleVar
instance Functor Rule
instance Functor Activation
instance Functor ModulePragma
instance Functor CallConv
instance Functor Safety
instance Functor Splice
instance Functor Bracket
instance Functor XAttr
instance Functor XName
instance Functor Exp
instance Functor Literal
instance Functor Asst
instance Functor Context
instance Functor FunDep
instance Functor Kind
instance Functor TyVarBind
instance Functor Type
instance Functor GuardedRhs
instance Functor Rhs
instance Functor BangType
instance Functor InstDecl
instance Functor ClassDecl
instance Functor GadtDecl
instance Functor FieldDecl
instance Functor ConDecl
instance Functor QualConDecl
instance Functor Match
instance Functor IPBind
instance Functor Binds
instance Functor Deriving
instance Functor InstHead
instance Functor DeclHead
instance Functor DataOrNew
instance Functor Annotation
instance Functor Decl
instance Functor Assoc
instance Functor ImportSpec
instance Functor ImportSpecList
instance Functor ImportDecl
instance Functor ExportSpec
instance Functor ExportSpecList
instance Functor ModuleHead
instance Functor Module
instance Functor CName
instance Functor Op
instance Functor QOp
instance Functor IPName
instance Functor Name
instance Functor QName
instance Functor SpecialCon
instance Functor ModuleName
-- | This module contains combinators to use when building Haskell source
-- trees programmatically, as opposed to parsing them from a string. The
-- contents here are quite experimental and will likely receive a lot of
-- attention when the rest has stabilised.
module Language.Haskell.Exts.Annotated.Build
-- | An identifier with the given string as its name. The string should be
-- a valid Haskell identifier.
name :: l -> String -> Name l
-- | A symbol identifier. The string should be a valid Haskell symbol
-- identifier.
sym :: l -> String -> Name l
-- | A local variable as expression.
var :: l -> Name l -> Exp l
-- | Use the given identifier as an operator.
op :: l -> Name l -> QOp l
-- | A qualified variable as expression.
qvar :: l -> ModuleName l -> Name l -> Exp l
-- | A pattern variable.
pvar :: l -> Name l -> Pat l
-- | Application of expressions by juxtaposition.
app :: l -> Exp l -> Exp l -> Exp l
-- | Apply an operator infix.
infixApp :: l -> Exp l -> QOp l -> Exp l -> Exp l
-- | Apply a function to a list of arguments.
appFun :: [l] -> Exp l -> [Exp l] -> Exp l
-- | A constructor pattern, with argument patterns.
pApp :: l -> Name l -> [Pat l] -> Pat l
-- | A tuple expression.
tuple :: l -> [Exp l] -> Exp l
-- | A tuple pattern.
pTuple :: l -> [Pat l] -> Pat l
-- | A tuple expression consisting of variables only.
varTuple :: l -> [Name l] -> Exp l
-- | A tuple pattern consisting of variables only.
pvarTuple :: l -> [Name l] -> Pat l
-- | A function with a given name.
function :: l -> String -> Exp l
-- | A literal string expression.
strE :: l -> String -> Exp l
-- | A literal character expression.
charE :: l -> Char -> Exp l
-- | A literal integer expression.
intE :: l -> Integer -> Exp l
-- | A literal string pattern.
strP :: l -> String -> Pat l
-- | A literal character pattern.
charP :: l -> Char -> Pat l
-- | A literal integer pattern.
intP :: l -> Integer -> Pat l
-- | A do block formed by the given statements. The last statement in the
-- list should be a <a>Qualifier</a> expression.
doE :: l -> [Stmt l] -> Exp l
-- | Lambda abstraction, given a list of argument patterns and an
-- expression body.
lamE :: l -> [Pat l] -> Exp l -> Exp l
-- | A <tt>let</tt> ... <tt>in</tt> block.
letE :: l -> [Decl l] -> Exp l -> Exp l
-- | A <tt>case</tt> expression.
caseE :: l -> Exp l -> [Alt l] -> Exp l
-- | An unguarded alternative in a <tt>case</tt> expression.
alt :: l -> Pat l -> Exp l -> Alt l
-- | An alternative with a single guard in a <tt>case</tt> expression.
altGW :: l -> Pat l -> [Stmt l] -> Exp l -> Binds l -> Alt l
-- | A list expression.
listE :: l -> [Exp l] -> Exp l
-- | The empty list expression.
eList :: l -> Exp l
-- | The empty list pattern.
peList :: l -> Pat l
-- | Put parentheses around an expression.
paren :: l -> Exp l -> Exp l
-- | Put parentheses around a pattern.
pParen :: l -> Pat l -> Pat l
-- | A qualifier expression statement.
qualStmt :: l -> Exp l -> Stmt l
-- | A generator statement: <i>pat</i> <tt><-</tt> <i>exp</i>
genStmt :: l -> Pat l -> Exp l -> Stmt l
-- | A <tt>let</tt> binding group as a statement.
letStmt :: l -> [Decl l] -> Stmt l
-- | Hoist a set of declarations to a binding group.
binds :: l -> [Decl l] -> Binds l
-- | An empty binding group.
noBinds :: l -> Binds l
-- | The wildcard pattern: <tt>_</tt>
wildcard :: l -> Pat l
-- | Generate k names by appending numbers 1 through k to a given string.
genNames :: l -> String -> Int -> [Name l]
-- | A function with a single clause
sfun :: l -> Name l -> [Name l] -> Rhs l -> Maybe (Binds l) -> Decl l
-- | A function with a single clause, a single argument, no guards and no
-- where declarations
simpleFun :: l -> Name l -> Name l -> Exp l -> Decl l
-- | A pattern bind where the pattern is a variable, and where there are no
-- guards and no 'where' clause.
patBind :: l -> Pat l -> Exp l -> Decl l
-- | A pattern bind where the pattern is a variable, and where there are no
-- guards, but with a 'where' clause.
patBindWhere :: l -> Pat l -> Exp l -> [Decl l] -> Decl l
-- | Bind an identifier to an expression.
nameBind :: l -> Name l -> Exp l -> Decl l
-- | Apply function of a given name to a list of arguments.
metaFunction :: l -> String -> [Exp l] -> Exp l
-- | Apply a constructor of a given name to a list of pattern arguments,
-- forming a constructor pattern.
metaConPat :: l -> String -> [Pat l] -> Pat l
-- | This module defines various data types representing source location
-- information, of varying degree of preciseness.
module Language.Haskell.Exts.SrcLoc
-- | A single position in the source.
data SrcLoc
SrcLoc :: String -> Int -> Int -> SrcLoc
srcFilename :: SrcLoc -> String
srcLine :: SrcLoc -> Int
srcColumn :: SrcLoc -> Int
noLoc :: SrcLoc
-- | A portion of the source, spanning one or more lines and zero or more
-- columns.
data SrcSpan
SrcSpan :: String -> Int -> Int -> Int -> Int -> SrcSpan
srcSpanFilename :: SrcSpan -> String
srcSpanStartLine :: SrcSpan -> Int
srcSpanStartColumn :: SrcSpan -> Int
srcSpanEndLine :: SrcSpan -> Int
srcSpanEndColumn :: SrcSpan -> Int
-- | Returns <a>srcSpanStartLine</a> and <a>srcSpanStartColumn</a> in a
-- pair.
srcSpanStart :: SrcSpan -> (Int, Int)
-- | Returns <a>srcSpanEndLine</a> and <a>srcSpanEndColumn</a> in a pair.
srcSpanEnd :: SrcSpan -> (Int, Int)
-- | Combine two locations in the source to denote a span.
mkSrcSpan :: SrcLoc -> SrcLoc -> SrcSpan
-- | Merge two source spans into a single span from the start of the first
-- to the end of the second. Assumes that the two spans relate to the
-- same source file.
mergeSrcSpan :: SrcSpan -> SrcSpan -> SrcSpan
-- | Test if a given span starts and ends at the same location.
isNullSpan :: SrcSpan -> Bool
spanSize :: SrcSpan -> (Int, Int)
-- | An entity located in the source.
data Loc a
Loc :: SrcSpan -> a -> Loc a
loc :: Loc a -> SrcSpan
unLoc :: Loc a -> a
-- | A portion of the source, extended with information on the position of
-- entities within the span.
data SrcSpanInfo
SrcSpanInfo :: SrcSpan -> [SrcSpan] -> SrcSpanInfo
srcInfoSpan :: SrcSpanInfo -> SrcSpan
srcInfoPoints :: SrcSpanInfo -> [SrcSpan]
-- | Generate a <a>SrcSpanInfo</a> with no positional information for
-- entities.
noInfoSpan :: SrcSpan -> SrcSpanInfo
-- | Generate a <a>SrcSpanInfo</a> with the supplied positional information
-- for entities.
infoSpan :: SrcSpan -> [SrcSpan] -> SrcSpanInfo
-- | Combine two <a>SrcSpanInfo</a>s into one that spans the combined
-- source area of the two arguments, leaving positional information
-- blank.
combSpanInfo :: SrcSpanInfo -> SrcSpanInfo -> SrcSpanInfo
-- | Short name for <a>combSpanInfo</a>
(<++>) :: SrcSpanInfo -> SrcSpanInfo -> SrcSpanInfo
-- | Optionally combine the first argument with the second, or return it
-- unchanged if the second argument is <a>Nothing</a>.
(<+?>) :: SrcSpanInfo -> Maybe SrcSpanInfo -> SrcSpanInfo
-- | Optionally combine the second argument with the first, or return it
-- unchanged if the first argument is <a>Nothing</a>.
(<?+>) :: Maybe SrcSpanInfo -> SrcSpanInfo -> SrcSpanInfo
-- | Add more positional information for entities of a span.
(<**) :: SrcSpanInfo -> [SrcSpan] -> SrcSpanInfo
-- | Merge two <a>SrcSpan</a>s and lift them to a <tt>SrcInfoSpan</tt> with
-- no positional information for entities.
(<^^>) :: SrcSpan -> SrcSpan -> SrcSpanInfo
-- | A class to work over all kinds of source location information.
class SrcInfo si where getPointLoc si = SrcLoc (fileName si) (startLine si) (startColumn si)
toSrcInfo :: SrcInfo si => SrcLoc -> [SrcSpan] -> SrcLoc -> si
fromSrcInfo :: SrcInfo si => SrcSpanInfo -> si
getPointLoc :: SrcInfo si => si -> SrcLoc
fileName :: SrcInfo si => si -> String
startLine :: SrcInfo si => si -> Int
startColumn :: SrcInfo si => si -> Int
instance Typeable SrcLoc
instance Typeable SrcSpan
instance Typeable SrcSpanInfo
instance Eq SrcLoc
instance Ord SrcLoc
instance Show SrcLoc
instance Data SrcLoc
instance Eq SrcSpan
instance Ord SrcSpan
instance Show SrcSpan
instance Data SrcSpan
instance Eq a => Eq (Loc a)
instance Ord a => Ord (Loc a)
instance Show a => Show (Loc a)
instance Eq SrcSpanInfo
instance Ord SrcSpanInfo
instance Show SrcSpanInfo
instance Data SrcSpanInfo
instance SrcInfo SrcSpanInfo
instance SrcInfo SrcSpan
instance SrcInfo SrcLoc
module Language.Haskell.Exts.Comments
-- | A Haskell comment. The <a>Bool</a> is <a>True</a> if the comment is
-- multi-line, i.e. <tt>{- -}</tt>.
data Comment
Comment :: Bool -> SrcSpan -> String -> Comment
instance Typeable Comment
instance Eq Comment
instance Show Comment
instance Data Comment
-- | Exact-printer for Haskell abstract syntax. The input is a
-- (semi-concrete) abstract syntax tree, annotated with exact source
-- information to enable printing the tree exactly as it was parsed.
module Language.Haskell.Exts.Annotated.ExactPrint
-- | Print an AST exactly as specified by the annotations on the nodes in
-- the tree.
exactPrint :: ExactP ast => ast SrcSpanInfo -> [Comment] -> String
class Annotated ast => ExactP ast
instance ExactP IPBind
instance ExactP FieldDecl
instance ExactP Activation
instance ExactP RuleVar
instance ExactP Rule
instance ExactP Safety
instance ExactP CallConv
instance ExactP Binds
instance ExactP XName
instance ExactP PXAttr
instance ExactP RPatOp
instance ExactP RPat
instance ExactP PatField
instance ExactP Pat
instance ExactP GuardedRhs
instance ExactP Rhs
instance ExactP Match
instance ExactP GuardedAlt
instance ExactP GuardedAlts
instance ExactP Alt
instance ExactP XAttr
instance ExactP Bracket
instance ExactP QualStmt
instance ExactP Stmt
instance ExactP FieldUpdate
instance ExactP Exp
instance ExactP Splice
instance ExactP BangType
instance ExactP GadtDecl
instance ExactP ConDecl
instance ExactP QualConDecl
instance ExactP FunDep
instance ExactP InstDecl
instance ExactP ClassDecl
instance ExactP Deriving
instance ExactP Asst
instance ExactP Context
instance ExactP Type
instance ExactP Kind
instance ExactP TyVarBind
instance ExactP InstHead
instance ExactP DeclHead
instance ExactP Annotation
instance ExactP Decl
instance ExactP DataOrNew
instance ExactP Assoc
instance ExactP WarningText
instance ExactP ModulePragma
instance ExactP ModuleHead
instance ExactP Module
instance ExactP ImportDecl
instance ExactP ImportSpec
instance ExactP ImportSpecList
instance ExactP ExportSpecList
instance ExactP ExportSpec
instance ExactP CName
instance ExactP Op
instance ExactP QOp
instance ExactP IPName
instance ExactP Name
instance ExactP QName
instance ExactP SpecialCon
instance ExactP ModuleName
instance ExactP Literal
instance Monad EP
-- | This module defines the list of recognized modular features of
-- Haskell, most often (sloppily) referred to as <a>extensions</a>.
--
-- Closely mimicking the Language.Haskell.Extension module from the Cabal
-- library, this package also includes functionality for <a>computing</a>
-- languages as sets of features. Also, we make no promise not to add
-- extensions not yet recognized by Cabal.
module Language.Haskell.Exts.Extension
data Language
-- | The Haskell 98 language as defined by the Haskell 98 report.
-- <a>http://haskell.org/onlinereport/</a>
Haskell98 :: Language
-- | The Haskell 2010 language as defined by the Haskell 2010 report.
-- <a>http://www.haskell.org/onlinereport/haskell2010</a>
Haskell2010 :: Language
-- | The minimal language resulting from disabling all recognized
-- extensions - including ones that are part of all known language
-- definitions e.g. MonomorphismRestriction.
HaskellAllDisabled :: Language
-- | An unknown language, identified by its name.
UnknownLanguage :: String -> Language
knownLanguages :: [Language]
classifyLanguage :: String -> Language
prettyLanguage :: Language -> String
-- | This represents language extensions beyond a base <a>Language</a>
-- definition (such as <a>Haskell98</a>) that are supported by some
-- implementations, usually in some special mode.
data Extension
-- | Enable a known extension
EnableExtension :: KnownExtension -> Extension
-- | Disable a known extension
DisableExtension :: KnownExtension -> Extension
-- | An unknown extension, identified by the name of its <tt>LANGUAGE</tt>
-- pragma.
UnknownExtension :: String -> Extension
data KnownExtension
-- | <ul>
-- <li><i>GHC § 7.6.3.4</i> Allow overlapping class instances, provided
-- there is a unique most specific instance for each use.</li>
-- </ul>
OverlappingInstances :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.6.3.3</i> Ignore structural rules guaranteeing the
-- termination of class instance resolution. Termination is guaranteed by
-- a fixed-depth recursion stack, and compilation may fail if this depth
-- is exceeded.</li>
-- </ul>
UndecidableInstances :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.6.3.4</i> Implies <a>OverlappingInstances</a>. Allow
-- the implementation to choose an instance even when it is possible that
-- further instantiation of types will lead to a more specific instance
-- being applicable.</li>
-- </ul>
IncoherentInstances :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.3.8.2</i> Deprecated in GHC. Allows recursive bindings
-- using <tt>mdo</tt>, a variant of <tt>do</tt>. <tt>DoRec</tt> provides
-- a different, preferred syntax.</li>
-- </ul>
RecursiveDo :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.3.9</i> Provide syntax for writing list comprehensions
-- which iterate over several lists together, like the <a>zipWith</a>
-- family of functions.</li>
-- </ul>
ParallelListComp :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.6.1.1</i> Allow multiple parameters in a type
-- class.</li>
-- </ul>
MultiParamTypeClasses :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.17</i> Enable the dreaded monomorphism
-- restriction.</li>
-- </ul>
MonomorphismRestriction :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.6.2</i> Allow a specification attached to a
-- multi-parameter type class which indicates that some parameters are
-- entirely determined by others. The implementation will check that this
-- property holds for the declared instances, and will use this property
-- to reduce ambiguity in instance resolution.</li>
-- </ul>
FunctionalDependencies :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.8.5</i> Like <a>RankNTypes</a> but does not allow a
-- higher-rank type to itself appear on the left of a function
-- arrow.</li>
-- </ul>
Rank2Types :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.8.5</i> Allow a universally-quantified type to occur on
-- the left of a function arrow.</li>
-- </ul>
RankNTypes :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.8.5</i> Allow data constructors to have polymorphic
-- arguments. Unlike <a>RankNTypes</a>, does not allow this for ordinary
-- functions.</li>
-- </ul>
PolymorphicComponents :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.4.4</i> Allow existentially-quantified data
-- constructors.</li>
-- </ul>
ExistentialQuantification :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.8.7</i> Cause a type variable in a signature, which has
-- an explicit <tt>forall</tt> quantifier, to scope over the definition
-- of the accompanying value declaration.</li>
-- </ul>
ScopedTypeVariables :: KnownExtension
-- | Deprecated, use <a>ScopedTypeVariables</a> instead.
PatternSignatures :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.8.3</i> Enable implicit function parameters with
-- dynamic scope.</li>
-- </ul>
ImplicitParams :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.8.2</i> Relax some restrictions on the form of the
-- context of a type signature.</li>
-- </ul>
FlexibleContexts :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.6.3.2</i> Relax some restrictions on the form of the
-- context of an instance declaration.</li>
-- </ul>
FlexibleInstances :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.4.1</i> Allow data type declarations with no
-- constructors.</li>
-- </ul>
EmptyDataDecls :: KnownExtension
-- | <ul>
-- <li><i>GHC § 4.10.3</i> Run the C preprocessor on Haskell source
-- code.</li>
-- </ul>
CPP :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.8.4</i> Allow an explicit kind signature giving the
-- kind of types over which a type variable ranges.</li>
-- </ul>
KindSignatures :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.11</i> Enable a form of pattern which forces evaluation
-- before an attempted match, and a form of strict
-- <tt>let</tt>/<tt>where</tt> binding.</li>
-- </ul>
BangPatterns :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.6.3.1</i> Allow type synonyms in instance heads.</li>
-- </ul>
TypeSynonymInstances :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.9</i> Enable Template Haskell, a system for
-- compile-time metaprogramming.</li>
-- </ul>
TemplateHaskell :: KnownExtension
-- | <ul>
-- <li><i>GHC § 8</i> Enable the Foreign Function Interface. In GHC,
-- implements the standard Haskell 98 Foreign Function Interface
-- Addendum, plus some GHC-specific extensions.</li>
-- </ul>
ForeignFunctionInterface :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.10</i> Enable arrow notation.</li>
-- </ul>
Arrows :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.16</i> Enable generic type classes, with default
-- instances defined in terms of the algebraic structure of a type.</li>
-- </ul>
Generics :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.3.11</i> Enable the implicit importing of the module
-- <tt>Prelude</tt>. When disabled, when desugaring certain built-in
-- syntax into ordinary identifiers, use whatever is in scope rather than
-- the <tt>Prelude</tt> -- version.</li>
-- </ul>
ImplicitPrelude :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.3.15</i> Enable syntax for implicitly binding local
-- names corresponding to the field names of a record. Puns bind specific
-- names, unlike <a>RecordWildCards</a>.</li>
-- </ul>
NamedFieldPuns :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.3.5</i> Enable a form of guard which matches a pattern
-- and binds variables.</li>
-- </ul>
PatternGuards :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.5.4</i> Allow a type declared with <tt>newtype</tt> to
-- use <tt>deriving</tt> for any class with an instance for the
-- underlying type.</li>
-- </ul>
GeneralizedNewtypeDeriving :: KnownExtension
-- | <ul>
-- <li><i>Hugs § 7.1</i> Enable the "Trex" extensible records
-- system.</li>
-- </ul>
ExtensibleRecords :: KnownExtension
-- | <ul>
-- <li><i>Hugs § 7.2</i> Enable type synonyms which are transparent in
-- some definitions and opaque elsewhere, as a way of implementing
-- abstract datatypes.</li>
-- </ul>
RestrictedTypeSynonyms :: KnownExtension
-- | <ul>
-- <li><i>Hugs § 7.3</i> Enable an alternate syntax for string literals,
-- with string templating.</li>
-- </ul>
HereDocuments :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.3.2</i> Allow the character <tt>#</tt> as a postfix
-- modifier on identifiers. Also enables literal syntax for unboxed
-- values.</li>
-- </ul>
MagicHash :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.7</i> Allow data types and type synonyms which are
-- indexed by types, i.e. ad-hoc polymorphism for types.</li>
-- </ul>
TypeFamilies :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.5.2</i> Allow a standalone declaration which invokes
-- the type class <tt>deriving</tt> mechanism.</li>
-- </ul>
StandaloneDeriving :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.3.1</i> Allow certain Unicode characters to stand for
-- certain ASCII character sequences, e.g. keywords and punctuation.</li>
-- </ul>
UnicodeSyntax :: KnownExtension
-- | <ul>
-- <li><i>GHC § 8.1.1</i> Allow the use of unboxed types as foreign
-- types, e.g. in <tt>foreign import</tt> and <tt>foreign
-- export</tt>.</li>
-- </ul>
UnliftedFFITypes :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.4.3</i> Defer validity checking of types until after
-- expanding type synonyms, relaxing the constraints on how synonyms may
-- be used.</li>
-- </ul>
LiberalTypeSynonyms :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.4.2</i> Allow the name of a type constructor, type
-- class, or type variable to be an infix operator.</li>
-- </ul>
TypeOperators :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.3.16</i> Enable syntax for implicitly binding local
-- names corresponding to the field names of a record. A wildcard binds
-- all unmentioned names, unlike <a>NamedFieldPuns</a>.</li>
-- </ul>
RecordWildCards :: KnownExtension
-- | Deprecated, use <a>NamedFieldPuns</a> instead.
RecordPuns :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.3.14</i> Allow a record field name to be disambiguated
-- by the type of the record it's in.</li>
-- </ul>
DisambiguateRecordFields :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.6.4</i> Enable overloading of string literals using a
-- type class, much like integer literals.</li>
-- </ul>
OverloadedStrings :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.4.6</i> Enable generalized algebraic data types, in
-- which type variables may be instantiated on a per-constructor basis.
-- Implies GADTSyntax.</li>
-- </ul>
GADTs :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.17.2</i> Make pattern bindings monomorphic.</li>
-- </ul>
MonoPatBinds :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.8.8</i> Relax the requirements on mutually-recursive
-- polymorphic functions.</li>
-- </ul>
RelaxedPolyRec :: KnownExtension
-- | <ul>
-- <li><i>GHC § 2.4.5</i> Allow default instantiation of polymorphic
-- types in more situations.</li>
-- </ul>
ExtendedDefaultRules :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.2.2</i> Enable unboxed tuples.</li>
-- </ul>
UnboxedTuples :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.5.3</i> Enable <tt>deriving</tt> for classes
-- <tt>Data.Typeable.Typeable</tt> and <tt>Data.Generics.Data</tt>.</li>
-- </ul>
DeriveDataTypeable :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.6.1.3</i> Allow a class method's type to place
-- additional constraints on a class type variable.</li>
-- </ul>
ConstrainedClassMethods :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.3.18</i> Allow imports to be qualified by the package
-- name the module is intended to be imported from, e.g.</li>
-- </ul>
--
-- <pre>
-- import "network" Network.Socket
-- </pre>
PackageImports :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.8.6</i> Deprecated in GHC 6.12 and will be removed in
-- GHC 7. Allow a type variable to be instantiated at a polymorphic
-- type.</li>
-- </ul>
ImpredicativeTypes :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.3.3</i> Change the syntax for qualified infix
-- operators.</li>
-- </ul>
NewQualifiedOperators :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.3.12</i> Relax the interpretation of left operator
-- sections to allow unary postfix operators.</li>
-- </ul>
PostfixOperators :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.9.5</i> Enable quasi-quotation, a mechanism for
-- defining new concrete syntax for expressions and patterns.</li>
-- </ul>
QuasiQuotes :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.3.10</i> Enable generalized list comprehensions,
-- supporting operations such as sorting and grouping.</li>
-- </ul>
TransformListComp :: KnownExtension
-- | <ul>
-- <li><i>GHC § 7.3.6</i> Enable view patterns, which match a value by
-- applying a function and matching on the result.</li>
-- </ul>
ViewPatterns :: KnownExtension
-- | Allow concrete XML syntax to be used in expressions and patterns, as
-- per the Haskell Server Pages extension language:
-- <a>http://www.haskell.org/haskellwiki/HSP</a>. The ideas behind it are
-- discussed in the paper "Haskell Server Pages through Dynamic Loading"
-- by Niklas Broberg, from Haskell Workshop '05.
XmlSyntax :: KnownExtension
-- | Allow regular pattern matching over lists, as discussed in the paper
-- "Regular Expression Patterns" by Niklas Broberg, Andreas Farre and
-- Josef Svenningsson, from ICFP '04.
RegularPatterns :: KnownExtension
-- | Enables the use of tuple sections, e.g. <tt>(, True)</tt> desugars
-- into <tt>x -> (x, True)</tt>.
TupleSections :: KnownExtension
-- | Allows GHC primops, written in C--, to be imported into a Haskell
-- file.
GHCForeignImportPrim :: KnownExtension
-- | Support for patterns of the form <tt>n + k</tt>, where <tt>k</tt> is
-- an integer literal.
NPlusKPatterns :: KnownExtension
-- | Improve the layout rule when <tt>if</tt> expressions are used in a
-- <tt>do</tt> block.
DoAndIfThenElse :: KnownExtension
-- | Makes much of the Haskell sugar be desugared into calls to the
-- function with a particular name that is in scope.
RebindableSyntax :: KnownExtension
-- | Make <tt>forall</tt> a keyword in types, which can be used to give the
-- generalisation explicitly.
ExplicitForAll :: KnownExtension
-- | Allow contexts to be put on datatypes, e.g. the <tt>Eq a</tt> in
-- <tt>data Eq a => Set a = NilSet | ConsSet a (Set a)</tt>.
DatatypeContexts :: KnownExtension
-- | Local (<tt>let</tt> and <tt>where</tt>) bindings are monomorphic.
MonoLocalBinds :: KnownExtension
-- | Enable <tt>deriving</tt> for the <tt>Data.Functor.Functor</tt> class.
DeriveFunctor :: KnownExtension
-- | Enable <tt>deriving</tt> for the <tt>Data.Traversable.Traversable</tt>
-- class.
DeriveTraversable :: KnownExtension
-- | Enable <tt>deriving</tt> for the <tt>Data.Foldable.Foldable</tt>
-- class.
DeriveFoldable :: KnownExtension
-- | Enable non-decreasing indentation for 'do' blocks.
NondecreasingIndentation :: KnownExtension
-- | <ul>
-- <li><i>GHC § 8.1.4</i> Enable interruptible FFI.</li>
-- </ul>
InterruptibleFFI :: KnownExtension
-- | <ul>
-- <li><i>GHC § 8.1.5</i> Enable the <tt>capi</tt> calling convention in
-- the foreign function interface.</li>
-- </ul>
CApiFFI :: KnownExtension
-- | A clever version of read that returns an <a>UnknownExtension</a> if
-- the string is not recognised.
classifyExtension :: String -> Extension
-- | Parse an enabled or disabled extension; returns
-- <a>UnknownExtension</a> if the parse fails.
parseExtension :: String -> Extension
-- | Pretty print an extension. Disabled extensions are prefixed with 'No'.
prettyExtension :: Extension -> String
ghcDefault :: [Extension]
-- | The list of extensions enabled by GHC's portmanteau -fglasgow-exts
-- flag.
glasgowExts :: [Extension]
-- | List of all known extensions, all enabled.
knownExtensions :: [Extension]
-- | Extensions that have been deprecated, possibly paired with another
-- extension that replaces it.
deprecatedExtensions :: [(Extension, Maybe Extension)]
-- | Certain extensions imply other extensions, and this function makes the
-- implication explicit. This also handles deprecated extensions, which
-- imply their replacements. The returned value is the transitive closure
-- of implied extensions.
impliesExts :: [KnownExtension] -> [KnownExtension]
toExtensionList :: Language -> [Extension] -> [KnownExtension]
instance Show Language
instance Read Language
instance Eq Language
instance Ord Language
instance Show KnownExtension
instance Read KnownExtension
instance Eq KnownExtension
instance Ord KnownExtension
instance Enum KnownExtension
instance Bounded KnownExtension
instance Show Extension
instance Read Extension
instance Eq Extension
instance Ord Extension
-- | A suite of datatypes describing the abstract syntax of Haskell 98
-- <a>http://www.haskell.org/onlinereport/</a> plus registered
-- extensions, including:
--
-- <ul>
-- <li>multi-parameter type classes with functional dependencies
-- (MultiParamTypeClasses, FunctionalDependencies)</li>
-- <li>parameters of type class assertions are unrestricted
-- (FlexibleContexts)</li>
-- <li><tt>forall</tt> types as universal and existential quantification
-- (RankNTypes, ExistentialQuantification, etc)</li>
-- <li>pattern guards (PatternGuards)</li>
-- <li>implicit parameters (ImplicitParameters)</li>
-- <li>generalised algebraic data types (GADTs)</li>
-- <li>template haskell (TemplateHaskell)</li>
-- <li>empty data type declarations (EmptyDataDecls)</li>
-- <li>unboxed tuples (UnboxedTuples)</li>
-- <li>regular patterns (RegularPatterns)</li>
-- <li>HSP-style XML expressions and patterns (XmlSyntax)</li>
-- </ul>
module Language.Haskell.Exts.Syntax
-- | A complete Haskell source module.
data Module
Module :: SrcLoc -> ModuleName -> [ModulePragma] -> (Maybe WarningText) -> (Maybe [ExportSpec]) -> [ImportDecl] -> [Decl] -> Module
-- | Warning text to optionally use in the module header of e.g. a
-- deprecated module.
data WarningText
DeprText :: String -> WarningText
WarnText :: String -> WarningText
-- | An item in a module's export specification.
data ExportSpec
-- | variable
EVar :: QName -> ExportSpec
-- | <tt>T</tt>: a class or datatype exported abstractly, or a type
-- synonym.
EAbs :: QName -> ExportSpec
-- | <tt>T(..)</tt>: a class exported with all of its methods, or a
-- datatype exported with all of its constructors.
EThingAll :: QName -> ExportSpec
-- | <tt>T(C_1,...,C_n)</tt>: a class exported with some of its methods, or
-- a datatype exported with some of its constructors.
EThingWith :: QName -> [CName] -> ExportSpec
-- | <tt>module M</tt>: re-export a module.
EModuleContents :: ModuleName -> ExportSpec
-- | An import declaration.
data ImportDecl
ImportDecl :: SrcLoc -> ModuleName -> Bool -> Bool -> Maybe String -> Maybe ModuleName -> Maybe (Bool, [ImportSpec]) -> ImportDecl
-- | position of the <tt>import</tt> keyword.
importLoc :: ImportDecl -> SrcLoc
-- | name of the module imported.
importModule :: ImportDecl -> ModuleName
-- | imported <tt>qualified</tt>?
importQualified :: ImportDecl -> Bool
-- | imported with <tt>{-# SOURCE #-}</tt>?
importSrc :: ImportDecl -> Bool
-- | imported with explicit package name
importPkg :: ImportDecl -> Maybe String
-- | optional alias name in an <tt>as</tt> clause.
importAs :: ImportDecl -> Maybe ModuleName
-- | optional list of import specifications. The <a>Bool</a> is <a>True</a>
-- if the names are excluded by <tt>hiding</tt>.
importSpecs :: ImportDecl -> Maybe (Bool, [ImportSpec])
-- | An import specification, representing a single explicit item imported
-- (or hidden) from a module.
data ImportSpec
-- | variable
IVar :: Name -> ImportSpec
-- | <tt>T</tt>: the name of a class, datatype or type synonym.
IAbs :: Name -> ImportSpec
-- | <tt>T(..)</tt>: a class imported with all of its methods, or a
-- datatype imported with all of its constructors.
IThingAll :: Name -> ImportSpec
-- | <tt>T(C_1,...,C_n)</tt>: a class imported with some of its methods, or
-- a datatype imported with some of its constructors.
IThingWith :: Name -> [CName] -> ImportSpec
-- | Associativity of an operator.
data Assoc
-- | non-associative operator (declared with <tt>infix</tt>)
AssocNone :: Assoc
-- | left-associative operator (declared with <tt>infixl</tt>).
AssocLeft :: Assoc
-- | right-associative operator (declared with <tt>infixr</tt>)
AssocRight :: Assoc
-- | A top-level declaration.
data Decl
-- | A type declaration
TypeDecl :: SrcLoc -> Name -> [TyVarBind] -> Type -> Decl
-- | A type family declaration
TypeFamDecl :: SrcLoc -> Name -> [TyVarBind] -> (Maybe Kind) -> Decl
-- | A data OR newtype declaration
DataDecl :: SrcLoc -> DataOrNew -> Context -> Name -> [TyVarBind] -> [QualConDecl] -> [Deriving] -> Decl
-- | A data OR newtype declaration, GADT style
GDataDecl :: SrcLoc -> DataOrNew -> Context -> Name -> [TyVarBind] -> (Maybe Kind) -> [GadtDecl] -> [Deriving] -> Decl
-- | A data family declaration
DataFamDecl :: SrcLoc -> Context -> Name -> [TyVarBind] -> (Maybe Kind) -> Decl
-- | A type family instance declaration
TypeInsDecl :: SrcLoc -> Type -> Type -> Decl
-- | A data family instance declaration
DataInsDecl :: SrcLoc -> DataOrNew -> Type -> [QualConDecl] -> [Deriving] -> Decl
-- | A data family instance declaration, GADT style
GDataInsDecl :: SrcLoc -> DataOrNew -> Type -> (Maybe Kind) -> [GadtDecl] -> [Deriving] -> Decl
-- | A declaration of a type class
ClassDecl :: SrcLoc -> Context -> Name -> [TyVarBind] -> [FunDep] -> [ClassDecl] -> Decl
-- | An declaration of a type class instance
InstDecl :: SrcLoc -> Context -> QName -> [Type] -> [InstDecl] -> Decl
-- | A standalone deriving declaration
DerivDecl :: SrcLoc -> Context -> QName -> [Type] -> Decl
-- | A declaration of operator fixity
InfixDecl :: SrcLoc -> Assoc -> Int -> [Op] -> Decl
-- | A declaration of default types
DefaultDecl :: SrcLoc -> [Type] -> Decl
-- | A Template Haskell splicing declaration
SpliceDecl :: SrcLoc -> Exp -> Decl
-- | A type signature declaration
TypeSig :: SrcLoc -> [Name] -> Type -> Decl
-- | A set of function binding clauses
FunBind :: [Match] -> Decl
-- | A pattern binding
PatBind :: SrcLoc -> Pat -> (Maybe Type) -> Rhs -> Binds -> Decl
-- | A foreign import declaration
ForImp :: SrcLoc -> CallConv -> Safety -> String -> Name -> Type -> Decl
-- | A foreign export declaration
ForExp :: SrcLoc -> CallConv -> String -> Name -> Type -> Decl
-- | A RULES pragma
RulePragmaDecl :: SrcLoc -> [Rule] -> Decl
-- | A DEPRECATED pragma
DeprPragmaDecl :: SrcLoc -> [([Name], String)] -> Decl
-- | A WARNING pragma
WarnPragmaDecl :: SrcLoc -> [([Name], String)] -> Decl
-- | An INLINE pragma
InlineSig :: SrcLoc -> Bool -> Activation -> QName -> Decl
-- | An INLINE CONLIKE pragma
InlineConlikeSig :: SrcLoc -> Activation -> QName -> Decl
-- | A SPECIALISE pragma
SpecSig :: SrcLoc -> Activation -> QName -> [Type] -> Decl
-- | A SPECIALISE INLINE pragma
SpecInlineSig :: SrcLoc -> Bool -> Activation -> QName -> [Type] -> Decl
-- | A SPECIALISE instance pragma
InstSig :: SrcLoc -> Context -> QName -> [Type] -> Decl
-- | An ANN pragma
AnnPragma :: SrcLoc -> Annotation -> Decl
-- | A binding group inside a <tt>let</tt> or <tt>where</tt> clause.
data Binds
-- | An ordinary binding group
BDecls :: [Decl] -> Binds
-- | A binding group for implicit parameters
IPBinds :: [IPBind] -> Binds
-- | A binding of an implicit parameter.
data IPBind
IPBind :: SrcLoc -> IPName -> Exp -> IPBind
-- | Declarations inside a class declaration.
data ClassDecl
-- | ordinary declaration
ClsDecl :: Decl -> ClassDecl
-- | declaration of an associated data type
ClsDataFam :: SrcLoc -> Context -> Name -> [TyVarBind] -> (Maybe Kind) -> ClassDecl
-- | declaration of an associated type synonym
ClsTyFam :: SrcLoc -> Name -> [TyVarBind] -> (Maybe Kind) -> ClassDecl
-- | default choice for an associated type synonym
ClsTyDef :: SrcLoc -> Type -> Type -> ClassDecl
-- | Declarations inside an instance declaration.
data InstDecl
-- | ordinary declaration
InsDecl :: Decl -> InstDecl
-- | an associated type definition
InsType :: SrcLoc -> Type -> Type -> InstDecl
-- | an associated data type implementation
InsData :: SrcLoc -> DataOrNew -> Type -> [QualConDecl] -> [Deriving] -> InstDecl
-- | an associated data type implemented using GADT style
InsGData :: SrcLoc -> DataOrNew -> Type -> (Maybe Kind) -> [GadtDecl] -> [Deriving] -> InstDecl
-- | A single derived instance, which may have arguments since it may be a
-- MPTC.
type Deriving = (QName, [Type])
-- | A flag stating whether a declaration is a data or newtype declaration.
data DataOrNew
DataType :: DataOrNew
NewType :: DataOrNew
-- | Declaration of an ordinary data constructor.
data ConDecl
-- | ordinary data constructor
ConDecl :: Name -> [BangType] -> ConDecl
-- | infix data constructor
InfixConDecl :: BangType -> Name -> BangType -> ConDecl
-- | record constructor
RecDecl :: Name -> [([Name], BangType)] -> ConDecl
-- | A single constructor declaration within a data type declaration, which
-- may have an existential quantification binding.
data QualConDecl
QualConDecl :: SrcLoc -> [TyVarBind] -> Context -> ConDecl -> QualConDecl
-- | A single constructor declaration in a GADT data type declaration.
data GadtDecl
GadtDecl :: SrcLoc -> Name -> Type -> GadtDecl
-- | The type of a constructor argument or field, optionally including a
-- strictness annotation.
data BangType
-- | strict component, marked with "<tt>!</tt>"
BangedTy :: Type -> BangType
-- | non-strict component
UnBangedTy :: Type -> BangType
-- | unboxed component, marked with an UNPACK pragma
UnpackedTy :: Type -> BangType
-- | Clauses of a function binding.
data Match
Match :: SrcLoc -> Name -> [Pat] -> (Maybe Type) -> Rhs -> Binds -> Match
-- | The right hand side of a function or pattern binding.
data Rhs
-- | unguarded right hand side (<i>exp</i>)
UnGuardedRhs :: Exp -> Rhs
-- | guarded right hand side (<i>gdrhs</i>)
GuardedRhss :: [GuardedRhs] -> Rhs
-- | A guarded right hand side <tt>|</tt> <i>stmts</i> <tt>=</tt>
-- <i>exp</i>. The guard is a series of statements when using pattern
-- guards, otherwise it will be a single qualifier expression.
data GuardedRhs
GuardedRhs :: SrcLoc -> [Stmt] -> Exp -> GuardedRhs
-- | A context is a set of assertions
type Context = [Asst]
-- | A functional dependency, given on the form l1 l2 ... ln -> r2 r3 ..
-- rn
data FunDep
FunDep :: [Name] -> [Name] -> FunDep
-- | Class assertions. In Haskell 98, the argument would be a <i>tyvar</i>,
-- but this definition allows multiple parameters, and allows them to be
-- <i>type</i>s. Also extended with support for implicit parameters and
-- equality constraints.
data Asst
-- | ordinary class assertion
ClassA :: QName -> [Type] -> Asst
-- | class assertion where the class name is given infix
InfixA :: Type -> QName -> Type -> Asst
-- | implicit parameter assertion
IParam :: IPName -> Type -> Asst
-- | type equality constraint
EqualP :: Type -> Type -> Asst
-- | A type qualified with a context. An unqualified type has an empty
-- context.
data Type
-- | qualified type
TyForall :: (Maybe [TyVarBind]) -> Context -> Type -> Type
-- | function type
TyFun :: Type -> Type -> Type
-- | tuple type, possibly boxed
TyTuple :: Boxed -> [Type] -> Type
-- | list syntax, e.g. [a], as opposed to [] a
TyList :: Type -> Type
-- | application of a type constructor
TyApp :: Type -> Type -> Type
-- | type variable
TyVar :: Name -> Type
-- | named type or type constructor
TyCon :: QName -> Type
-- | type surrounded by parentheses
TyParen :: Type -> Type
-- | infix type constructor
TyInfix :: Type -> QName -> Type -> Type
-- | type with explicit kind signature
TyKind :: Type -> Kind -> Type
-- | Flag denoting whether a tuple is boxed or unboxed.
data Boxed
Boxed :: Boxed
Unboxed :: Boxed
-- | An explicit kind annotation.
data Kind
-- | <tt>*</tt>, the kind of types
KindStar :: Kind
-- | <tt>!</tt>, the kind of unboxed types
KindBang :: Kind
-- | <tt>-></tt>, the kind of a type constructor
KindFn :: Kind -> Kind -> Kind
-- | a kind surrounded by parentheses
KindParen :: Kind -> Kind
-- | a kind variable (as of yet unsupported by compilers)
KindVar :: Name -> Kind
-- | A type variable declaration, optionally with an explicit kind
-- annotation.
data TyVarBind
-- | variable binding with kind annotation
KindedVar :: Name -> Kind -> TyVarBind
-- | ordinary variable binding
UnkindedVar :: Name -> TyVarBind
-- | Haskell expressions.
data Exp
-- | variable
Var :: QName -> Exp
-- | implicit parameter variable
IPVar :: IPName -> Exp
-- | data constructor
Con :: QName -> Exp
-- | literal constant
Lit :: Literal -> Exp
-- | infix application
InfixApp :: Exp -> QOp -> Exp -> Exp
-- | ordinary application
App :: Exp -> Exp -> Exp
-- | negation expression <tt>-<i>exp</i></tt> (unary minus)
NegApp :: Exp -> Exp
-- | lambda expression
Lambda :: SrcLoc -> [Pat] -> Exp -> Exp
-- | local declarations with <tt>let</tt> ... <tt>in</tt> ...
Let :: Binds -> Exp -> Exp
-- | <tt>if</tt> <i>exp</i> <tt>then</tt> <i>exp</i> <tt>else</tt>
-- <i>exp</i>
If :: Exp -> Exp -> Exp -> Exp
-- | <tt>case</tt> <i>exp</i> <tt>of</tt> <i>alts</i>
Case :: Exp -> [Alt] -> Exp
-- | <tt>do</tt>-expression: the last statement in the list should be an
-- expression.
Do :: [Stmt] -> Exp
-- | <tt>mdo</tt>-expression
MDo :: [Stmt] -> Exp
-- | tuple expression
Tuple :: Boxed -> [Exp] -> Exp
-- | tuple section expression, e.g. <tt>(,,3)</tt>
TupleSection :: Boxed -> [Maybe Exp] -> Exp
-- | list expression
List :: [Exp] -> Exp
-- | parenthesised expression
Paren :: Exp -> Exp
-- | left section <tt>(</tt><i>exp</i> <i>qop</i><tt>)</tt>
LeftSection :: Exp -> QOp -> Exp
-- | right section <tt>(</tt><i>qop</i> <i>exp</i><tt>)</tt>
RightSection :: QOp -> Exp -> Exp
-- | record construction expression
RecConstr :: QName -> [FieldUpdate] -> Exp
-- | record update expression
RecUpdate :: Exp -> [FieldUpdate] -> Exp
-- | unbounded arithmetic sequence, incrementing by 1: <tt>[from ..]</tt>
EnumFrom :: Exp -> Exp
-- | bounded arithmetic sequence, incrementing by 1 <tt>[from .. to]</tt>
EnumFromTo :: Exp -> Exp -> Exp
-- | unbounded arithmetic sequence, with first two elements given
-- <tt>[from, then ..]</tt>
EnumFromThen :: Exp -> Exp -> Exp
-- | bounded arithmetic sequence, with first two elements given <tt>[from,
-- then .. to]</tt>
EnumFromThenTo :: Exp -> Exp -> Exp -> Exp
-- | ordinary list comprehension
ListComp :: Exp -> [QualStmt] -> Exp
-- | parallel list comprehension
ParComp :: Exp -> [[QualStmt]] -> Exp
-- | expression with explicit type signature
ExpTypeSig :: SrcLoc -> Exp -> Type -> Exp
-- | <tt>'x</tt> for template haskell reifying of expressions
VarQuote :: QName -> Exp
-- | <tt>''T</tt> for template haskell reifying of types
TypQuote :: QName -> Exp
-- | template haskell bracket expression
BracketExp :: Bracket -> Exp
-- | template haskell splice expression
SpliceExp :: Splice -> Exp
-- | quasi-quotaion: <tt>[$<i>name</i>| <i>string</i> |]</tt>
QuasiQuote :: String -> String -> Exp
-- | xml element, with attributes and children
XTag :: SrcLoc -> XName -> [XAttr] -> (Maybe Exp) -> [Exp] -> Exp
-- | empty xml element, with attributes
XETag :: SrcLoc -> XName -> [XAttr] -> (Maybe Exp) -> Exp
-- | PCDATA child element
XPcdata :: String -> Exp
-- | escaped haskell expression inside xml
XExpTag :: Exp -> Exp
-- | children of an xml element
XChildTag :: SrcLoc -> [Exp] -> Exp
-- | CORE pragma
CorePragma :: String -> Exp -> Exp
-- | SCC pragma
SCCPragma :: String -> Exp -> Exp
-- | GENERATED pragma
GenPragma :: String -> (Int, Int) -> (Int, Int) -> Exp -> Exp
-- | arrows proc: <tt>proc</tt> <i>pat</i> <tt>-></tt> <i>exp</i>
Proc :: SrcLoc -> Pat -> Exp -> Exp
-- | arrow application (from left): <i>exp</i> <tt>-<</tt> <i>exp</i>
LeftArrApp :: Exp -> Exp -> Exp
-- | arrow application (from right): <i>exp</i> <tt>>-</tt> <i>exp</i>
RightArrApp :: Exp -> Exp -> Exp
-- | higher-order arrow application (from left): <i>exp</i>
-- <tt>-<<</tt> <i>exp</i>
LeftArrHighApp :: Exp -> Exp -> Exp
-- | higher-order arrow application (from right): <i>exp</i>
-- <tt>>>-</tt> <i>exp</i>
RightArrHighApp :: Exp -> Exp -> Exp
-- | A statement, representing both a <i>stmt</i> in a
-- <tt>do</tt>-expression, an ordinary <i>qual</i> in a list
-- comprehension, as well as a <i>stmt</i> in a pattern guard.
data Stmt
-- | a generator: <i>pat</i> <tt><-</tt> <i>exp</i>
Generator :: SrcLoc -> Pat -> Exp -> Stmt
-- | an <i>exp</i> by itself: in a <tt>do</tt>-expression, an action whose
-- result is discarded; in a list comprehension and pattern guard, a
-- guard expression
Qualifier :: Exp -> Stmt
-- | local bindings
LetStmt :: Binds -> Stmt
-- | a recursive binding group for arrows
RecStmt :: [Stmt] -> Stmt
-- | A general <i>transqual</i> in a list comprehension, which could
-- potentially be a transform of the kind enabled by TransformListComp.
data QualStmt
-- | an ordinary statement
QualStmt :: Stmt -> QualStmt
-- | <tt>then</tt> <i>exp</i>
ThenTrans :: Exp -> QualStmt
-- | <tt>then</tt> <i>exp</i> <tt>by</tt> <i>exp</i>
ThenBy :: Exp -> Exp -> QualStmt
-- | <tt>then</tt> <tt>group</tt> <tt>by</tt> <i>exp</i>
GroupBy :: Exp -> QualStmt
-- | <tt>then</tt> <tt>group</tt> <tt>using</tt> <i>exp</i>
GroupUsing :: Exp -> QualStmt
-- | <tt>then</tt> <tt>group</tt> <tt>by</tt> <i>exp</i> <tt>using</tt>
-- <i>exp</i>
GroupByUsing :: Exp -> Exp -> QualStmt
-- | An <i>fbind</i> in a labeled construction or update expression.
data FieldUpdate
-- | ordinary label-expresion pair
FieldUpdate :: QName -> Exp -> FieldUpdate
-- | record field pun
FieldPun :: Name -> FieldUpdate
-- | record field wildcard
FieldWildcard :: FieldUpdate
-- | An <i>alt</i> alternative in a <tt>case</tt> expression.
data Alt
Alt :: SrcLoc -> Pat -> GuardedAlts -> Binds -> Alt
-- | The right-hand sides of a <tt>case</tt> alternative, which may be a
-- single right-hand side or a set of guarded ones.
data GuardedAlts
-- | <tt>-></tt> <i>exp</i>
UnGuardedAlt :: Exp -> GuardedAlts
-- | <i>gdpat</i>
GuardedAlts :: [GuardedAlt] -> GuardedAlts
-- | A guarded case alternative <tt>|</tt> <i>stmts</i> <tt>-></tt>
-- <i>exp</i>.
data GuardedAlt
GuardedAlt :: SrcLoc -> [Stmt] -> Exp -> GuardedAlt
-- | An xml attribute, which is a name-expression pair.
data XAttr
XAttr :: XName -> Exp -> XAttr
-- | A pattern, to be matched against a value.
data Pat
-- | variable
PVar :: Name -> Pat
-- | literal constant
PLit :: Literal -> Pat
-- | negated pattern
PNeg :: Pat -> Pat
-- | n+k pattern
PNPlusK :: Name -> Integer -> Pat
-- | pattern with an infix data constructor
PInfixApp :: Pat -> QName -> Pat -> Pat
-- | data constructor and argument patterns
PApp :: QName -> [Pat] -> Pat
-- | tuple pattern
PTuple :: Boxed -> [Pat] -> Pat
-- | list pattern
PList :: [Pat] -> Pat
-- | parenthesized pattern
PParen :: Pat -> Pat
-- | labelled pattern, record style
PRec :: QName -> [PatField] -> Pat
-- | <tt>@</tt>-pattern
PAsPat :: Name -> Pat -> Pat
-- | wildcard pattern: <tt>_</tt>
PWildCard :: Pat
-- | irrefutable pattern: <tt>~<i>pat</i></tt>
PIrrPat :: Pat -> Pat
-- | pattern with type signature
PatTypeSig :: SrcLoc -> Pat -> Type -> Pat
-- | view patterns of the form <tt>(<i>exp</i> -> <i>pat</i>)</tt>
PViewPat :: Exp -> Pat -> Pat
-- | regular list pattern
PRPat :: [RPat] -> Pat
-- | XML element pattern
PXTag :: SrcLoc -> XName -> [PXAttr] -> (Maybe Pat) -> [Pat] -> Pat
-- | XML singleton element pattern
PXETag :: SrcLoc -> XName -> [PXAttr] -> (Maybe Pat) -> Pat
-- | XML PCDATA pattern
PXPcdata :: String -> Pat
-- | XML embedded pattern
PXPatTag :: Pat -> Pat
-- | XML regular list pattern
PXRPats :: [RPat] -> Pat
-- | Explicit generics style type argument e.g. <tt>f {| Int |} x =
-- ...</tt>
PExplTypeArg :: QName -> Type -> Pat
-- | quasi quote patter: <tt>[$<i>name</i>| <i>string</i> |]</tt>
PQuasiQuote :: String -> String -> Pat
-- | strict (bang) pattern: <tt>f !x = ...</tt>
PBangPat :: Pat -> Pat
-- | An <i>fpat</i> in a labeled record pattern.
data PatField
-- | ordinary label-pattern pair
PFieldPat :: QName -> Pat -> PatField
-- | record field pun
PFieldPun :: Name -> PatField
-- | record field wildcard
PFieldWildcard :: PatField
-- | An XML attribute in a pattern.
data PXAttr
PXAttr :: XName -> Pat -> PXAttr
-- | An entity in a regular pattern.
data RPat
-- | operator pattern, e.g. pat*
RPOp :: RPat -> RPatOp -> RPat
-- | choice pattern, e.g. (1 | 2)
RPEither :: RPat -> RPat -> RPat
-- | sequence pattern, e.g. (| 1, 2, 3 |)
RPSeq :: [RPat] -> RPat
-- | guarded pattern, e.g. (| p | p < 3 |)
RPGuard :: Pat -> [Stmt] -> RPat
-- | non-linear variable binding, e.g. (foo@:(1 | 2))*
RPCAs :: Name -> RPat -> RPat
-- | linear variable binding, e.g. foo@(1 | 2)
RPAs :: Name -> RPat -> RPat
-- | parenthesised pattern, e.g. (2*)
RPParen :: RPat -> RPat
-- | an ordinary pattern
RPPat :: Pat -> RPat
-- | A regular pattern operator.
data RPatOp
-- | <tt>*</tt> = 0 or more
RPStar :: RPatOp
-- | <tt>*!</tt> = 0 or more, greedy
RPStarG :: RPatOp
-- | <tt>+</tt> = 1 or more
RPPlus :: RPatOp
-- | <tt>+!</tt> = 1 or more, greedy
RPPlusG :: RPatOp
-- | <tt>?</tt> = 0 or 1
RPOpt :: RPatOp
-- | <tt>?!</tt> = 0 or 1, greedy
RPOptG :: RPatOp
-- | <i>literal</i> Values of this type hold the abstract value of the
-- literal, not the precise string representation used. For example,
-- <tt>10</tt>, <tt>0o12</tt> and <tt>0xa</tt> have the same
-- representation.
data Literal
-- | character literal
Char :: Char -> Literal
-- | string literal
String :: String -> Literal
-- | integer literal
Int :: Integer -> Literal
-- | floating point literal
Frac :: Rational -> Literal
-- | unboxed integer literal
PrimInt :: Integer -> Literal
-- | unboxed word literal
PrimWord :: Integer -> Literal
-- | unboxed float literal
PrimFloat :: Rational -> Literal
-- | unboxed double literal
PrimDouble :: Rational -> Literal
-- | unboxed character literal
PrimChar :: Char -> Literal
-- | unboxed string literal
PrimString :: String -> Literal
-- | The name of a Haskell module.
newtype ModuleName
ModuleName :: String -> ModuleName
-- | This type is used to represent qualified variables, and also qualified
-- constructors.
data QName
-- | name qualified with a module name
Qual :: ModuleName -> Name -> QName
-- | unqualified local name
UnQual :: Name -> QName
-- | built-in constructor with special syntax
Special :: SpecialCon -> QName
-- | This type is used to represent variables, and also constructors.
data Name
-- | <i>varid</i> or <i>conid</i>.
Ident :: String -> Name
-- | <i>varsym</i> or <i>consym</i>
Symbol :: String -> Name
-- | Possibly qualified infix operators (<i>qop</i>), appearing in
-- expressions.
data QOp
-- | variable operator (<i>qvarop</i>)
QVarOp :: QName -> QOp
-- | constructor operator (<i>qconop</i>)
QConOp :: QName -> QOp
-- | Operators appearing in <tt>infix</tt> declarations are never
-- qualified.
data Op
-- | variable operator (<i>varop</i>)
VarOp :: Name -> Op
-- | constructor operator (<i>conop</i>)
ConOp :: Name -> Op
-- | Constructors with special syntax. These names are never qualified, and
-- always refer to builtin type or data constructors.
data SpecialCon
-- | unit type and data constructor <tt>()</tt>
UnitCon :: SpecialCon
-- | list type constructor <tt>[]</tt>
ListCon :: SpecialCon
-- | function type constructor <tt>-></tt>
FunCon :: SpecialCon
-- | <i>n</i>-ary tuple type and data constructors <tt>(,)</tt> etc,
-- possibly boxed <tt>(#,#)</tt>
TupleCon :: Boxed -> Int -> SpecialCon
-- | list data constructor <tt>(:)</tt>
Cons :: SpecialCon
-- | unboxed singleton tuple constructor <tt>(# #)</tt>
UnboxedSingleCon :: SpecialCon
-- | A name (<i>cname</i>) of a component of a class or data type in an
-- <tt>import</tt> or export specification.
data CName
-- | name of a method or field
VarName :: Name -> CName
-- | name of a data constructor
ConName :: Name -> CName
-- | An implicit parameter name.
data IPName
-- | ?<i>ident</i>, non-linear implicit parameter
IPDup :: String -> IPName
-- | %<i>ident</i>, linear implicit parameter
IPLin :: String -> IPName
-- | The name of an xml element or attribute, possibly qualified with a
-- namespace.
data XName
XName :: String -> XName
XDomName :: String -> String -> XName
-- | A template haskell bracket expression.
data Bracket
-- | expression bracket: <tt>[| ... |]</tt>
ExpBracket :: Exp -> Bracket
-- | pattern bracket: <tt>[p| ... |]</tt>
PatBracket :: Pat -> Bracket
-- | type bracket: <tt>[t| ... |]</tt>
TypeBracket :: Type -> Bracket
-- | declaration bracket: <tt>[d| ... |]</tt>
DeclBracket :: [Decl] -> Bracket
-- | A template haskell splice expression
data Splice
-- | variable splice: <tt>$var</tt>
IdSplice :: String -> Splice
-- | parenthesised expression splice: <tt>$(<i>exp</i>)</tt>
ParenSplice :: Exp -> Splice
-- | The safety of a foreign function call.
data Safety
-- | unsafe
PlayRisky :: Safety
-- | safe (<a>False</a>) or threadsafe (<a>True</a>)
PlaySafe :: Bool -> Safety
-- | interruptible
PlayInterruptible :: Safety
-- | The calling convention of a foreign function call.
data CallConv
StdCall :: CallConv
CCall :: CallConv
CPlusPlus :: CallConv
DotNet :: CallConv
Jvm :: CallConv
Js :: CallConv
CApi :: CallConv
-- | A top level options pragma, preceding the module header.
data ModulePragma
-- | LANGUAGE pragma
LanguagePragma :: SrcLoc -> [Name] -> ModulePragma
-- | OPTIONS pragma, possibly qualified with a tool, e.g. OPTIONS_GHC
OptionsPragma :: SrcLoc -> (Maybe Tool) -> String -> ModulePragma
-- | ANN pragma with module scope
AnnModulePragma :: SrcLoc -> Annotation -> ModulePragma
-- | Recognised tools for OPTIONS pragmas.
data Tool
GHC :: Tool
HUGS :: Tool
NHC98 :: Tool
YHC :: Tool
HADDOCK :: Tool
UnknownTool :: String -> Tool
-- | The body of a RULES pragma.
data Rule
Rule :: String -> Activation -> (Maybe [RuleVar]) -> Exp -> Exp -> Rule
-- | Variables used in a RULES pragma, optionally annotated with types
data RuleVar
RuleVar :: Name -> RuleVar
TypedRuleVar :: Name -> Type -> RuleVar
-- | Activation clause of a RULES pragma.
data Activation
AlwaysActive :: Activation
ActiveFrom :: Int -> Activation
ActiveUntil :: Int -> Activation
-- | An annotation through an ANN pragma.
data Annotation
-- | An annotation for a declared name.
Ann :: Name -> Exp -> Annotation
-- | An annotation for a declared type.
TypeAnn :: Name -> Exp -> Annotation
-- | An annotation for the defining module.
ModuleAnn :: Exp -> Annotation
prelude_mod :: ModuleName
main_mod :: ModuleName
main_name :: Name
unit_con_name :: QName
tuple_con_name :: Boxed -> Int -> QName
list_cons_name :: QName
unboxed_singleton_con_name :: QName
unit_con :: Exp
tuple_con :: Boxed -> Int -> Exp
unboxed_singleton_con :: Exp
as_name :: Name
qualified_name :: Name
hiding_name :: Name
minus_name :: Name
bang_name :: Name
dot_name :: Name
star_name :: Name
export_name :: Name
safe_name :: Name
unsafe_name :: Name
threadsafe_name :: Name
stdcall_name :: Name
ccall_name :: Name
cplusplus_name :: Name
dotnet_name :: Name
jvm_name :: Name
js_name :: Name
forall_name :: Name
family_name :: Name
unit_tycon_name :: QName
fun_tycon_name :: QName
list_tycon_name :: QName
tuple_tycon_name :: Boxed -> Int -> QName
unboxed_singleton_tycon_name :: QName
unit_tycon :: Type
fun_tycon :: Type
list_tycon :: Type
tuple_tycon :: Boxed -> Int -> Type
unboxed_singleton_tycon :: Type
-- | A single position in the source.
data SrcLoc
SrcLoc :: String -> Int -> Int -> SrcLoc
srcFilename :: SrcLoc -> String
srcLine :: SrcLoc -> Int
srcColumn :: SrcLoc -> Int
instance Typeable ModuleName
instance Typeable SpecialCon
instance Typeable Name
instance Typeable QName
instance Typeable IPName
instance Typeable QOp
instance Typeable Op
instance Typeable CName
instance Typeable ExportSpec
instance Typeable ImportSpec
instance Typeable ImportDecl
instance Typeable Assoc
instance Typeable DataOrNew
instance Typeable Kind
instance Typeable TyVarBind
instance Typeable FunDep
instance Typeable Asst
instance Typeable Type
instance Typeable BangType
instance Typeable ConDecl
instance Typeable GadtDecl
instance Typeable QualConDecl
instance Typeable Literal
instance Typeable XName
instance Typeable Safety
instance Typeable CallConv
instance Typeable Activation
instance Typeable RuleVar
instance Typeable WarningText
instance Typeable RPatOp
instance Typeable GuardedAlt
instance Typeable Stmt
instance Typeable Pat
instance Typeable PatField
instance Typeable RPat
instance Typeable PXAttr
instance Typeable Exp
instance Typeable Alt
instance Typeable GuardedAlts
instance Typeable Binds
instance Typeable IPBind
instance Typeable Decl
instance Typeable Rule
instance Typeable Rhs
instance Typeable GuardedRhs
instance Typeable InstDecl
instance Typeable ClassDecl
instance Typeable Match
instance Typeable Annotation
instance Typeable FieldUpdate
instance Typeable QualStmt
instance Typeable Splice
instance Typeable Bracket
instance Typeable XAttr
instance Typeable ModulePragma
instance Typeable Module
instance Eq ModuleName
instance Ord ModuleName
instance Show ModuleName
instance Data ModuleName
instance Eq SpecialCon
instance Ord SpecialCon
instance Show SpecialCon
instance Data SpecialCon
instance Eq Name
instance Ord Name
instance Show Name
instance Data Name
instance Eq QName
instance Ord QName
instance Show QName
instance Data QName
instance Eq IPName
instance Ord IPName
instance Show IPName
instance Data IPName
instance Eq QOp
instance Ord QOp
instance Show QOp
instance Data QOp
instance Eq Op
instance Ord Op
instance Show Op
instance Data Op
instance Eq CName
instance Ord CName
instance Show CName
instance Data CName
instance Eq ExportSpec
instance Ord ExportSpec
instance Show ExportSpec
instance Data ExportSpec
instance Eq ImportSpec
instance Ord ImportSpec
instance Show ImportSpec
instance Data ImportSpec
instance Eq ImportDecl
instance Ord ImportDecl
instance Show ImportDecl
instance Data ImportDecl
instance Eq Assoc
instance Ord Assoc
instance Show Assoc
instance Data Assoc
instance Eq DataOrNew
instance Ord DataOrNew
instance Show DataOrNew
instance Data DataOrNew
instance Eq Kind
instance Ord Kind
instance Show Kind
instance Data Kind
instance Eq TyVarBind
instance Ord TyVarBind
instance Show TyVarBind
instance Data TyVarBind
instance Eq FunDep
instance Ord FunDep
instance Show FunDep
instance Data FunDep
instance Eq Asst
instance Ord Asst
instance Show Asst
instance Data Asst
instance Eq Type
instance Ord Type
instance Show Type
instance Data Type
instance Eq BangType
instance Ord BangType
instance Show BangType
instance Data BangType
instance Eq ConDecl
instance Ord ConDecl
instance Show ConDecl
instance Data ConDecl
instance Eq GadtDecl
instance Ord GadtDecl
instance Show GadtDecl
instance Data GadtDecl
instance Eq QualConDecl
instance Ord QualConDecl
instance Show QualConDecl
instance Data QualConDecl
instance Eq Literal
instance Ord Literal
instance Show Literal
instance Data Literal
instance Eq XName
instance Ord XName
instance Show XName
instance Data XName
instance Eq Safety
instance Ord Safety
instance Show Safety
instance Data Safety
instance Eq CallConv
instance Ord CallConv
instance Show CallConv
instance Data CallConv
instance Eq Activation
instance Ord Activation
instance Show Activation
instance Data Activation
instance Eq RuleVar
instance Ord RuleVar
instance Show RuleVar
instance Data RuleVar
instance Eq WarningText
instance Ord WarningText
instance Show WarningText
instance Data WarningText
instance Eq RPatOp
instance Ord RPatOp
instance Show RPatOp
instance Data RPatOp
instance Eq GuardedAlt
instance Ord GuardedAlt
instance Show GuardedAlt
instance Data GuardedAlt
instance Eq Stmt
instance Ord Stmt
instance Show Stmt
instance Data Stmt
instance Eq Pat
instance Ord Pat
instance Show Pat
instance Data Pat
instance Eq PatField
instance Ord PatField
instance Show PatField
instance Data PatField
instance Eq RPat
instance Ord RPat
instance Show RPat
instance Data RPat
instance Eq PXAttr
instance Ord PXAttr
instance Show PXAttr
instance Data PXAttr
instance Eq Exp
instance Ord Exp
instance Show Exp
instance Data Exp
instance Eq Alt
instance Ord Alt
instance Show Alt
instance Data Alt
instance Eq GuardedAlts
instance Ord GuardedAlts
instance Show GuardedAlts
instance Data GuardedAlts
instance Eq Binds
instance Ord Binds
instance Show Binds
instance Data Binds
instance Eq IPBind
instance Ord IPBind
instance Show IPBind
instance Data IPBind
instance Eq Decl
instance Ord Decl
instance Show Decl
instance Data Decl
instance Eq Rule
instance Ord Rule
instance Show Rule
instance Data Rule
instance Eq Rhs
instance Ord Rhs
instance Show Rhs
instance Data Rhs
instance Eq GuardedRhs
instance Ord GuardedRhs
instance Show GuardedRhs
instance Data GuardedRhs
instance Eq InstDecl
instance Ord InstDecl
instance Show InstDecl
instance Data InstDecl
instance Eq ClassDecl
instance Ord ClassDecl
instance Show ClassDecl
instance Data ClassDecl
instance Eq Match
instance Ord Match
instance Show Match
instance Data Match
instance Eq Annotation
instance Ord Annotation
instance Show Annotation
instance Data Annotation
instance Eq FieldUpdate
instance Ord FieldUpdate
instance Show FieldUpdate
instance Data FieldUpdate
instance Eq QualStmt
instance Ord QualStmt
instance Show QualStmt
instance Data QualStmt
instance Eq Splice
instance Ord Splice
instance Show Splice
instance Data Splice
instance Eq Bracket
instance Ord Bracket
instance Show Bracket
instance Data Bracket
instance Eq XAttr
instance Ord XAttr
instance Show XAttr
instance Data XAttr
instance Eq ModulePragma
instance Ord ModulePragma
instance Show ModulePragma
instance Data ModulePragma
instance Eq Module
instance Ord Module
instance Show Module
instance Data Module
-- | This module contains combinators to use when building Haskell source
-- trees programmatically, as opposed to parsing them from a string. The
-- contents here are quite experimental and will likely receive a lot of
-- attention when the rest has stabilised.
module Language.Haskell.Exts.Build
-- | An identifier with the given string as its name. The string should be
-- a valid Haskell identifier.
name :: String -> Name
-- | A symbol identifier. The string should be a valid Haskell symbol
-- identifier.
sym :: String -> Name
-- | A local variable as expression.
var :: Name -> Exp
-- | Use the given identifier as an operator.
op :: Name -> QOp
-- | A qualified variable as expression.
qvar :: ModuleName -> Name -> Exp
-- | A pattern variable.
pvar :: Name -> Pat
-- | Application of expressions by juxtaposition.
app :: Exp -> Exp -> Exp
-- | Apply an operator infix.
infixApp :: Exp -> QOp -> Exp -> Exp
-- | Apply a function to a list of arguments.
appFun :: Exp -> [Exp] -> Exp
-- | A constructor pattern, with argument patterns.
pApp :: Name -> [Pat] -> Pat
-- | A tuple expression.
tuple :: [Exp] -> Exp
-- | A tuple pattern.
pTuple :: [Pat] -> Pat
-- | A tuple expression consisting of variables only.
varTuple :: [Name] -> Exp
-- | A tuple pattern consisting of variables only.
pvarTuple :: [Name] -> Pat
-- | A function with a given name.
function :: String -> Exp
-- | A literal string expression.
strE :: String -> Exp
-- | A literal character expression.
charE :: Char -> Exp
-- | A literal integer expression.
intE :: Integer -> Exp
-- | A literal string pattern.
strP :: String -> Pat
-- | A literal character pattern.
charP :: Char -> Pat
-- | A literal integer pattern.
intP :: Integer -> Pat
-- | A do block formed by the given statements. The last statement in the
-- list should be a <a>Qualifier</a> expression.
doE :: [Stmt] -> Exp
-- | Lambda abstraction, given a list of argument patterns and an
-- expression body.
lamE :: SrcLoc -> [Pat] -> Exp -> Exp
-- | A <tt>let</tt> ... <tt>in</tt> block.
letE :: [Decl] -> Exp -> Exp
-- | A <tt>case</tt> expression.
caseE :: Exp -> [Alt] -> Exp
-- | An unguarded alternative in a <tt>case</tt> expression.
alt :: SrcLoc -> Pat -> Exp -> Alt
-- | An alternative with a single guard in a <tt>case</tt> expression.
altGW :: SrcLoc -> Pat -> [Stmt] -> Exp -> Binds -> Alt
-- | A list expression.
listE :: [Exp] -> Exp
-- | The empty list expression.
eList :: Exp
-- | The empty list pattern.
peList :: Pat
-- | Put parentheses around an expression.
paren :: Exp -> Exp
-- | Put parentheses around a pattern.
pParen :: Pat -> Pat
-- | A qualifier expression statement.
qualStmt :: Exp -> Stmt
-- | A generator statement: <i>pat</i> <tt><-</tt> <i>exp</i>
genStmt :: SrcLoc -> Pat -> Exp -> Stmt
-- | A <tt>let</tt> binding group as a statement.
letStmt :: [Decl] -> Stmt
-- | Hoist a set of declarations to a binding group.
binds :: [Decl] -> Binds
-- | An empty binding group.
noBinds :: Binds
-- | The wildcard pattern: <tt>_</tt>
wildcard :: Pat
-- | Generate k names by appending numbers 1 through k to a given string.
genNames :: String -> Int -> [Name]
-- | A function with a single clause
sfun :: SrcLoc -> Name -> [Name] -> Rhs -> Binds -> Decl
-- | A function with a single clause, a single argument, no guards and no
-- where declarations
simpleFun :: SrcLoc -> Name -> Name -> Exp -> Decl
-- | A pattern bind where the pattern is a variable, and where there are no
-- guards and no 'where' clause.
patBind :: SrcLoc -> Pat -> Exp -> Decl
-- | A pattern bind where the pattern is a variable, and where there are no
-- guards, but with a 'where' clause.
patBindWhere :: SrcLoc -> Pat -> Exp -> [Decl] -> Decl
-- | Bind an identifier to an expression.
nameBind :: SrcLoc -> Name -> Exp -> Decl
-- | Apply function of a given name to a list of arguments.
metaFunction :: String -> [Exp] -> Exp
-- | Apply a constructor of a given name to a list of pattern arguments,
-- forming a constructor pattern.
metaConPat :: String -> [Pat] -> Pat
-- | Fixity information to give the parser so that infix operators can be
-- parsed properly.
module Language.Haskell.Exts.Fixity
-- | Operator fixities are represented by their associativity (left, right
-- or none) and their precedence (0-9).
data Fixity
Fixity :: Assoc -> Int -> QName -> Fixity
infix_ :: Int -> [String] -> [Fixity]
infixl_ :: Int -> [String] -> [Fixity]
infixr_ :: Int -> [String] -> [Fixity]
-- | All fixities defined in the Prelude.
preludeFixities :: [Fixity]
-- | All fixities defined in the base package.
--
-- Note that the <tt>+++</tt> operator appears in both Control.Arrows and
-- Text.ParserCombinators.ReadP. The listed precedence for <tt>+++</tt>
-- in this list is that of Control.Arrows.
baseFixities :: [Fixity]
-- | Built-in fixity for prefix minus
prefixMinusFixity :: (Assoc, Int)
-- | All AST elements that may include expressions which in turn may need
-- fixity tweaking will be instances of this class.
class AppFixity ast
applyFixities :: (AppFixity ast, Monad m) => [Fixity] -> ast -> m ast
instance Typeable Fixity
instance Eq Fixity
instance Ord Fixity
instance Show Fixity
instance Data Fixity
instance AppFixity XAttr
instance AppFixity Splice
instance AppFixity Bracket
instance AppFixity QualStmt
instance AppFixity GuardedAlt
instance AppFixity GuardedAlts
instance AppFixity Alt
instance AppFixity FieldUpdate
instance AppFixity IPBind
instance AppFixity Binds
instance AppFixity Stmt
instance AppFixity PXAttr
instance AppFixity RPat
instance AppFixity PatField
instance AppFixity GuardedRhs
instance AppFixity Rhs
instance AppFixity Match
instance AppFixity InstDecl
instance AppFixity ClassDecl
instance AppFixity Annotation
instance AppFixity Decl
instance AppFixity Module
instance AppFixity Pat
instance AppFixity Exp
-- | Lexer for Haskell with extensions.
module Language.Haskell.Exts.Lexer
-- | Lex a string into a list of Haskell 2010 source tokens.
lexTokenStream :: String -> ParseResult [Loc Token]
-- | Lex a string into a list of Haskell source tokens, using an explicit
-- mode.
lexTokenStreamWithMode :: ParseMode -> String -> ParseResult [Loc Token]
data Token
VarId :: String -> Token
QVarId :: (String, String) -> Token
IDupVarId :: (String) -> Token
ILinVarId :: (String) -> Token
ConId :: String -> Token
QConId :: (String, String) -> Token
DVarId :: [String] -> Token
VarSym :: String -> Token
ConSym :: String -> Token
QVarSym :: (String, String) -> Token
QConSym :: (String, String) -> Token
IntTok :: (Integer, String) -> Token
FloatTok :: (Rational, String) -> Token
Character :: (Char, String) -> Token
StringTok :: (String, String) -> Token
IntTokHash :: (Integer, String) -> Token
WordTokHash :: (Integer, String) -> Token
FloatTokHash :: (Rational, String) -> Token
DoubleTokHash :: (Rational, String) -> Token
CharacterHash :: (Char, String) -> Token
StringHash :: (String, String) -> Token
LeftParen :: Token
RightParen :: Token
LeftHashParen :: Token
RightHashParen :: Token
LeftCurlyBar :: Token
RightCurlyBar :: Token
SemiColon :: Token
LeftCurly :: Token
RightCurly :: Token
VRightCurly :: Token
LeftSquare :: Token
RightSquare :: Token
Comma :: Token
Underscore :: Token
BackQuote :: Token
Dot :: Token
DotDot :: Token
Colon :: Token
DoubleColon :: Token
Equals :: Token
Backslash :: Token
Bar :: Token
LeftArrow :: Token
RightArrow :: Token
At :: Token
Tilde :: Token
DoubleArrow :: Token
Minus :: Token
Exclamation :: Token
Star :: Token
LeftArrowTail :: Token
RightArrowTail :: Token
LeftDblArrowTail :: Token
RightDblArrowTail :: Token
THExpQuote :: Token
THPatQuote :: Token
THDecQuote :: Token
THTypQuote :: Token
THCloseQuote :: Token
-- | ]
THIdEscape :: (String) -> Token
THParenEscape :: Token
THVarQuote :: Token
THTyQuote :: Token
THQuasiQuote :: (String, String) -> Token
RPGuardOpen :: Token
RPGuardClose :: Token
-- | )
RPCAt :: Token
XCodeTagOpen :: Token
XCodeTagClose :: Token
XStdTagOpen :: Token
XStdTagClose :: Token
XCloseTagOpen :: Token
XEmptyTagClose :: Token
XChildTagOpen :: Token
XPCDATA :: String -> Token
XRPatOpen :: Token
XRPatClose :: Token
PragmaEnd :: Token
RULES :: Token
INLINE :: Bool -> Token
INLINE_CONLIKE :: Token
SPECIALISE :: Token
SPECIALISE_INLINE :: Bool -> Token
SOURCE :: Token
DEPRECATED :: Token
WARNING :: Token
SCC :: Token
GENERATED :: Token
CORE :: Token
UNPACK :: Token
OPTIONS :: (Maybe String, String) -> Token
LANGUAGE :: Token
ANN :: Token
KW_As :: Token
KW_By :: Token
KW_Case :: Token
KW_Class :: Token
KW_Data :: Token
KW_Default :: Token
KW_Deriving :: Token
KW_Do :: Token
KW_MDo :: Token
KW_Else :: Token
KW_Family :: Token
KW_Forall :: Token
KW_Group :: Token
KW_Hiding :: Token
KW_If :: Token
KW_Import :: Token
KW_In :: Token
KW_Infix :: Token
KW_InfixL :: Token
KW_InfixR :: Token
KW_Instance :: Token
KW_Let :: Token
KW_Module :: Token
KW_NewType :: Token
KW_Of :: Token
KW_Proc :: Token
KW_Rec :: Token
KW_Then :: Token
KW_Type :: Token
KW_Using :: Token
KW_Where :: Token
KW_Qualified :: Token
KW_Foreign :: Token
KW_Export :: Token
KW_Safe :: Token
KW_Unsafe :: Token
KW_Threadsafe :: Token
KW_Interruptible :: Token
KW_StdCall :: Token
KW_CCall :: Token
KW_CPlusPlus :: Token
KW_DotNet :: Token
KW_Jvm :: Token
KW_Js :: Token
KW_CApi :: Token
EOF :: Token
-- | An entity located in the source.
data Loc a
Loc :: SrcSpan -> a -> Loc a
loc :: Loc a -> SrcSpan
unLoc :: Loc a -> a
-- | This module contains code for translating from the annotated complex
-- AST in Language.Haskell.Exts.Annotated.Syntax to the simpler, sparsely
-- annotated AST in Language.Haskell.Exts.Syntax.
--
-- A function <tt>sXYZ</tt> translates an annotated AST node of type
-- <tt>XYZ l</tt> into a simple AST node of type <tt>XYZ</tt>. I would
-- have prefered to use a MPTC with an fd/type family to get a single
-- exported function name, but I wish to stay Haskell 2010 compliant.
-- Let's hope for Haskell 2011.
module Language.Haskell.Exts.Annotated.Simplify
-- | Translate an annotated AST node representing a Haskell module, into a
-- simpler version that retains (almost) only abstract information. In
-- particular, XML and hybrid XML pages enabled by the XmlSyntax
-- extension are translated into standard Haskell modules with a
-- <tt>page</tt> function.
sModule :: SrcInfo loc => Module loc -> Module
-- | Translate an annotated AST node representing a Haskell declaration
-- into a simpler version. Note that in the simpler version, all
-- declaration nodes are still annotated by <a>SrcLoc</a>s.
sDecl :: SrcInfo loc => Decl loc -> Decl
sAnnotation :: SrcInfo loc => Annotation loc -> Annotation
sModuleName :: ModuleName l -> ModuleName
sSpecialCon :: SpecialCon l -> SpecialCon
sQName :: QName l -> QName
sName :: Name l -> Name
sIPName :: IPName l -> IPName
sQOp :: QOp l -> QOp
sOp :: Op l -> Op
sCName :: CName l -> CName
sModuleHead :: Maybe (ModuleHead l) -> (ModuleName, Maybe (WarningText), Maybe [ExportSpec])
sExportSpecList :: ExportSpecList l -> [ExportSpec]
sExportSpec :: ExportSpec l -> ExportSpec
sImportDecl :: SrcInfo loc => ImportDecl loc -> ImportDecl
sImportSpecList :: ImportSpecList l -> (Bool, [ImportSpec])
sImportSpec :: ImportSpec l -> ImportSpec
sAssoc :: Assoc l -> Assoc
sDeclHead :: DeclHead l -> (Name, [TyVarBind])
sInstHead :: InstHead l -> (QName, [Type])
sDataOrNew :: DataOrNew l -> DataOrNew
sDeriving :: (Deriving l) -> [(QName, [Type])]
sBinds :: SrcInfo loc => Binds loc -> Binds
sIPBind :: SrcInfo loc => IPBind loc -> IPBind
sMatch :: SrcInfo loc => Match loc -> Match
sQualConDecl :: SrcInfo loc => QualConDecl loc -> QualConDecl
sConDecl :: ConDecl l -> ConDecl
sFieldDecl :: FieldDecl l -> ([Name], BangType)
sGadtDecl :: SrcInfo loc => GadtDecl loc -> GadtDecl
sClassDecl :: SrcInfo loc => ClassDecl loc -> ClassDecl
sInstDecl :: SrcInfo loc => InstDecl loc -> InstDecl
sBangType :: BangType l -> BangType
sRhs :: SrcInfo loc => Rhs loc -> Rhs
sGuardedRhs :: SrcInfo loc => GuardedRhs loc -> GuardedRhs
sType :: Type l -> Type
sTyVarBind :: TyVarBind l -> TyVarBind
sKind :: Kind l -> Kind
sFunDep :: FunDep l -> FunDep
sContext :: Context l -> Context
sAsst :: Asst l -> Asst
sLiteral :: Literal l -> Literal
sExp :: SrcInfo loc => Exp loc -> Exp
sXName :: XName l -> XName
sXAttr :: SrcInfo loc => XAttr loc -> XAttr
sBracket :: SrcInfo loc => Bracket loc -> Bracket
sSplice :: SrcInfo loc => Splice loc -> Splice
sSafety :: Safety l -> Safety
sCallConv :: CallConv l -> CallConv
sModulePragma :: SrcInfo loc => ModulePragma loc -> ModulePragma
sActivation :: Activation l -> Activation
sRule :: SrcInfo loc => Rule loc -> Rule
sRuleVar :: RuleVar l -> RuleVar
sWarningText :: WarningText l -> WarningText
sPat :: SrcInfo loc => Pat loc -> Pat
sPXAttr :: SrcInfo loc => PXAttr loc -> PXAttr
sRPatOp :: RPatOp l -> RPatOp
sRPat :: SrcInfo loc => RPat loc -> RPat
sPatField :: SrcInfo loc => PatField loc -> PatField
sStmt :: SrcInfo loc => Stmt loc -> Stmt
sQualStmt :: SrcInfo loc => QualStmt loc -> QualStmt
sFieldUpdate :: SrcInfo loc => FieldUpdate loc -> FieldUpdate
sAlt :: SrcInfo loc => Alt loc -> Alt
sGuardedAlts :: SrcInfo loc => GuardedAlts loc -> GuardedAlts
sGuardedAlt :: SrcInfo loc => GuardedAlt loc -> GuardedAlt
-- | Pretty printer for Haskell with extensions.
module Language.Haskell.Exts.Pretty
-- | Things that can be pretty-printed, including all the syntactic objects
-- in <a>Language.Haskell.Exts.Syntax</a> and
-- <a>Language.Haskell.Exts.Annotated.Syntax</a>.
class Pretty a where pretty = prettyPrec 0 prettyPrec _ = pretty
-- | pretty-print with a given style and mode.
prettyPrintStyleMode :: Pretty a => Style -> PPHsMode -> a -> String
-- | pretty-print with the default style and a given mode.
prettyPrintWithMode :: Pretty a => PPHsMode -> a -> String
-- | pretty-print with the default style and <a>defaultMode</a>.
prettyPrint :: Pretty a => a -> String
-- | A rendering style.
data Style :: *
Style :: Mode -> Int -> Float -> Style
-- | The rendering mode
mode :: Style -> Mode
-- | Length of line, in chars
lineLength :: Style -> Int
-- | Ratio of ribbon length to line length
ribbonsPerLine :: Style -> Float
-- | The default style (<tt>mode=PageMode, lineLength=100,
-- ribbonsPerLine=1.5</tt>).
style :: Style
-- | Rendering mode.
data Mode :: *
-- | Normal
PageMode :: Mode
-- | With zig-zag cuts
ZigZagMode :: Mode
-- | No indentation, infinitely long lines
LeftMode :: Mode
-- | All on one line
OneLineMode :: Mode
-- | Pretty-printing parameters.
--
-- <i>Note:</i> the <a>onsideIndent</a> must be positive and less than
-- all other indents.
data PPHsMode
PPHsMode :: Indent -> Indent -> Indent -> Indent -> Indent -> Indent -> Bool -> PPLayout -> Bool -> PPHsMode
-- | indentation of a class or instance
classIndent :: PPHsMode -> Indent
-- | indentation of a <tt>do</tt>-expression
doIndent :: PPHsMode -> Indent
-- | indentation of the body of a <tt>case</tt> expression
caseIndent :: PPHsMode -> Indent
-- | indentation of the declarations in a <tt>let</tt> expression
letIndent :: PPHsMode -> Indent
-- | indentation of the declarations in a <tt>where</tt> clause
whereIndent :: PPHsMode -> Indent
-- | indentation added for continuation lines that would otherwise be
-- offside
onsideIndent :: PPHsMode -> Indent
-- | blank lines between statements?
spacing :: PPHsMode -> Bool
-- | Pretty-printing style to use
layout :: PPHsMode -> PPLayout
-- | add GHC-style <tt>LINE</tt> pragmas to output?
linePragmas :: PPHsMode -> Bool
type Indent = Int
-- | Varieties of layout we can use.
data PPLayout
-- | classical layout
PPOffsideRule :: PPLayout
-- | classical layout made explicit
PPSemiColon :: PPLayout
-- | inline decls, with newlines between them
PPInLine :: PPLayout
-- | everything on a single line
PPNoLayout :: PPLayout
-- | The default mode: pretty-print using the offside rule and sensible
-- defaults.
defaultMode :: PPHsMode
instance Eq PPLayout
instance SrcInfo loc => Pretty (PType loc)
instance SrcInfo loc => Pretty (PAsst loc)
instance SrcInfo loc => Pretty (PContext loc)
instance SrcInfo loc => Pretty (ParseXAttr loc)
instance SrcInfo loc => Pretty (PFieldUpdate loc)
instance SrcInfo loc => Pretty (PExp loc)
instance Pretty (Asst l)
instance Pretty (Context l)
instance Pretty (CName l)
instance SrcInfo loc => Pretty (IPBind loc)
instance Pretty (IPName l)
instance Pretty (Name l)
instance Pretty (Op l)
instance Pretty (QName l)
instance Pretty (QOp l)
instance SrcInfo loc => Pretty (FieldUpdate loc)
instance SrcInfo loc => Pretty (QualStmt loc)
instance SrcInfo loc => Pretty (Stmt loc)
instance SrcInfo loc => Pretty (GuardedAlt loc)
instance SrcInfo loc => Pretty (GuardedAlts loc)
instance SrcInfo loc => Pretty (Alt loc)
instance Pretty (RPatOp l)
instance SrcInfo loc => Pretty (RPat loc)
instance SrcInfo loc => Pretty (PatField loc)
instance SrcInfo loc => Pretty (PXAttr loc)
instance SrcInfo loc => Pretty (Pat loc)
instance SrcInfo loc => Pretty (Splice loc)
instance SrcInfo loc => Pretty (Bracket loc)
instance Pretty (XName l)
instance SrcInfo loc => Pretty (XAttr loc)
instance SrcInfo loc => Pretty (Exp loc)
instance Pretty (Literal l)
instance SrcInfo loc => Pretty (GuardedRhs loc)
instance SrcInfo loc => Pretty (Rhs loc)
instance Pretty (FunDep l)
instance Pretty (Kind l)
instance Pretty (TyVarBind l)
instance Pretty (Type l)
instance Pretty (Deriving l)
instance Pretty (BangType l)
instance Pretty (FieldDecl l)
instance Pretty (ConDecl l)
instance Pretty (GadtDecl l)
instance Pretty (QualConDecl l)
instance SrcInfo loc => Pretty (Annotation loc)
instance SrcInfo loc => Pretty (ModulePragma loc)
instance Pretty (RuleVar l)
instance Pretty (Activation l)
instance SrcInfo loc => Pretty (Rule loc)
instance Pretty (CallConv l)
instance Pretty (Safety l)
instance SrcInfo loc => Pretty (InstDecl loc)
instance SrcInfo loc => Pretty (ClassDecl loc)
instance SrcInfo pos => Pretty (Match pos)
instance Pretty (Assoc l)
instance Pretty (DataOrNew l)
instance Pretty (InstHead l)
instance Pretty (DeclHead l)
instance SrcInfo pos => Pretty (Decl pos)
instance Pretty (ImportSpec l)
instance Pretty (ImportSpecList l)
instance SrcInfo pos => Pretty (ImportDecl pos)
instance Pretty (ExportSpec l)
instance Pretty (ExportSpecList l)
instance Pretty (ModuleName l)
instance Pretty (WarningText l)
instance Pretty (ModuleHead l)
instance SrcInfo pos => Pretty (Module pos)
instance Pretty SrcSpan
instance Pretty SrcLoc
instance Pretty Asst
instance Pretty SpecialCon
instance Pretty CName
instance Pretty IPBind
instance Pretty IPName
instance Pretty Name
instance Pretty Op
instance Pretty QName
instance Pretty QOp
instance Pretty FieldUpdate
instance Pretty QualStmt
instance Pretty Stmt
instance Pretty GuardedAlt
instance Pretty GuardedAlts
instance Pretty Alt
instance Pretty RPatOp
instance Pretty RPat
instance Pretty PatField
instance Pretty PXAttr
instance Pretty Pat
instance Pretty Splice
instance Pretty Bracket
instance Pretty XName
instance Pretty XAttr
instance Pretty Exp
instance Pretty Literal
instance Pretty GuardedRhs
instance Pretty Rhs
instance Pretty FunDep
instance Pretty Kind
instance Pretty TyVarBind
instance Pretty Type
instance Pretty BangType
instance Pretty ConDecl
instance Pretty GadtDecl
instance Pretty QualConDecl
instance Pretty Tool
instance Pretty ModulePragma
instance Pretty RuleVar
instance Pretty Activation
instance Pretty Rule
instance Pretty CallConv
instance Pretty Safety
instance Pretty InstDecl
instance Pretty ClassDecl
instance Pretty Match
instance Pretty Assoc
instance Pretty DataOrNew
instance Pretty Annotation
instance Pretty Decl
instance Pretty ImportSpec
instance Pretty ImportDecl
instance Pretty ExportSpec
instance Pretty ModuleName
instance Pretty Module
instance Monad (DocM s)
instance Functor (DocM s)
-- | Fixity information to give the parser so that infix operators can be
-- parsed properly.
module Language.Haskell.Exts.Annotated.Fixity
-- | Operator fixities are represented by their associativity (left, right
-- or none) and their precedence (0-9).
data Fixity
Fixity :: Assoc -> Int -> QName -> Fixity
infix_ :: Int -> [String] -> [Fixity]
infixl_ :: Int -> [String] -> [Fixity]
infixr_ :: Int -> [String] -> [Fixity]
-- | All fixities defined in the Prelude.
preludeFixities :: [Fixity]
-- | All fixities defined in the base package.
--
-- Note that the <tt>+++</tt> operator appears in both Control.Arrows and
-- Text.ParserCombinators.ReadP. The listed precedence for <tt>+++</tt>
-- in this list is that of Control.Arrows.
baseFixities :: [Fixity]
-- | All AST elements that may include expressions which in turn may need
-- fixity tweaking will be instances of this class.
class AppFixity ast
applyFixities :: (AppFixity ast, Monad m) => [Fixity] -> ast SrcSpanInfo -> m (ast SrcSpanInfo)
instance AppFixity XAttr
instance AppFixity Splice
instance AppFixity Bracket
instance AppFixity QualStmt
instance AppFixity GuardedAlt
instance AppFixity GuardedAlts
instance AppFixity Alt
instance AppFixity FieldUpdate
instance AppFixity IPBind
instance AppFixity Binds
instance AppFixity Stmt
instance AppFixity PXAttr
instance AppFixity RPat
instance AppFixity PatField
instance AppFixity GuardedRhs
instance AppFixity Rhs
instance AppFixity Match
instance AppFixity InstDecl
instance AppFixity ClassDecl
instance AppFixity Annotation
instance AppFixity Decl
instance AppFixity Module
instance AppFixity Pat
instance AppFixity Exp
-- | Parser for Haskell with extensions.
module Language.Haskell.Exts.Parser
-- | Class to reuse the parse function at many different types.
class Parseable ast
parse :: Parseable ast => String -> ParseResult ast
parseWithMode :: Parseable ast => ParseMode -> String -> ParseResult ast
parseWithComments :: Parseable ast => ParseMode -> String -> ParseResult (ast, [Comment])
-- | Static parameters governing a parse. Note that the various parse
-- functions in <a>Language.Haskell.Exts.Parser</a> never look at
-- LANGUAGE pragmas, regardless of what the
-- <tt>ignoreLanguagePragmas</tt> flag is set to. Only the various
-- <tt>parseFile</tt> functions in <a>Language.Haskell.Exts</a> will act
-- on it, when set to <a>False</a>.
data ParseMode
ParseMode :: String -> Language -> [Extension] -> Bool -> Bool -> Maybe [Fixity] -> ParseMode
-- | original name of the file being parsed
parseFilename :: ParseMode -> String
-- | base language (e.g. Haskell98, Haskell2010)
baseLanguage :: ParseMode -> Language
-- | list of extensions enabled for parsing
extensions :: ParseMode -> [Extension]
-- | if <a>True</a>, the parser won't care about further extensions in
-- LANGUAGE pragmas in source files
ignoreLanguagePragmas :: ParseMode -> Bool
-- | if <a>True</a>, the parser won't read line position information from
-- LINE pragmas in source files
ignoreLinePragmas :: ParseMode -> Bool
-- | list of fixities to be aware of
fixities :: ParseMode -> Maybe [Fixity]
-- | Default parameters for a parse. The default is an unknown filename, no
-- extensions (i.e. Haskell 98), don't ignore LANGUAGE pragmas, do ignore
-- LINE pragmas, and be aware of fixities from the <tt>Prelude</tt>.
defaultParseMode :: ParseMode
-- | The result of a parse.
data ParseResult a
-- | The parse succeeded, yielding a value.
ParseOk :: a -> ParseResult a
-- | The parse failed at the specified source location, with an error
-- message.
ParseFailed :: SrcLoc -> String -> ParseResult a
-- | Retrieve the result of a successful parse, throwing an error if the
-- parse is actually not successful.
fromParseResult :: ParseResult a -> a
-- | Parse of a string, which should contain a complete Haskell module.
parseModule :: String -> ParseResult Module
-- | Parse of a string containing a complete Haskell module, using an
-- explicit mode.
parseModuleWithMode :: ParseMode -> String -> ParseResult Module
-- | Parse of a string containing a complete Haskell module, using an
-- explicit mode, retaining comments.
parseModuleWithComments :: ParseMode -> String -> ParseResult (Module, [Comment])
-- | Parse of a string containing a Haskell expression.
parseExp :: String -> ParseResult Exp
-- | Parse of a string containing a Haskell expression, using an explicit
-- mode.
parseExpWithMode :: ParseMode -> String -> ParseResult Exp
-- | Parse of a string containing a complete Haskell module, using an
-- explicit mode, retaining comments.
parseExpWithComments :: ParseMode -> String -> ParseResult (Exp, [Comment])
-- | Parse of a string containing a Haskell type.
parseStmt :: String -> ParseResult Stmt
-- | Parse of a string containing a Haskell type, using an explicit mode.
parseStmtWithMode :: ParseMode -> String -> ParseResult Stmt
-- | Parse of a string containing a complete Haskell module, using an
-- explicit mode, retaining comments.
parseStmtWithComments :: ParseMode -> String -> ParseResult (Stmt, [Comment])
-- | Parse of a string containing a Haskell pattern.
parsePat :: String -> ParseResult Pat
-- | Parse of a string containing a Haskell pattern, using an explicit
-- mode.
parsePatWithMode :: ParseMode -> String -> ParseResult Pat
-- | Parse of a string containing a complete Haskell module, using an
-- explicit mode, retaining comments.
parsePatWithComments :: ParseMode -> String -> ParseResult (Pat, [Comment])
-- | Parse of a string containing a Haskell top-level declaration.
parseDecl :: String -> ParseResult Decl
-- | Parse of a string containing a Haskell top-level declaration, using an
-- explicit mode.
parseDeclWithMode :: ParseMode -> String -> ParseResult Decl
-- | Parse of a string containing a complete Haskell module, using an
-- explicit mode, retaining comments.
parseDeclWithComments :: ParseMode -> String -> ParseResult (Decl, [Comment])
-- | Parse of a string containing a Haskell type.
parseType :: String -> ParseResult Type
-- | Parse of a string containing a Haskell type, using an explicit mode.
parseTypeWithMode :: ParseMode -> String -> ParseResult Type
-- | Parse of a string containing a complete Haskell module, using an
-- explicit mode, retaining comments.
parseTypeWithComments :: ParseMode -> String -> ParseResult (Type, [Comment])
getTopPragmas :: String -> ParseResult [ModulePragma]
instance Parseable Type
instance Parseable Decl
instance Parseable Pat
instance Parseable Exp
instance Parseable Module
instance SrcInfo loc => Parseable (Stmt loc)
instance SrcInfo loc => Parseable (Type loc)
instance SrcInfo loc => Parseable (Decl loc)
instance SrcInfo loc => Parseable (Pat loc)
instance SrcInfo loc => Parseable (Exp loc)
instance SrcInfo loc => Parseable (Module loc)
-- | An umbrella module for the various functionality of the package. Also
-- provides some convenient functionality for dealing directly with
-- source files.
module Language.Haskell.Exts.Annotated
-- | Parse a source file on disk, using the default parse mode.
parseFile :: FilePath -> IO (ParseResult (Module SrcSpanInfo))
-- | Parse a source file on disk, supplying a custom parse mode.
parseFileWithMode :: ParseMode -> FilePath -> IO (ParseResult (Module SrcSpanInfo))
-- | Parse a source file on disk, with an extra set of extensions to know
-- about on top of what the file itself declares.
parseFileWithExts :: [Extension] -> FilePath -> IO (ParseResult (Module SrcSpanInfo))
parseFileWithComments :: ParseMode -> FilePath -> IO (ParseResult (Module SrcSpanInfo, [Comment]))
-- | Parse a source file from a string using the default parse mode.
parseFileContents :: String -> ParseResult (Module SrcSpanInfo)
-- | Parse a source file from a string using a custom parse mode.
parseFileContentsWithMode :: ParseMode -> String -> ParseResult (Module SrcSpanInfo)
-- | Parse a source file from a string, with an extra set of extensions to
-- know about on top of what the file itself declares.
parseFileContentsWithExts :: [Extension] -> String -> ParseResult (Module SrcSpanInfo)
parseFileContentsWithComments :: ParseMode -> String -> ParseResult (Module SrcSpanInfo, [Comment])
-- | Parse of a string, which should contain a complete Haskell module.
parseModule :: String -> ParseResult (Module SrcSpanInfo)
-- | Parse of a string containing a complete Haskell module, using an
-- explicit mode.
parseModuleWithMode :: ParseMode -> String -> ParseResult (Module SrcSpanInfo)
-- | Parse of a string containing a complete Haskell module, using an
-- explicit mode, retaining comments.
parseModuleWithComments :: ParseMode -> String -> ParseResult (Module SrcSpanInfo, [Comment])
-- | Parse of a string containing a Haskell expression.
parseExp :: String -> ParseResult (Exp SrcSpanInfo)
-- | Parse of a string containing a Haskell expression, using an explicit
-- mode.
parseExpWithMode :: ParseMode -> String -> ParseResult (Exp SrcSpanInfo)
-- | Parse of a string containing a complete Haskell module, using an
-- explicit mode, retaining comments.
parseExpWithComments :: ParseMode -> String -> ParseResult (Exp SrcSpanInfo, [Comment])
-- | Parse of a string containing a Haskell statement.
parseStmt :: String -> ParseResult (Stmt SrcSpanInfo)
-- | Parse of a string containing a Haskell type, using an explicit mode.
parseStmtWithMode :: ParseMode -> String -> ParseResult (Stmt SrcSpanInfo)
-- | Parse of a string containing a complete Haskell module, using an
-- explicit mode, retaining comments.
parseStmtWithComments :: ParseMode -> String -> ParseResult (Stmt SrcSpanInfo, [Comment])
-- | Parse of a string containing a Haskell pattern.
parsePat :: String -> ParseResult (Pat SrcSpanInfo)
-- | Parse of a string containing a Haskell pattern, using an explicit
-- mode.
parsePatWithMode :: ParseMode -> String -> ParseResult (Pat SrcSpanInfo)
-- | Parse of a string containing a complete Haskell module, using an
-- explicit mode, retaining comments.
parsePatWithComments :: ParseMode -> String -> ParseResult (Pat SrcSpanInfo, [Comment])
-- | Parse of a string containing a Haskell top-level declaration.
parseDecl :: String -> ParseResult (Decl SrcSpanInfo)
-- | Parse of a string containing a Haskell top-level declaration, using an
-- explicit mode.
parseDeclWithMode :: ParseMode -> String -> ParseResult (Decl SrcSpanInfo)
-- | Parse of a string containing a complete Haskell module, using an
-- explicit mode, retaining comments.
parseDeclWithComments :: ParseMode -> String -> ParseResult (Decl SrcSpanInfo, [Comment])
-- | Parse of a string containing a Haskell type.
parseType :: String -> ParseResult (Type SrcSpanInfo)
-- | Parse of a string containing a Haskell type, using an explicit mode.
parseTypeWithMode :: ParseMode -> String -> ParseResult (Type SrcSpanInfo)
-- | Parse of a string containing a complete Haskell module, using an
-- explicit mode, retaining comments.
parseTypeWithComments :: ParseMode -> String -> ParseResult (Type SrcSpanInfo, [Comment])
-- | Gather the extensions declared in LANGUAGE pragmas at the top of the
-- file. Returns <a>Nothing</a> if the parse of the pragmas fails.
readExtensions :: String -> Maybe (Maybe Language, [Extension])
-- | An umbrella module for the various functionality of the package. Also
-- provides some convenient functionality for dealing directly with
-- source files.
module Language.Haskell.Exts
-- | Parse a source file on disk, using the default parse mode.
parseFile :: FilePath -> IO (ParseResult Module)
-- | Parse a source file on disk, supplying a custom parse mode.
parseFileWithMode :: ParseMode -> FilePath -> IO (ParseResult Module)
-- | Parse a source file on disk, with an extra set of extensions to know
-- about on top of what the file itself declares.
parseFileWithExts :: [Extension] -> FilePath -> IO (ParseResult Module)
-- | Parse a source file on disk, supplying a custom parse mode, and
-- retaining comments.
parseFileWithComments :: ParseMode -> FilePath -> IO (ParseResult (Module, [Comment]))
-- | Parse a source file from a string using the default parse mode.
parseFileContents :: String -> ParseResult Module
-- | Parse a source file from a string using a custom parse mode.
parseFileContentsWithMode :: ParseMode -> String -> ParseResult Module
-- | Parse a source file from a string, with an extra set of extensions to
-- know about on top of what the file itself declares.
parseFileContentsWithExts :: [Extension] -> String -> ParseResult Module
-- | Parse a source file from a string using a custom parse mode and
-- retaining comments.
parseFileContentsWithComments :: ParseMode -> String -> ParseResult (Module, [Comment])
-- | Gather the extensions declared in LANGUAGE pragmas at the top of the
-- file. Returns <a>Nothing</a> if the parse of the pragmas fails.
readExtensions :: String -> Maybe (Maybe Language, [Extension])
|