-
Time for some more
#DerivingVia abuse This time it's injecting preprocessing steps into generically derived Aeson FromJSON instances pic.twitter.com/2aeJsejol0
-
-
Someday I'll never again have to manually recurse over a data structure. And now that day is a little closer...
#DerivingVia pic.twitter.com/nVlWkhtPN8
-
Found a pretty great way to define API instances together at once with
#derivingvia! Replaces either error-prone hand-written instances or annoying TemplateHaskell. Kudos@Iceland_jack et all for the feature and somebody on function prog Slack (I think @PttPrgrmmr) for the ideapic.twitter.com/OdG31bPERi
Prikaži ovu nit -
newtypes are awesome because they reduce the pain of constantly making new semantically meaningful types rather than reuse a few primitives over and over Writing instances for them can bring the pain back though and GND doesn't always cut it
#DerivingVia is like a super power!Prikaži ovu nit -
I made a combinator ¦ for
#QuickCheck that allows us to define combiantors deriving Arbitrary via VectorOf 3 a ¦ VectorOf 5 a ¦ VectorOf 11 a gives you a list instance that is restricted to those lengths#DerivingVia pic.twitter.com/UCbbKnJ8HO
Prikaži ovu nit -
I'm collecting information for my thesis can you let me know if you have benefited from
#DerivingVia or :instances? (https://ghc.gitlab.haskell.org/ghc/doc/users_guide/ghci.html#ghci-cmd-:instances …) Thanks! -
Hey if you are able/willing, could you link to some good resources on
#DerivingVia? -
help, apparently I can't do this? (GHC 8.6.5) > {-# LANGUAGE DerivingVia #-} > > data Test a = Zero | One a deriving Functor via Maybe
#DerivingViaPrikaži ovu nit -
using
#derivingVia really feels awesome, good bye boilerplate.#haskell -
Finally got to try
#DerivingVia, and it worked beautifully, removing all uninteresting junk from my definitions: newtype Over m a = Over { getOver :: m } deriving (Functor, Applicative) via (Const m) https://github.com/snowleopard/selective/blob/84c10a648a48c07ce0a808da47b5b59947f21e6d/src/Control/Selective.hs#L287-L299 … Thanks@Iceland_jack@kosmikus and Ryan Scott!Prikaži ovu nit -
with
#DerivingVia we can write the derivation of Functor and Applicative from Monad once, and then use it for all data types, to save on boilerplate. https://twitter.com/fried_brice/status/1172413597563019266 … -
For people who don't know what
#DerivingVia is: It's a new extension of the Glasgow Haskell Compiler that can write a lot of boilerplate code for you, in surprisingly many situations. It's described in this Haskell Symposium 2018 paper: https://www.andres-loeh.de/DerivingVia/deriving-via-paper.pdf ….Prikaži ovu nit -
Hey
@Iceland_jack is there a cheat how I can avoid repeating the datatype name in the via clause?#DerivingViaPrikaži ovu nit -
It is a misfeature in my opinion, as we developed
#DerivingVia we#DeriveAnyClass and we all agreed that it should not have existed (or at least, if it existed it should have some way of prioritizing different deriving) -
For some reason I can't deriving Traversable via Either a
#DerivingVia pic.twitter.com/IlhRbP8CaQ
-
Reading the
#DerivingVia#Haskell paper by@Iceland_jack, thinking “hm yes this is all very nice and sensible” – reach §2.1 Composition, “This works because Duration still shares the same runtime representation as NonNegative (Large Int)”
*nice.*
https://www.kosmikus.org/DerivingVia/deriving-via-paper.pdf … -
I guess what I'd like to emphasise is the local nature of this instance derivation compared to
#DerivingVia, so perhaps -XDerivingLocalVia. This reminds me of -XDictionaryApplications proposed in this Haskell Symposium 2018 paper by Winant and Devriese: https://dl.acm.org/citation.cfm?id=3242752 …. -
Another post showing application of
#derivingvia .. https://geekingfrog.com/blog/post/deriving-magic-and-parsing-csv …#haskell
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.