Pinned Tweet
Start with `stack`
docs.haskellstack.org/en/sta…
Haskell Tips retweeted
So apparently a lot of peeps still don't know you can avoid pressing 'up' a billion times going through :reload's in GHCi by adding this to your `~/.haskeline` file:
historyDuplicates: IgnoreAll
Have fun.
Haskell Tips retweeted
Open this page: hackage.haskell.org/package/…
... and then type 's' to open a quick search for any exported symbols in lens
Usually one starts with the first error and works forward. With the default setting one has to scroll up over and over again.
1
5
Use `ghci -freverse-errors` or `stack repl --ghc-options=-freverse-errors` to reverse the error order; see the first error with no scrolling
() does not add a “null” value to every type, hell no; () is a “dull” value in a type of its own: () - @pigworker
personal.cis.strath.ac.uk/co…
Avoid lengthy computation in a exception handler with `catch`. The exception handler has async exceptions masked: hackage.haskell.org/package/…
Careful with your foralls
data A = forall a. A {x :: a} -- existential quantification
data A = A {x :: forall a. a} -- polymorphic component
Use the '+RTS -qg' flag to speed up your programs.
/ht @stdlib
inner-haven.net/posts/2017-0…
IORef can't unbox primitives, but URef, Ptr and others can and are thus faster: medium.com/@jonathangfischof…
class ToB a where
to∷a → B
class FromB a where
from∷Parser a
-- vs
class Bable a where
to∷a → B
from∷Parser a
medium.com/@jonathangfischof…
4
(Pattern Matching : Data Constructors :: Type Class Instance Selection : Type Constructors) / ordering
medium.com/@jonathangfischof…
If you are using `putStr` you probably want to
> import System.IO
> hSetBuffering stdout NoBuffering
Data.List.\\ doesn't remove duplicates:
> import Data.List
> [1, 1, 2] \\ [1, 2]
[1]
For set difference use Data.Set.\\
If you want to run a function from the command line:
> echo 'foo "hello"' | ghci src/File.hs
If you want to run `main`:
> runhaskell Main.hs
To list all @Hackage packages
> cabal list
With just the word "lens"
> cabal list lens
For a summary of the package 'lens'
> cabal info lens
Replying to @deech





