#haskelltil search results
Did you know that you can enforce a type-variable as being "phantom" using constraints by requiring BOTH `Contravariant` AND `Functor` instances? If you can prove those constraints, you can use `phantom` to map either way! #HaskellTIL #HaskellTips
Testing out the idea of fighting Boolean Blindness in pattern-matching with 'as-patterns'; whaddya think? #Haskell #HaskellTIL
#HaskellTIL I always knew #haskell was great with JSON; but TIL about _JSON; it's a prism for converting between any JSON-like thing and it's haskell representation! By composing traversals you can crawl any structure with ease!
Had to subtract an offset from ALL nested Ints inside `[(Int, Int), [(Int, Int)])]` and on another occasion just `[(Int, Int)]`; so what do you do? BIPLATE! Lenses make you feel like a programming wizard. 🧙♂️ #HaskellTips #HaskellTIL #LensFriends
Yo; try using #DerivingStrategies to make your deriving clauses safer and easier to understand! Also they help prevent ambiguous derivations and make it clear whether you want the newtype or stock deriving behaviour! Absolute win! #HaskellTip #HaskellTIL
I've been experimenting with nested do-notation lately, mostly in tests. Helps provide logical test 'units' which help readability, and introduce new lexical scope so I don't have to think up 20 names for 'user'. Whaddya think? #HaskellTips #HaskellTIL
This works const_ :: (forall a. a -> b -> a) const_ = const but remove the parens and it fails #Haskell #HaskellTIL #HaskellWTF ghc.haskell.org/trac/ghc/ticke…
#HaskellTIL, useful trick for bringing type variables into scope >> :set -XScopedTypeVariables -XPartialTypeSignatures >> :set -Wno-partial-type-signatures >> :t \(_::_ a) -> read "hi" :: a .. :: Read a => w a -> a unlike Proxy it can bring about multiple \(_::_ a b c)
upcoming #DerivingVia can derive any (looping) instance of a type via itself, I use this to quickly get functionality data A a .. deriving (Functor, Applicative, Monad) via A #HaskellTIL #Haskell
43 vote · Final results
Testing out the idea of fighting Boolean Blindness in pattern-matching with 'as-patterns'; whaddya think? #Haskell #HaskellTIL
Did you know that you can enforce a type-variable as being "phantom" using constraints by requiring BOTH `Contravariant` AND `Functor` instances? If you can prove those constraints, you can use `phantom` to map either way! #HaskellTIL #HaskellTips
I've been experimenting with nested do-notation lately, mostly in tests. Helps provide logical test 'units' which help readability, and introduce new lexical scope so I don't have to think up 20 names for 'user'. Whaddya think? #HaskellTips #HaskellTIL
#HaskellTIL I always knew #haskell was great with JSON; but TIL about _JSON; it's a prism for converting between any JSON-like thing and it's haskell representation! By composing traversals you can crawl any structure with ease!
Yo; try using #DerivingStrategies to make your deriving clauses safer and easier to understand! Also they help prevent ambiguous derivations and make it clear whether you want the newtype or stock deriving behaviour! Absolute win! #HaskellTip #HaskellTIL
Had to subtract an offset from ALL nested Ints inside `[(Int, Int), [(Int, Int)])]` and on another occasion just `[(Int, Int)]`; so what do you do? BIPLATE! Lenses make you feel like a programming wizard. 🧙♂️ #HaskellTips #HaskellTIL #LensFriends
This works const_ :: (forall a. a -> b -> a) const_ = const but remove the parens and it fails #Haskell #HaskellTIL #HaskellWTF ghc.haskell.org/trac/ghc/ticke…
Something went wrong.
Something went wrong.
United States Trends
- 1. #FanCashDropPromotion 1,402 posts
- 2. Summer Walker 24.6K posts
- 3. Good Friday 56.3K posts
- 4. Wale 38.3K posts
- 5. #FridayVibes 4,809 posts
- 6. #NXXT_Earnings N/A
- 7. #GringosVenezuelaNoSeToca 3,620 posts
- 8. #FinallyOverIt 8,141 posts
- 9. Saylor 42K posts
- 10. Go Girl 26.3K posts
- 11. Happy Friyay 1,493 posts
- 12. Doug McMillon N/A
- 13. Meek 6,520 posts
- 14. Bill Clinton 60.5K posts
- 15. $BTC 125K posts
- 16. Red Friday 3,629 posts
- 17. Bubba 10.9K posts
- 18. Monaleo 2,452 posts
- 19. Robbed You 5,207 posts
- 20. Thomas Crooks 38.4K posts