https://github.com/symengine/symengine.hs
Haskell bindings to SymEngine
https://github.com/symengine/symengine.hs
Last synced: 2 months ago
JSON representation
Haskell bindings to SymEngine
- Host: GitHub
- URL: https://github.com/symengine/symengine.hs
- Owner: symengine
- License: mit
- Created: 2016-03-05T02:39:05.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-08-17T12:55:54.000Z (almost 2 years ago)
- Last Synced: 2024-06-11T17:16:38.860Z (about 1 year ago)
- Language: Haskell
- Size: 61.5 KB
- Stars: 25
- Watchers: 11
- Forks: 13
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SymEngine-hs
[](https://travis-ci.org/symengine/symengine.hs)
[](https://codeclimate.com/github/symengine/symengine.hs/coverage)
[](https://codeclimate.com/github/symengine/symengine.hs)Haskell bindings to [SymEngine](https://github.com/symengine/symengine)
# Prerequisites
### [Stack](http://docs.haskellstack.org/en/stable/README/), a Haskell build tool
Stack is a Haskell build tool, which allows for cross-platform, reproducible builds.
The build toolchain of this project depends on `stack`, so please follow the installation
instructions as [outlined here](http://docs.haskellstack.org/en/stable/README/#how-to-install)### SymEngine, the library that this package provides a Haskell interface for
Please go through the `SymEngine` installation instructions, and make sure that the header files
as well as the libraries* `symengine`
* `gmp`
* `gmpxxx`Since these are *hard* dependencies for SymEngine-hs to build.
# Getting started
To quickly build and check everything is working, run
```
stack build && stack test
```All of the test cases should pass with SymEngine
## Playing around in the interpreter
to launch a `GHCi` session, execute the interpreter with
```
stack ghci --ghci-options " -lstdc++ -lgmpxx -lgmp -lsymengine -L/usr/local/lib/"
```Make sure that you have built `symengine.so` (NOTE: you __need_ the shared object, and not just the library), and
have installed the shared object as well.Once you are inside `GHCi`, you can execute basic functions such as `basic_const_zero`, `basic_const_one`, etc.
A typical interpreter session will look like this:
```
GHCi session with Symengine loaded
---*Symengine Symengine> basic_const_zero
0
*Symengine Symengine> basic_const_zero
0
*Symengine Symengine> basic_const_one
1
*Symengine Symengine> basic_const_minus_one
-1
```# Things to Do
`[TODO: fill this up]`
# Contributing
`[TODO: fill this up]`
# License
All code is released under the [MIT License](https://github.com/symengine/symengine.hs/blob/master/LICENSE).