• Alfredo Di Napoli's avatar
    review: prefer newtypes for Queue and TimeoutS · 6da18f77
    Alfredo Di Napoli authored
    Consider using newtypes for `Queue` and `TimeoutS`, for obvious reasons.
    Also, use `Text` as an internal representation for `Queue`, as `String`
    is just a list in disguise and thus quite slow in its cons-snoc semantic
    (unlike `Text`, which efficiently represent textual data). `Text` also
    supports UTF-16, which might be preferrable in some situations.
    
    The use of DerivingStrategies makes it possible to print and render
    queues in a "smart" way, for example:
    
      putStrLn $ show $ T.unpack $ _Queue (Queue "foo")
      putStrLn $ show (Queue "foo")
    
    They both output "foo", without the intermediate `Queue` constructor one
    would get by normal (stock) derivation.
    6da18f77
Name
Last commit
Last update
bin/simple-worker Loading commit data...
src/Async Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
CHANGELOG.md Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
cabal.project Loading commit data...
haskell-bee.cabal Loading commit data...