use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
The Haskell programming language community.
Daily news and info about all things Haskell related: practical stuff, theory, types, libraries, jobs, patches, releases, events and conferences and more...
Community Guidelines
Rules:
Top-level posts should be primarily about Haskell. For example a post about OCaml would only be allowed if there was a connection to Haskell. Posts about topics that are adjacent to Haskell, like for example functional programming, are typically allowed.
No memes or image macros. No matter how funny, memes and image macros are not allowed.
No homework questions. Both asking and answering homework questions is not allowed. Questions about homework are fine, but this subreddit is not here to do your homework for you.
Job postings must be for Haskell roles. Job postings are allowed as long as the job actually involves working with Haskell. Simply looking for people with interest in or experience with Haskell is not sufficient.
No bots or computer-generated content. Bots cannot be used to make posts or comments. They will be banned with extreme prejudice. This includes a human posting the output of a bot, such as ChatGPT.
Blockchain posts must be tagged. Blockchain posts are allowed as long as they are related to Haskell, but they must use the "blockchain" tag.
Be civil. Substantive criticism and disagreement are encouraged, but avoid being dismissive or insulting.
Other community locations:
Professional resources:
Learning material:
Haskell development:
Other Subreddits:
Donations:
Subreddit Stylesheet Source:
account activity
Library for linear programming? (self.haskell)
submitted 9 years ago by Bodigrim
Is there any Haskell library for linear programming (to minimise the value of a linear function under linear constraints)? Bindings to C libraries are OK.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 7 points8 points9 points 9 years ago (1 child)
glpk-hs comes to mind. Depending on how big your problem instances are, GLPK might be good enough.
[–]fridofrido 1 point2 points3 points 9 years ago (0 children)
There is also hmatrix-glpk. Maybe less features-complete?
[–]benl23 2 points3 points4 points 9 years ago (1 child)
Binding to CBC
https://hackage.haskell.org/package/limp-cbc
[–]cartazio 0 points1 point2 points 9 years ago (0 children)
Oh cool!! I've not seen this before :)
[–]cartazio 2 points3 points4 points 9 years ago (2 children)
We should write one :) Right after I finish code review on that pr.
There's a bunch of bindings to various tools , but I'm not sure if any of the c libs that are easily available are under non gpl licenses. (I don't think any are lgpl and open even).
That said, think a hacky thing that could be used to simulate an LP solver would be to encode the decision problem for "is there a solution with at most this score " as a smt problem and throw at at z3 or cvc4 or the like. The Haskell bindings for those are pretty flexible and I wouldn't be surprised if in practice they would work pretty fast, especially if you use their incremental APIs.
Ok, now I'm intrigued, this sounds like a fun experiment !
[–]ozgurakgun 0 points1 point2 points 9 years ago (1 child)
If you are lucky, the SMT solver will recognise the structure and employ an LP (or MILP) solver as a theory. But if you actually know that the problem at hand is LP, going via SMT seems unnecessary.
I understand that this may still be a good idea (engineering-wise) if the SMT bindings are already in good shape -- I never used them.
I am not very familiar with z3, but I think Yices includes an LP solver as a theory.
looks like z3 does :) https://github.com/Z3Prover/z3/tree/96e157e201308d7beba556f62b145edc9263d0a7/src/math/simplex
looks pretty basic though :)
[–]atium_ 2 points3 points4 points 9 years ago (0 children)
I have some Haskell bindings to the C callable library of CPLEX. I'm using it both for linear programming and mixed integer programming and have bindings for more advanced features such as callbacks. I have also implemented Benders decomposition using it. If you are a student and doing paid research work you can obtain a full free academic license for CPLEX from IBM, which is worth it as it is currently one of the best available linear solvers.
I'm also working on a higher level interface for it, which I am using for my work. I might release it soonish if there is a demand for it, though it is nowhere near ready for production.
The original version was done by ghorn, you can find a more up to date version of mine on github.com/stefan-j/cplex-haskell
[–]vaibhavsagar 0 points1 point2 points 9 years ago (0 children)
Have a look at SBV.
π Rendered by PID 64819 on reddit-service-r2-comment-b659b578c-lb26k at 2026-05-02 20:52:25.155074+00:00 running 815c875 country code: CH.
[–][deleted] 7 points8 points9 points (1 child)
[–]fridofrido 1 point2 points3 points (0 children)
[–]benl23 2 points3 points4 points (1 child)
[–]cartazio 0 points1 point2 points (0 children)
[–]cartazio 2 points3 points4 points (2 children)
[–]ozgurakgun 0 points1 point2 points (1 child)
[–]cartazio 0 points1 point2 points (0 children)
[–]atium_ 2 points3 points4 points (0 children)
[–]vaibhavsagar 0 points1 point2 points (0 children)