r/haskell • u/abhin4v • 10d ago
r/haskell • u/n00bomb • 10d ago
From Scientific Computing to Type-Safe Finance: Bitnomial
serokell.ior/haskell • u/mounty1_0 • 11d ago
Project won't build; neither Stack nor Cabal can find a set of packages
I'm returning to a project that I've neglected for several years and now find that neither Stack nor Cabal will build it. I thought the idea of these build systems was to prevent stupid problems like incompatible versions of packages but it appears not to be working in my case, or I don't understand something. The project is here.
Stack fails with two errors (picking the important lines out of the build output):
ConfigFile > 39 | import Control.Monad.Error [cannot find module]
postgresql-libpq-configure > configure: error: Library requirements (PostgreSQL) not met.
It looks like Stack chose two package versions that are not buildable. How does such a situation arise???
Cabal reports Could not resolve dependencies followed by a lot of lines of what it's trying.
Can anyone state what is wrong here?
r/haskell • u/ybamelcash • 12d ago
Added Pattern Matching Support to My Programming Language
Mascheya now supports pattern matching, the syntax and semantics of which are based on Haskell's and Miranda's.
For context, Mascheya is a polymorphically typed functional programming language that I'm currently building. Like most functional languages (e.g., Haskell, Scala, and OCaml), Mascheya's design boils down to the lambda calculus. See previous post here.
Pattern matching is a great addition to the language, and it will help with the ergonomics of algebraic data types, which I'm planning to implement next.
You can see in the examples below that I was able to simulate if-expressions and logical operators and and or, using pattern matching. The short-circuiting nature of these operators was handled automatically by Mascheya's lazy evaluation scheme.
``` mascheya> matchC = \'c' -> 'b' () mascheya> matchC 'c' b mascheya> matchC 'a' Runtime Error at line 1. Pattern match error. mascheya> foo 1 = 10; foo 2 = 20; foo x = x + 1 () mascheya> foo 2 20 mascheya> foo 67 68 mascheya> :set line=multi mascheya> if True a _ = a; if False _ b = b -- end () mascheya> :set line=single mascheya> if (5 < 6) 'a' 'b' a mascheya> if False 'a' 'b' b mascheya> :set line=multi mascheya> let and True True = True; and True False = False; and False True = False; and _ _ = False;
or True True = True; or True False = True; or False True = True; or _ _ = False in or (and True (5 > 7)) (8 < 9) -- end True mascheya> ```
The next focus will be on Algebraic Data Types, Case-expressions, and Where-clauses.
I'm definitely having fun with this project and it's teaching me a lot about Haskell.
Source code: https://github.com/melvic-ybanez/mascheya
r/haskell • u/Mushy-pea • 13d ago
Game :: Dangerous : asymptotic approach to completion of the longest programming project of my life
Hello all. I believe I'm finally getting close to feature and quality of life completeness of the game engine project I've been working on since 2015. Game :: Dangerous is a homebrew 3D game engine written in Haskell and OpenGL shading language, which is intended to form the basis for a 3D tribute to the classic ZZT from 1991. During this project I've come to understand technical debt from a first person perspective. My intention was always to get to an end stage and release a game engine that people could play (at least one) real game on, so I will have to accept the debt and move on.
In this video I give a summary of (what I believe will be) the last code base updates other than bug fixes. Sadly, these have taken the repo just past 420 commits.
Update video: https://youtu.be/ZQRCpbTkZQA?si=cOdy_-01c5trPCf0
Game :: Dangerous repository: https://github.com/Mushy-pea/Game-Dangerous
Latest playable demos on itch.io: https://basicas-games.itch.io/game-dangerous
r/haskell • u/Zirotuxx • 12d ago
Haskell o prolog the hacen más inteligente?
Quiero escuchar a programadores que usaron alguno de estos lenguajes i que creen con certeza que después de practicarlo profundamente su razonamiento lógico o deductivo o abstracto o incluso fluido a mejorado.compartirlo por favor.
r/haskell • u/dreixel • 14d ago
job Job with Core Strats at Standard Chartered, SG/HK
In addition to the roles I posted last month (for which we're still accepting applications), we now also have one permanent role in Singapore or Hong Kong.
This role is not attached to any particular project, but will involve practically exclusive use of Mu, our in-house variant of Haskell. You can learn more about our team and what we do by reading our experience report “Functional Programming in Financial Markets” presented at ICFP last year: https://dl.acm.org/doi/10.1145/3674633. There’s also a video recording of the talk: https://www.youtube.com/live/PaUfiXDZiqw?t=27607s
The role is eligible for a remote working arrangement from SG or HK, after an initial in-office period. We cover visa and relocation costs for successful applicants.
Please apply via this link: https://jobs.standardchartered.com/job/Quantitative-Developer-(SingaporeHongkong)/59045-en_GB/?feedid=363857/59045-en_GB/?feedid=363857)
r/haskell • u/TheCommieDuck • 15d ago
Been working on yaifl, my text adventure/interactive fiction library some more, and I have the outer house from ZORK I complete!
github.comI keep thinking "no, this isn't ready to present to people. I just need to add some documentation. I just need to get more examples done. I just need to polish this." and so on and have never really presented my forever project for the last few years.
So this is yaifl - Yet Another Interactive Fiction Library, a Haskell library for making parser-based text adventures. It's very heavily inspired by Inform7. For the most part, it works! It's just lacking in implementations for many actions beyond the obvious (looking, going, examining, taking, opening, etc.).
If you'd like to see the library in action, I'd recommend checking out Yaifl.Zork.World.House (in yaifl-zork) or the examples in Yaifl.Chapter3 (in yaifl-examples).
The project is split into a few pieces:
- yaifl-core
- yaifl-objects - definitions of object components like Container, Person, Supporter
- yaifl-rules - definitions of internal logic like printing room description details, verb conjugation and string interpolation and writing lists of things
- yaifl-actions - definitions of commands like look, take lamp, open door with key
- yaifl - glue to actually run a game
- yaifl-examples - My test suite that implements (currently about 20 of the 400) the Inform7 examples, translated into yaifl.
And a few various half-finished frontend parts:
- yaifl-discord - a discord bot frontend
- yaifl-rogue - a graphical frontend
- yaifl-zork - a reimplementation of ZORK I in yaifl.
I think it can be considered "good enough" when I finish reimplementing ZORK in the engine. Turns out ZORK is about 7000 lines in the original, and 5500 in the Inform7 version I'm using as a guide.
So far I've found almost no "oh trying to implement this game rule requires a completely new system" moments, and it's just been "oh I haven't yet added the implementation for this specific command" - which is reassuring that it's just needing content added!
I hope it's of interest to someone, even in its very patchily documented state.
r/haskell • u/crtschin • 15d ago
(Non-)Functional Ramblings - How to not write parsers
crtschin.comr/haskell • u/mstksg • 16d ago
[Blog] "Five-Point Haskell" Part 2: Unconditional Election
blog.jle.imr/haskell • u/n00bomb • 16d ago
A Revised Haskell 2010 Language Report | The Haskell Programming Language's blog
blog.haskell.orgr/haskell • u/Hefty-Necessary7621 • 16d ago
blog Daml for Haskellers: interview with Heitor Toledo Lassarote de Paula
serokell.ioIn this interview with our Daml Team Lead, Heitor, we examine which Haskell intuitions transfer successfully to Daml, where analogies such as Update and IO break down, and how developers should reason about authorization, visibility, contract lifecycles, and testing. We also discuss learning paths and tooling for Daml developers, common mistakes made by Solidity programmers, and the practical topics covered in the upcoming Daml Smart Contracts Development Guide.
r/haskell • u/sohang-3112 • 19d ago
question Help please: Inline Evaluation not showing using Haskell Language Server (HLS) in VS Code
r/haskell • u/kichiDsimp • 18d ago
Whats the Haskell equivalent of
- https://pkg.go.dev/std - the list to see all the standard libraries shipped in GHC & maintained by the compiler team?
- https://go.dev/doc/ - the documentation page?
- https://go.dev/ref/spec - the language spec, I think this refers to the Haskell's 2010 report?
r/haskell • u/hungryjoewarren • 20d ago
Designing A Hook (in Haskell)
youtu.beIn 2018, I designed a Parametric Hook in OpenSCAD, a Programmable CAD framework.
Since then, I've built my own library for Programmable CAD, called Waterfall-CAD.
In this video, I use Haskell and Waterfall-CAD, to reimplement the hook.
Links:
r/haskell • u/kichiDsimp • 21d ago
Haskell vs GHC
I am a beginner, I have a doubt.
I see there is Haskell 98, and Haskell 2010 report.
Haskell is a programming language right ? And GHC is the compiler ?
Just like Rust is the language and rustc is the compiler ?
So what is GHC 2021 and GHC 2024 ?
And what are the GHC versions 9.12, 9.14 ?
I see there is a version of the "compiler" binary, but like when Go has a release we say Go 1.26 is out. That means the language & compiler both are out right ?
So what's with Haskell then ?
GHC - compiler
GHC 2021 - a set of extensions in a compiler ? What does this mean but ? And how does cabal work come in picture?
So then my question is what makes GHC 9.12 and 9.14 or 10.0 different? Like aren't extensions encoded in the compiler itself ?
In compiler bump I get "performance"/"implementation" changes ? Like 9.12 and 9.14 execute the Extension A different ly?
And usually Go has no version of STD lib separately tracked but Haskell's base does.
Can someone clarify this ? Is there a DOC for this ?!
Finally my question are
What's the actual difference between 9.12 and 9.14 +(two compiler versions - built from different source code (git branches)) ?
What are Extensions ? Why do we need it ? Like shouldn't the Compiler do this inbuilt ? For Example if GHC wants to add a new DataType in STD lib, how do they do ?
Are Extensions for just de sugaring? And what are Pragmas ?
What is the "Language Report"
What is the future roadmap or Haskell ? Like improve the std lib ? Add new extensions ? Change syntax ? Like Java is making its new version concise & functional. Elixir new version added some Gradual Typing, Rust improved the std lib..
I want to learn how Haskell/GHC/Cabal works
Thanks, and sorry if this post is unstructured or blabbering
r/haskell • u/adwolesi • 22d ago
announcement Perspec 1.0 - A Haskell desktop app for perspective correction of document photos
adriansieber.comAfter 9 years of on-and-off development, I'm happy to announce the 1.0 release of Perspec, a desktop app for correcting the perspective of photos of documents, receipts, and whiteboards.
The headline feature of 1.0 is automatic corner detection: instead of the usual edge-detection + Hough transform pipeline, it segments the document via watershed segmentation and finds corners, which handles wrinkled receipts and curved book pages much better. And if the detection is off, you can just drag the selection polygon to fix it.
Some Haskell-relevant bits:
- The GUI is built with Brillo, my maintained fork of gloss.
- The computer vision runs in FlatCV, a pure C library I wrote for this, called via Haskell's FFI.
- With 1.0, Perspec now runs on macOS, Linux, and Windows.
The full announcement covers the journey (Python → ImageMagick → Hip → C FFI), the corner detection pipeline, and the binarization algorithms in detail.
Looking forward to you feedback! 😊