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 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
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