ghc-compiler-python 9.4.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,208 @@
1
+ Metadata-Version: 2.4
2
+ Name: ghc-compiler-python
3
+ Version: 9.4.8
4
+ Summary: Native GHC 9.4.8 compiler and Cabal 3.10.3.0 tooling packaged as an isolated Python Wheel
5
+ Project-URL: Homepage, https://github.com/Saimonokuma/GHC-COMPILER-PYTHON
6
+ Project-URL: Source, https://github.com/Saimonokuma/GHC-COMPILER-PYTHON
7
+ Project-URL: Issues, https://github.com/Saimonokuma/GHC-COMPILER-PYTHON/issues
8
+ Project-URL: Contributing, https://github.com/Saimonokuma/GHC-COMPILER-PYTHON/blob/main/CONTRIBUTING.md
9
+ Project-URL: Documentation, https://github.com/Saimonokuma/GHC-COMPILER-PYTHON/blob/main/ARCHITECTURE.md
10
+ Project-URL: Releases, https://github.com/Saimonokuma/GHC-COMPILER-PYTHON/releases
11
+ Project-URL: Funding, https://ko-fi.com/saimonokuma
12
+ Author: ghc-compiler-python contributors
13
+ License: MIT
14
+ License-File: LICENSE
15
+ Keywords: cabal,compiler,ghc,haskell,toolchain
16
+ Classifier: Development Status :: 5 - Production/Stable
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: License :: OSI Approved :: MIT License
19
+ Classifier: Operating System :: MacOS :: MacOS X
20
+ Classifier: Operating System :: Microsoft :: Windows
21
+ Classifier: Operating System :: POSIX :: Linux
22
+ Classifier: Programming Language :: Haskell
23
+ Classifier: Programming Language :: Python :: 3
24
+ Classifier: Programming Language :: Python :: 3 :: Only
25
+ Classifier: Programming Language :: Python :: 3.10
26
+ Classifier: Programming Language :: Python :: 3.11
27
+ Classifier: Programming Language :: Python :: 3.12
28
+ Classifier: Programming Language :: Python :: 3.13
29
+ Classifier: Topic :: Software Development :: Build Tools
30
+ Classifier: Topic :: Software Development :: Compilers
31
+ Requires-Python: >=3.10
32
+ Description-Content-Type: text/markdown
33
+
34
+ <div align="center">
35
+
36
+ # โšก GHC Compiler Python
37
+
38
+ **The bridge between Haskell and Python**
39
+
40
+ *The first pip-installable Glasgow Haskell Compiler โ€” one command, three platforms, the full toolchain*
41
+
42
+ [![Ko-fi](https://img.shields.io/badge/Support-Ko--fi-FF5E5B?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/saimonokuma)
43
+ [![PyPI](https://img.shields.io/badge/PyPI-ghc--compiler--python-3775A9?style=for-the-badge&logo=pypi&logoColor=white)](https://pypi.org/project/ghc-compiler-python/)
44
+ [![Nova-Violet Role](https://img.shields.io/badge/Nova--Violet-Role-9b59b6?style=for-the-badge)](https://github.com/Nova-Violet-Role)
45
+ [![License](https://img.shields.io/badge/License-MIT-764ba2?style=for-the-badge)](LICENSE)
46
+
47
+ [![GHC](https://img.shields.io/badge/GHC-9.4.8-5e5086?style=flat-square&logo=haskell&logoColor=white)](https://www.haskell.org/ghc/)
48
+ [![Cabal](https://img.shields.io/badge/Cabal-3.10.3.0-5e5086?style=flat-square)](https://www.haskell.org/cabal/)
49
+ [![Python](https://img.shields.io/badge/Python-3.10%2B-3776AB?style=flat-square&logo=python&logoColor=white)](https://www.python.org/)
50
+ [![Proved in Lean 4](https://img.shields.io/badge/Proved%20in-Lean%204-2C3E50?style=flat-square)](lean/)
51
+
52
+ </div>
53
+
54
+ ---
55
+
56
+ ## ๐Ÿ“œ About
57
+
58
+ A Haskell toolchain is normally installed by its own ecosystem installer, which writes to `~/.ghc`, `~/.cabal` and the system PATH. That is awkward inside a Python project, hostile inside CI, and impossible where the global state is not yours to change.
59
+
60
+ **GHC Compiler Python** delivers GHC through the packaging mechanism Python already has. The compiler lives inside the environment, the wrappers sterilize the environment before every call, and removing the environment removes the toolchain.
61
+
62
+ - โœ… `pip install ghc-compiler-python`
63
+ - โœ… Windows ยท macOS ยท Linux
64
+ - โœ… Full GHC 9.4.8 compiler
65
+ - โœ… Complete Cabal 3.10.3.0 support
66
+ - โœ… Any AI with Python execution can now compile Haskell
67
+
68
+ ---
69
+
70
+ ## ๐Ÿš€ Installation
71
+
72
+ ```bash
73
+ pip install ghc-compiler-python
74
+ ```
75
+
76
+ The PyPI package is **~17 KiB**. It fetches the toolchain for your platform on first use and verifies it against a SHA-256 digest embedded in the wheel โ€” a tampered or truncated download cannot install.
77
+
78
+ ### ๐Ÿ“ฆ Offline / air-gapped
79
+
80
+ Self-contained wheels with the toolchain already bundled live on the [releases page](https://github.com/Saimonokuma/GHC-COMPILER-PYTHON/releases). These never contact the network:
81
+
82
+ ```bash
83
+ pip install ghc_compiler_python-9.4.8-py3-none-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl # Linux
84
+ pip install ghc_compiler_python-9.4.8-py3-none-macosx_11_0_arm64.whl # macOS
85
+ pip install ghc_compiler_python-9.4.8-py3-none-win_amd64.whl # Windows
86
+ ```
87
+
88
+ > The Linux offline wheel carries the tags `manylinux_2_38` **and** `manylinux_2_39`, so it installs on glibc 2.38 or newer. That floor is not chosen โ€” auditwheel derives it by inspecting the versioned symbols the binaries actually reference. A tag lower than the binaries support would install on systems where the toolchain then fails at runtime, so the build states what is true rather than what would be convenient. On older distributions use the thin wheel; its payload is a plain tarball and carries no such constraint.
89
+
90
+ ### ๐Ÿ”ง Requirements
91
+
92
+ | | |
93
+ |:--|:--|
94
+ | ๐Ÿ **Python** | `>= 3.10` |
95
+ | ๐Ÿ”— **C-Linker** | `gcc` or `clang` on the host |
96
+ | ๐Ÿง Linux | `sudo apt-get install gcc` |
97
+ | ๐ŸŽ macOS | `xcode-select --install` |
98
+ | ๐ŸชŸ Windows | MinGW-w64 or MSYS2 |
99
+
100
+ ### โš™๏ธ Configuration
101
+
102
+ | Variable | Effect |
103
+ |:--|:--|
104
+ | `GHC_COMPILER_PYTHON_HOME` | Where the toolchain is cached. Defaults to the platform cache directory. |
105
+ | `GHC_COMPILER_PYTHON_OFFLINE` | Set to `1` to refuse network access entirely. |
106
+
107
+ ---
108
+
109
+ ## ๐Ÿ’ป Usage
110
+
111
+ ```bash
112
+ # Compile a Haskell file
113
+ ghc-wrapper Main.hs
114
+
115
+ # Launch GHCi
116
+ ghci-wrapper
117
+
118
+ # Build a Cabal project
119
+ cabal-wrapper build
120
+ ```
121
+
122
+ Wrappers sterilize the environment on every call, so a global `~/.ghc/` or `GHC_PACKAGE_PATH` cannot leak into your build.
123
+
124
+ Resolution is **hermetic**: a GHC already on your PATH is deliberately *ignored*, so you always get the pinned 9.4.8 rather than whatever the host happens to have.
125
+
126
+ ---
127
+
128
+ ## ๐Ÿ–ฅ๏ธ Supported Platforms
129
+
130
+ | OS | Architecture | Toolchain |
131
+ |:--|:--|:--|
132
+ | ๐Ÿง **Linux** | x86_64 | GHC 9.4.8 ยท Cabal 3.10.3.0 |
133
+ | ๐ŸŽ **macOS** | ARM64 (Apple Silicon) | GHC 9.4.8 ยท Cabal 3.10.3.0 |
134
+ | ๐ŸชŸ **Windows** | x86_64 | GHC 9.4.8 ยท Cabal 3.10.3.0 |
135
+
136
+ Every release is proven on all three: each platform installs the wheel, compiles a Haskell program, **runs** it, and asserts its output โ€” and checks the reported compiler is the pinned 9.4.8 โ€” before anything is published. Builds โ‰  installs โ‰  compiles โ‰  delivered.
137
+
138
+ ---
139
+
140
+ ## ๐Ÿ“ What is proved, not merely tested
141
+
142
+ Some properties must hold for *every* input, not for the inputs a test happens to supply. Those are proved in **Lean 4** โ€” machine-checked, zero `sorry`, verified in CI.
143
+
144
+ ```lean
145
+ theorem payloadKey_injective (p q : Platform) : payloadKey p = payloadKey q โ†’ p = q
146
+ theorem no_partial_state (s : CacheState) (steps : List Step) : ...
147
+ theorem no_escape_without_dotdot : โˆ€ member base, ยฌ member.contains ".." โ†’ isWithin base member
148
+ ```
149
+
150
+ **Injective** โ€” no two platforms share a payload identity, so one platform can never run another's binaries. **Atomic** โ€” under any interleaving, the cache is observable only as absent or complete, never half-installed. **Contained** โ€” an archive member without `..` cannot escape the destination, for any base and any depth.
151
+
152
+ ---
153
+
154
+ ## ๐Ÿ“Š What is in the payload
155
+
156
+ Measured from the real 9.4.8 distribution โ€” 9,870 entries, 2,017 MB extracted:
157
+
158
+ | Component | Size | Share | Kept |
159
+ |:--|--:|--:|:--|
160
+ | Profiling libraries | 602 MB | 29.9% | โŒ |
161
+ | Documentation / haddock | 580 MB | 28.7% | โŒ |
162
+ | Static archives | 331 MB | 16.4% | โœ… |
163
+ | Shared objects | 174 MB | 8.6% | โœ… |
164
+ | Executables | 165 MB | 8.2% | โœ… |
165
+ | Interface files (static) | 82 MB | 4.1% | โœ… |
166
+ | Interface files (dynamic) | 82 MB | 4.1% | โœ… |
167
+ | Other | 1 MB | 0.1% | โœ… |
168
+ | **Total** | **2,017 MB** | **100.0%** | |
169
+
170
+ Removing the first two: **2,017 โ†’ 863 MB** extracted, **164 โ†’ 91 MB** compressed. Linking is static by default, GHCi and TemplateHaskell load the shared objects, and imports cannot resolve without interface files โ€” so those stay. Restore the rest with `GHC_KEEP_PROFILING=1` or `GHC_KEEP_DOCS=1`.
171
+
172
+ ---
173
+
174
+ ## ๐Ÿค Contributing
175
+
176
+ | Area | How you can help |
177
+ |:--|:--|
178
+ | ๐Ÿ’ป **Code** | Platform support, packaging, wrapper robustness |
179
+ | ๐Ÿงช **Testing** | Try it on your distribution and report what breaks |
180
+ | ๐Ÿ“ **Proofs** | Extend the Lean 4 formalization |
181
+ | ๐Ÿ“– **Documentation** | Improve guides and examples |
182
+ | ๐Ÿ’ก **Ideas** | Tell us what a pip-installable compiler should do next |
183
+
184
+ See [ARCHITECTURE.md](ARCHITECTURE.md) for how delivery works and why.
185
+
186
+ ---
187
+
188
+ ## ๐Ÿ“„ License
189
+
190
+ MIT License. See [LICENSE](LICENSE) for details.
191
+
192
+ ---
193
+
194
+ <div align="center">
195
+
196
+ ### โšก GHC Compiler Python
197
+
198
+ *One command. Three platforms. The full Haskell toolchain.*
199
+
200
+ [![Support Our Journey](https://img.shields.io/badge/๐Ÿ”—_Support_Our_Journey-Ko--fi-FF5E5B?style=for-the-badge)](https://ko-fi.com/saimonokuma)
201
+
202
+ [PyPI](https://pypi.org/project/ghc-compiler-python/) ยท [Releases](https://github.com/Saimonokuma/GHC-COMPILER-PYTHON/releases) ยท [Issues](https://github.com/Saimonokuma/GHC-COMPILER-PYTHON/issues)
203
+
204
+ ยฉ 2026 Nova-Violet Role ยท Non-Profit Organization
205
+
206
+ *Created with โค๏ธ for the advancement of human understanding*
207
+
208
+ </div>
@@ -0,0 +1,10 @@
1
+ ghc_compiler_python/__init__.py,sha256=N4kbpSKof782d2NNXc5JGUwbpJD7GDB-PpMT0PJbNuk,306
2
+ ghc_compiler_python/bootstrap.py,sha256=kISTQ9uEFDvTccL__a0q94_stYDUCCfqBkYA1be2ySU,14985
3
+ ghc_compiler_python/payload_hashes.json,sha256=r-HmvRveNzX92xGq-3K8JGcnTFdGp8KIXkub5CmDg_A,344
4
+ ghc_compiler_python/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ ghc_compiler_python/wrapper.py,sha256=golkrZaFxSl0iXzy-0blkaW-ic0f3Q6FPRCAPVZOw4A,27705
6
+ ghc_compiler_python-9.4.8.dist-info/METADATA,sha256=B4Kbst9XS3NafvbWI1CarYQakEDjfCDyF5SQIbQfi40,9247
7
+ ghc_compiler_python-9.4.8.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
8
+ ghc_compiler_python-9.4.8.dist-info/entry_points.txt,sha256=9QtlqeGuoonFb4bB4F-gLlBbY0koqkTJ2PknLFrvsvo,610
9
+ ghc_compiler_python-9.4.8.dist-info/licenses/LICENSE,sha256=OOef9xbIXwIBos0C1icJ5Z_i44n_VO33KjqyeBTa-tk,1068
10
+ ghc_compiler_python-9.4.8.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.31.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,11 @@
1
+ [console_scripts]
2
+ cabal-wrapper = ghc_compiler_python.wrapper:execute_cabal
3
+ ghc-pkg-wrapper = ghc_compiler_python.wrapper:execute_ghc_pkg
4
+ ghc-wrapper = ghc_compiler_python.wrapper:execute_ghc
5
+ ghci-wrapper = ghc_compiler_python.wrapper:execute_ghci
6
+ haddock-wrapper = ghc_compiler_python.wrapper:execute_haddock
7
+ hp2ps-wrapper = ghc_compiler_python.wrapper:execute_hp2ps
8
+ hpc-wrapper = ghc_compiler_python.wrapper:execute_hpc
9
+ hsc2hs-wrapper = ghc_compiler_python.wrapper:execute_hsc2hs
10
+ runghc-wrapper = ghc_compiler_python.wrapper:execute_runghc
11
+ runhaskell-wrapper = ghc_compiler_python.wrapper:execute_runhaskell
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Saimonokuma
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.