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)
Problem when deriving Eq from data type with function as field in Haskell
I'm trying to deriving Eq from data type with a function as a field but doesn't work as expected.
I also try to write te instance but still doesn't work
data Conf = Conf {
rule :: ([Char] -> Ch...
Javier Sánchez Castro
Votes: 0
Answers: 2
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
Alternative of Show that only uses name
Is there something like Show (deriving Show) that only uses an algebraic datatype's constructors? (please don't mind that I'm using the word constructor, I don't know the right name...)
The reason for...
John Smith
Votes: 0
Answers: 3