Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Derive type class for parameterized data type
{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} --{-# LANGUAGE UndecidableInstances #-} data PersonF f = PersonF { name :: f String , age :: f Int , likes :: [String] } --deriving (Show, Eq) -- How can I derive this? deriving instance Eq (f a) => Eq (PersonF f) main = print $ "Hello, world!"
run
|
edit
|
history
|
help
0
Haskell Prime Factorizer
Traversable
(Int,Int) -> Bool plot
Modeling algebraic understanding with Haskell in KS1
divisibleBy a b
Pi
tried some polynoms 2: now with some `*` and foldr(-p)
mySqrt
Forkitup
project euler 6, haskell