14. HC14 ‐ Haskell Chapter 14 Practical Tasks: Cabal_and_language_extensions - wimsio/universities GitHub Wiki

  1. -- HC14T1: Create a Haskell project using cabal init. Add a main executable that outputs "Hello, Cabal!".

  2. -- HC14T2: Modify the .cabal file to include a dependency on the random package and print a random number between 1 and 100.

  3. -- HC14T3: Enable the NumericUnderscores extension. Create variables with large numbers and print them.

  4. -- HC14T4: Enable the TypeApplications extension and create a function that reads a String and converts it to an Int using read.

  5. -- HC14T5: Write a Haskell program that uses a custom data type Result a and demonstrate pattern matching using the @ symbol.

  6. -- HC14T6: Create a cabal project structure with src and app directories. Place the main module in the app folder and additional modules in src.

  7. -- HC14T7: Modify the .cabal file to support a library component alongside the main executable.

  8. -- HC14T8: Implement a function counts that returns a list of tuples showing character frequency in a string.

  9. -- HC14T9: Use language extension PartialTypeSignatures to allow wildcard types in a function signature.

  10. -- HC14T10: Write a cabal test suite for a module that verifies correct behavior of the counts function.

  11. Finished. Congratulations! Get your progress token here