Giter VIP home page Giter VIP logo

up-to-date-real-world-haskell's Introduction

Real World Haskell by Bryan O’Sullivan, Don Stewart and John Goerzen is an old book (2008) that approach teaching Haskell by building small programs. Sadly the language and libraries have changed enough to make several of the examples useless so I am making them working again. After I finish I pretend to make the changes listed as enhancements in the issue tracker.

Progress

  1. DONE Introduction
  2. DONE Getting started
  3. DONE Types and functions
  4. DONE Defining Types, Streamlining Functions
  5. DONE Functional programming
  6. DONE Writing a library
  7. DONE Using type classes
  8. DONE I/O
  9. DONE Efficient file processing
  10. DONE A library for searching the file system
  11. DONE Parsing a binary data format
  12. DONE Testing and quality assurance
  13. DONE Barcode recognition
  14. DONE Data structures
  15. DONE Using Parsec
  16. DONE Monads
  17. DONE Programming with monads
  18. TODO Interfacing with C
  19. STARTED Monad transformers
  20. STARTED Error handling
  21. TODO Systems programming
  22. TODO Using databases
  23. TODO Web client programming
  24. TODO GUI programming with gtk2hs
  25. TODO Concurrent and multicore programming
  26. TODO Profiling and optimization
  27. TODO Building a Bloom filter
  28. TODO Sockets and syslog
  29. TODO Software transactional memory
  30. TODO Appendix: Characters, strings and scaping rules
  31. TODO Bibliography

up-to-date-real-world-haskell's People

Contributors

bwignall avatar jakalx avatar mstruebing avatar mushishi78 avatar nikita-fuchs avatar thisisian avatar tssm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

up-to-date-real-world-haskell's Issues

Integer literals are now inferred as `Num`

This is from Chapter 1, "Getting Started":

ghci> 7 ^ 80
40536215597144386832065866109016673800875222251012083746192454448001
it :: Integer

But with latest ghc, we get:

ghci> 7 ^ 80
40536215597144386832065866109016673800875222251012083746192454448001
it :: Num a => a

I couldn't figure out how to rewrite that section and also preserve the lesson about Integer.

Lets track it here for now.

Some Problems in Chapter 14

I follow the codes in chapter 14 and find some little problems.

  1. charClass_wordy defined but not used, I think maybe the charClass function should be modified as following:
charClass (']':cs) = (']':) <$> globToRegex' cs
charClass (c:cs) = (c:) <$> charClass_wordy cs
  1. According to monad fail, from GHC 8.8+, the fail function will not be supported. I suggest change the fail function to error or other implementation.

  2. charClass_wordy also lacks a matching form, which should be added as follows:

charClassWordy "" = 
    error "No more input"

[SOLVED] Chapter 6 is mentioning an error which no longer occurs

In "Chapter 6: Using Type Classes" at "The dreaded monomorphism restriction" it states that the following code results in an error.

myShow = show

But in ghci I get no error

GHCi, version 8.10.2: https://www.haskell.org/ghc/  :? for help
Prelude> myShow = show
Prelude>

Fix the style of every code sample

  • Fix snake_case identifiers
  • Use CamelCase for all filenames
  • Use point-free style whenever possible after it is explained
  • Use 2 spaces for indentation

Content missing in webpage preview

Hi,
I was reading Chapter 6: Using Type Classes. I found several lines missing (for the declaration of UniqueId was unclear):

screenshot

However, as I looked into the source, these lines are still there:


#+BEGIN_NOTE
The type and newtype keywords

Although their names are similar, the ~type~ and ~newtype~
keywords have different purposes. The ~type~ keyword gives us
another way of referring to a type, like a nickname for a friend.
Both we and the compiler know that ~[Char]~ and ~String~ names
refer to the same type.

In contrast, the ~newtype~ keyword exists to /hide/ the nature of
a type. Consider a ~UniqueID~ type.

#+CAPTION: Newtype.hs
#+BEGIN_SRC haskell
newtype UniqueID = UniqueID Int
    deriving (Eq)
#+END_SRC

The compiler treats ~UniqueID~ as a different type from ~Int~. As
a user of a ~UniqueID~, we know only that we have a unique
identifier; we cannot see that it is implemented as an ~Int~.
#+END_NOTE

Perhaps this is a problem, but I am not sure at which level it arises.

Update to GHC > 8.4.x

  • Explain DerivingVia instead of GeneralizedNewtypeDeriving
  • Remove Functor and Applicative instances boilerplate

Add CONTRIBUTING

Sorry, I didn't know how else to contact you. It would be great if there was a way to contribute. I for one, am interested. :-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.