#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!
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
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…
#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
Yesterday I learned about Data.Bool.bool - allows for point-free conditionals, esp. useful w. monads. hackage.haskell.org/package/base-4… #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
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
#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!
Testing out the idea of fighting Boolean Blindness in pattern-matching with 'as-patterns'; whaddya think? #Haskell #HaskellTIL
#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
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…
Yesterday I learned about Data.Bool.bool - allows for point-free conditionals, esp. useful w. monads. hackage.haskell.org/package/base-4… #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!
Testing out the idea of fighting Boolean Blindness in pattern-matching with 'as-patterns'; whaddya think? #Haskell #HaskellTIL
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. Veterans Day 67.4K posts
- 2. Good Tuesday 28.9K posts
- 3. SoftBank 7,757 posts
- 4. United States Armed Forces N/A
- 5. #Talus_Labs N/A
- 6. #tuesdayvibe 1,661 posts
- 7. Armistice Day 11K posts
- 8. Vets 13.5K posts
- 9. World War 40.7K posts
- 10. Bond 62.7K posts
- 11. #Army 1,611 posts
- 12. #AirForce N/A
- 13. $NBIS 6,419 posts
- 14. 600,000 Chinese 10.2K posts
- 15. #RemembranceDay 10.9K posts
- 16. 600k Chinese 5,761 posts
- 17. Islamabad 39.8K posts
- 18. UC Berkeley 75.4K posts
- 19. Window 55.4K posts
- 20. God is Great 13.9K posts