Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.
Does anybody know if it is possible to transform the type of a datatype with syb? If I have a datatype like
data Foo a = Foo { field1 :: Bool, field2 :: a }
Can I write an syb transform like this?
transform :: Foo Pandoc -> IO (Foo Text) transform = everywhere $ _ renderPandoc
I am stupid, just derive Functor, Foldable and Traversable and the function becomes traverse renderPandoc
Functor
Foldable
Traversable
traverse renderPandoc
God how I love this language
image.png This is very much an improvement
Does anybody know if it is possible to transform the type of a datatype with syb?
If I have a datatype like
Can I write an syb transform like this?
I am stupid, just derive
Functor
,Foldable
andTraversable
and the function becomestraverse renderPandoc
God how I love this language
image.png
This is very much an improvement