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)
Unable to coerce during `DerivingVia` when using optics types like `Prism'`
I'm unable to automatically derive instances using DerivingVia on any type that uses types from optics-core like Prism'; the error I get from compiler is:
src/Main.hs:24:13-19: error:
• Couldn't m...
Sridhar Ratnakumar
Votes: 0
Answers: 1
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
Can I use DerivingVia to derive instances for data types isomorphic to tuples
Given the following data type
data Both a b = Both { left :: a, right :: b }
I can write instances for Applicative etc. like so (omitting Functor here as we can use DeriveFunctor):
instance Monoid a ...
l7r7
Votes: 0
Answers: 2
True isomorphisms in Haskell
Are the following assertions true:
The only real isomorphism, accessible programatically to the user, verified by Haskell type system, and that the Haskell compiler is/can be made aware of, is betwee...
nicolas
Votes: 0
Answers: 1