Need to fill in the methods next and hasNext and preserve laziness But cannot figure out how an earth to do this from a fs2.Stream? All the methods ...
Need to fill in the methods next and hasNext and preserve laziness But cannot figure out how an earth to do this from a fs2.Stream? All the methods ...
I'd like to create a struct that is type-indexed (or, I guess as the Rust programmers would say, has a generic parameter of some array type). Somethin ...
This answer contains the following code: The requirement that T satisfy is_arithmetic can easily be defeated, though, by specifying an arbitrary se ...
I have a type like this: type MyType = { [key:string]:number } const someValue = MyType.whatever // the type here should be number|undefined, but ...
Ok this topic had been discussed a lot of times, but since Haskell evolves lets consider it again to see what we can do in contemporary Haskell (by co ...
I want to build a Hilbert matrix using the linear package and convert it to a list of lists. While this seems an easy task the type level constraints ...
Given two Symbols a and b, what is the simplest way to create another symbol that is equivalent to b but its prefix a stripped and the rest made lower ...
I'm trying to do some type level programming using traits, and bumped into an edge case where the compiler infinitely expands a type while trying to p ...
I'm using HList package and I need two functions like (!!) and elem. The first function receives an HList and an integer n and returns the n-th elemen ...
I want to convert a structure type into another. The source structure is an object which possibly contains properties keys splitted by a dot. I want t ...
I found a definition for a type level Split function: type Split<S extends string, D extends string> = string extends S ? string[] : S ...
So I have a data constructor that I only use at the type level which contains a Nat. Normally if I pass this around at the type level and I want to re ...
Wanted to implement type safe matrix multiplication in Haskell. Defined the following: Eventually had the need to implement but the best I could ...
For reasons not relevant to the question (but which include fun and profit in type-level programming), one of my types eventually boils down to the fo ...
I was working recently with freer and I got inspired to try creating a method that allows composing of arbitrary arity functions using type level comp ...
Suppose we have this simple API: type FooAPI = "foo" :> QueryParam "age" Int :> Get '[PlainText] Text Is there a way to link type-le ...
I'm trying to generate term-level values out of type-level ones. I have the following code class Term a where type family Result a :: Type term : ...
I have a type Foo[+A, +B] and a type Bar[+B]. I want to add extension method bar to Foo like this So the extension method is only applicable when B ...
. Answers to this question are eligible for a +50 reputation bounty. Sh ...
I'm trying to figure out heterogenous collections, and there's some kind of a type-checking problem I can't wrap my head around. (It's basically su ...