python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
What does the `forall a -> b` syntax mean?
In GHCi, the kind of FUN is displayed like this:
λ> :k FUN
FUN :: forall (n :: Multiplicity) -> * -> * -> *
At first, I thought this was a roundabout way of saying
FUN :: Multiplicity -&g...
fluffyyboii
Votes: 0
Answers: 1
Converting between variants of a data type
Suppose I want to create two variations of a data type, one that has a certain constructor and one that does not have it, otherwise they are identical. I came up with this:
{-# LANGUAGE KindSignatures...
n. m. will see y'all on Reddit
Votes: 0
Answers: 0
Reify arbitrary data-kind to a (compile-time known) value
I want to be able to write something like:
reify (Proxy @True)) == True;
reify (Proxy @(Just 5)) == Just 5;
Is it possible by a blanket implementation? I got as far as
class Reify (a :: k) where
re...
MorJ
Votes: 0
Answers: 1