This repository contains my solution to Assignment 2, which focuses on functional programming techniques in Haskell, including recursion, algebraic data types, and tree-based representations.
The assignment explores multiple representations and transformations of Morse code, as well as recursive parsing of structured input. The completed tasks include:
- Encoding text into Morse code using lookup tables
- Decoding Morse code back into text
- Tree-based decoding using a binary Morse tree
- Converting between table and tree representations
- Implementing a recursive parser for well-bracketed strings
All implementations follow the provided assignment template and required type signatures.
-
Assignment2.hs
Main solution file containing all completed exercises. -
Types.hs
Preset data types and helper definitions provided for the assignment. -
DETAILS.md
The original assignment specification describing the exercises that were completed. -
presubmit.sh
Script used to verify compilation and submission readiness. -
morse_tree.jpg
Diagram illustrating the binary Morse code tree structure. -
.gitignore
Git ignore rules for Haskell build artifacts.
This repository is intended for educational purposes and reflects coursework completed as part of a university functional programming module.