Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gelisam/hint-demo
https://github.com/gelisam/hint-demo
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/gelisam/hint-demo
- Owner: gelisam
- Created: 2014-10-23T04:59:31.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-23T04:59:46.000Z (about 10 years ago)
- Last Synced: 2023-04-13T07:57:02.516Z (over 1 year ago)
- Language: Haskell
- Size: 87.9 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hint Demo
A program to demonstrate that the [hint](http://hackage.haskell.org/package/hint) library can load arbitrary values; even if it doesn't have the source, even unserializable values such as functions, even values which involve existential datatypes, and even if the types hidden in those existential datatypes are unknown until runtime.
## Usage
Each folder except `hint-demo` contains a small library, which will be loaded at runtime by `hint-demo`. The first step is to navigate to each folder and to install each library using `cabal install`. It's possible to [ask hint to look inside a sandbox](https://github.com/gelisam/hawk/blob/master/src/System/Console/Hawk/Sandbox.hs) but in this demo, to make it easier for hint to find the installed binaries, please don't use a sandbox.
If you really want to make sure that hint-demo is loading the compiled `.hi`, `.a`, `.so` or `.dylib` files which have been installed to your `~/.cabal` folder, you can erase the source files for those libraries if you want.
Next, go to the `hint-demo` folder, install and run the program. If everything worked correctly, the output should be as follows:
$ hint-demo
"1.0"
"True"
"42-Branch (Leaf 1) (Branch (Leaf 2) (Leaf 3))"