https://github.com/sudo-rushil/kaleidoscope
LLVM tutorial with Haskell's LLVM 9 bindings.
https://github.com/sudo-rushil/kaleidoscope
Last synced: 2 months ago
JSON representation
LLVM tutorial with Haskell's LLVM 9 bindings.
- Host: GitHub
- URL: https://github.com/sudo-rushil/kaleidoscope
- Owner: sudo-rushil
- Created: 2020-08-11T06:07:49.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-11T06:08:10.000Z (almost 6 years ago)
- Last Synced: 2025-03-12T21:25:48.044Z (over 1 year ago)
- Language: Haskell
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kaleidoscope
My implementation of the kaleidoscope tutorial by Stephen Diehl.
Switched to LLVM 9.0
https://www.reddit.com/r/haskell/comments/8c6zlf/how_can_i_link_c_source_using_stack/
# Differences from the original tutorial:
- ShortByteString v. String
- This was the biggest issue; the current LLVM bindings use ShortByteStrings for AST Names, so I had to manually pack the parse tree into a ByteString form. A more robust solution would be to parse into ByteStrings directly.
- Codegen
- Due to the differences in function v. value types, calling functions with `externf` requires determining the function ptr type, which isn't `double` as in the tutorial.