#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

chrislpenner's tweet image. 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

chrislpenner's tweet image. 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!

chrislpenner's tweet image. #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

chrislpenner's tweet image. 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

chrislpenner's tweet image. 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

chrislpenner's tweet image. 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…

Iceland_jack's tweet image. 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

Feature %58.1
Bug %41.9

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

chrislpenner's tweet image. 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

chrislpenner's tweet image. 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

chrislpenner's tweet image. 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

chrislpenner's tweet image. 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!

chrislpenner's tweet image. #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

chrislpenner's tweet image. 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

Feature %58.1
Bug %41.9

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…

Iceland_jack's tweet image. 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


No results for "#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

chrislpenner's tweet image. 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

chrislpenner's tweet image. 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!

chrislpenner's tweet image. #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

chrislpenner's tweet image. 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

chrislpenner's tweet image. 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

chrislpenner's tweet image. 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…

Iceland_jack's tweet image. 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…

Loading...

Something went wrong.


Something went wrong.


United States Trends