Let’s say I have the following type: import Test.QuickCheck import GHC.TypeLits import Data.Kind data Vect :: Nat -> Type -> Type where VNil :: Vect 0 a VCons :: a -> Vect n a -> Vect (n + 1) a I want to be able to write some QuickChecks about my values, so I want to write an Arbitrary instance. sizedVect :: Int -> Gen a -> Gen (Vect n a) sizedVect 0 _ = pure VNil sizedVect n g = VCons <$> g <*> sizedVect (n - 1) g instance Arbitrary (Vect n a) where arbitrary :: Gen (Vect n a) arbi...| Haskell Community
A place for all discussions related to Haskell| Haskell Community
A place for all discussions related to Haskell| Haskell Community
People can voice their concerns against Microsoft too, I remember there used to be similar comments under any job post of Facebook eg. [job] Work on GHC at Facebook London : haskell| Haskell Community
A place for all discussions related to Haskell| Haskell Community
Here are some reddit threads that include many people with significant criticisms of anduril, not only a company which produces military hardware, but one whose founder and leads are quite outspoken in their promotion of militarism in their values and politics: https://www.reddit.com/r/haskell/comments/14zogj0/anduril_hiring_haskell_developers/ https://www.reddit.com/r/haskell/comments/11vx9x4/anduril_hiring_software_engineer_haskell/ https://www.reddit.com/r/haskell/comments/dzb28x/anduril...| Haskell Community
A post was merged into an existing topic: Argument over Anduril Industries| Haskell Community
A post was split to a new topic: Argument over Anduril Industries| Haskell Community
I’ve been in contact with Travis in the recent past. I applied and we’ve had a chat, unfortunately it turned out they couldn’t hire me remotely, which is perfectly fine. The chat was really nice and friendly none the less. During the conversation I told Travis I knew a couple engineers who might be looking for work that they seem to be looking for, and Travis said to put them in touch. After reaching out to the engineers I emailed Travis about this and to set up a call between him and o...| Haskell Community
Personally I don’t care Anduril make weapons, but I also don’t mind people reminding others of that. In particular I’m perfectly fine with what @sclv is posting even if I think in the current world, with crony dictators running >50% of the planet, the manufacture of weapons is a sad necessity and a result of a set of unnecessary circumstances. I do care about the flakiness in communication which I mentioned in the original thread. I think the fact Travis showed up, read that comment, an...| Haskell Community
I’m writing an application in Haskell that compiles both to native and to WASM, using the GHC backend. I would like to be able to embed a directory of text files in the binary; is there a way to do that? I thought of using Template Haskell + something like file-embed but as far as I can tell TH doesn’t work on WASM. Is there any other way I can do that, or can I get TH to work? (using TH would actually solve some other issues too, but i’ve worked around the ones i’ve encountered so fa...| Haskell Community
Migrated from One Billion Row challenge in Hs - #184 by rhendric, since it is diverging from the topic. Oh I say, that’s a bit strong. deepseq is a tool with uses, and while I agree that in that specific problem, the strict vector was ultimately the right solution I agree that deepseq is a tool with uses. Nonetheless, my claim is indeed very strong! There are few cases when I’ll make a claim that strong. There are so many complexities in the world of programming that I am open minded to t...| Haskell Community
I’ve used sandboxes for a long time and so do other languages. But let’s see what’s wrong with v2 first: cabal install --lib is a re-introduction of cabal hell it does not support ad-hoc development easily, unless you learn about store-dir learn about ghc environment files learn why cabal and ghc don’t “see” the same package lists learn about nix-store/CAS learn all the hidden v2 switches and understand how to combine them It is so bad UX that, well, compiler/language developers h...| Haskell Community
To explain these concepts in more detail, you want a Sigma type (n :: Nat, Vect (n :: Nat) a) But we don’t have those in Haskell. Instead you can have a second class existential type by writing it as a GADT: data SomeVect a where SomeVect :: (n :: Nat) -> Vect (n :: Nat) a -> SomeNat a -- ^ This is not yet valid Haskell! But we don’t have dependent types either! Instead there is a singleton type SNat :: Nat -> Type that does a similar job. It’s called a “singleton” because there is ...| Haskell Community
Following up from GHC and Cabal: the big picture, I hypothesise that part of the problem described is due to poorly-specified APIs[1], particularly the command line API to GHC that enables “packages” (perhaps more precisely, “units” – the ambiguity is symptomatic of the poorly-specified API). This got me thinking further. Here’s an idea: A nice way of specifying command line APIs would be to take a subset of all possible command lines for a program, and call it the “core” comm...| Haskell Community
Broadly speaking, we can say cabal-install and stack are frontends to Cabal . Both tools make it possible to build Haskell projects whose sets of dependencies might conflict with each other within the confines of a single system. I appreciate that answer is 2017, and things might have changed since. But there’s plenty of confusing-them q’s on SO and reddit; preferences seem to have changed over the years; one tool has caught up/got ahead of another; then the position reversed. (Or perhaps...| Haskell Community