Reddit » Haskell
0 FOLLOWERS
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.
Reddit » Haskell
19m ago
Let's say I have a record type like
data PosInt = PosInt { getInt :: Int }
and I want to maintain some invariance about it. Here, that the wrapped Int is always positive (I know in this example I could also use a newtype but bear with me). So (I guess?) the standard approach would be to not expose the type constructor, so only the current module can construct instances of type PosInt. However, I still want to give read access to the wrapped Int, so I want to expose getInt. I might end up with something like:
module Lib ( PosInt(getInt), setInt) where data PosInt = PosInt { getInt :: Int ..read more
Reddit » Haskell
1d ago
We made a lot of progress on our journey since the last report. All new features bring us closer to Dependent Haskell, naturally, but most of them are useful in their own right.
You can read our update here:
https://serokell.io/blog/ghc-dependent-types-in-haskell-3
As always, we made sure to include code examples for all user-facing changes to showcase the new syntax.
submitted by /u/Serokell
[visit reddit] [comments ..read more
Reddit » Haskell
3d ago
I downloaded Xcode on advice but know not what to do with it.
Installation may take a while.
[ Info ] verifying digest of: ghc-9.4.8-aarch64-apple-darwin.tar.xz
[ Info ] Unpacking: ghc-9.4.8-aarch64-apple-darwin.tar.xz to /Users/marleys/.ghcup/tmp/ghcup-35622ce44eacd505
[ Info ] Installing GHC (this may take a while)
[ ghc-configure ] not found (too old?)
[ ghc-configure ] checking for gcc... gcc
[ ghc-configure ] checking whether the C compiler works... no
[ ghc-configure ] configure: error: in `/Users/marleys/.ghcup/tmp/ghcup-35622ce44eacd505/ghc-9.4.8-aarch64-apple-darwin':
[ ghc-configure ..read more
Reddit » Haskell
5d ago
I've been reading Production Haskell (Matt Parson). I want to use Haskell in my current position in an engineering consultancy.. I write simulations of traffic flows.
I would like to ask, please, what sort of engineering projects are a good match for Haskell?
submitted by /u/Francis_King
[visit reddit] [comments ..read more
Reddit » Haskell
5d ago
https://fpilluminated.com/deck/212
submitted by /u/philip_schwarz
[visit reddit] [comments ..read more
Reddit » Haskell
5d ago
Functional programming has come up with very interesting ways of managing 'effects'. But curiously I haven't found an explicit definition of what is meant by this word. Most of the time it seems interchangeable with 'monad'. I also have the impression is that the word 'effect' is used when talking about managing a program's control flow.
Is it the case that effects are about control flow? Are all effects representable with monads, and do all monads potentially model effects?
submitted by /u/appendThyme
[visit reddit] [comments ..read more