I get an error I don't know why b and the constraint (Set b, Set s) are being matched? I would expect the constraint to existentially quantify the ...
I get an error I don't know why b and the constraint (Set b, Set s) are being matched? I would expect the constraint to existentially quantify the ...
I working on type families in Haskell to get deeper inside this topic, and trying to use polymorphic kinds and type families at the same time. For ex ...
Say I have a type of kind l :: * -> * -> *, so I need to apply 2 types for example a, and b to get a simple type l a b. How can I map the type ...
I have two type-families, one of which maps one type to another type of different kind and polymorphic function: This code does not typecheck with ...
I can define a polykinded natural transformation like so: Which works at all kinds, so I can define e.g. This is cool and inspiring. But no matt ...
Given the following code {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAG ...
I'm running up against what looks like invalid code generated by Happy. The problem boils down to GHC not inferring a polykinded type signature for a ...
Browsing the haddocks of various packages I often come along instance documentations that look like this (Control.Category): or this (Control.Monad ...
A comment by user 2426021684 led me to investigate whether it was possible to come up with a type function F such that F c1 c2 fa demonstrates that fo ...
I've written a newtype Const3 that's very similar to Const, but contains the first of three given type arguments: I can define very many useful ins ...
What is the difference between f1 and f2? Related to this question on RankNTypes and scope of forall. Example taken from the GHC user's guide on ki ...
Is polykinded type application injective? When we enable PolyKinds, do we know that f a ~ g b implies f ~ g and a ~ b? Motivation When trying to an ...