Skip to content

Software Engineering Unit (UNSW) - This repository serves as a comprehensive guide to several fundamental concepts in Haskell. Each project within this repository elucidates a specific topic in Haskell, providing a succinct and practical implementation to aid understanding.

License

Notifications You must be signed in to change notification settings

Frost-Lord/Haskell

Repository files navigation

Haskell Concepts Demonstrations

This repository serves as a comprehensive guide to several fundamental concepts in Haskell. Each project within this repository elucidates a specific topic in Haskell, providing a succinct and practical implementation to aid understanding.

Project Summaries:

1. Logging

The 'Logging' project demonstrates basic IO operations in Haskell. The code simply prints "Hello, Haskell!" to the console.

2. Functions

The 'Functions' project is an introduction to defining and using functions in Haskell. It includes examples of a function to add two numbers together, and a function to concatenate two strings.

3. Typeclasses

The 'Typeclasses' project covers the basics of typeclasses in Haskell. It includes a custom typeclass called 'Showable' and instances of 'Showable' for the Int and Bool types. The project also includes a function that prints the 'showValue' of a 'Showable' type.

4. Pattern Matching

The 'Pattern Matching' project demonstrates the use of pattern matching in function definitions. It provides examples for checking if a number is positive, negative, or zero, calculating the factorial of a non-negative integer, and concatenating two lists.

5. List Manipulation

The 'List Manipulation' project provides examples of how to manipulate lists in Haskell. This includes doubling each element in a list, filtering even numbers from a list, summing all elements in a list, and generating a list of numbers within a given range.

6. Monads and IO

The 'Monads and IO' project is an introduction to monads and IO operations in Haskell. It includes a function that asks for the user's name and greets them, and another function that performs an IO operation.

7. Modules and Packages

The 'Modules and Packages' project shows how to define and import custom modules in Haskell. It includes a module called 'MyModule' that contains a function to greet a user.

8. Error Handling

The 'Error Handling' project demonstrates error handling in Haskell. It includes a function that divides two numbers and handles the case of division by zero, as well as a function that handles the result of the division operation, printing an error message if one occurred, or the result if it was successful.

About

Software Engineering Unit (UNSW) - This repository serves as a comprehensive guide to several fundamental concepts in Haskell. Each project within this repository elucidates a specific topic in Haskell, providing a succinct and practical implementation to aid understanding.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published