My attempt to recreate the "hcat" pager application described in the "Effective Haskell" book for learning purposes
Simply put, program works a lot like the less linux terminal command for displaying the contents of a text file.
The name was inspired by "Pokedex" because of the similarity of the program's intended purpose. A Pokedex is meant to show the details of a pokemon found in the wild while the HaskeDex is meant to show the details of files on a computer
- The project doesn't include status line displaying file informaiton. It instead shows the file information when you pass
infoas an argument after the filepath.- For example:
cabal run HaskeDex HaskeDex.cabal info
- For example:
- The
groupsOffunction is modified as the original implementation somehow gave me infinite lists when I used it (likely a skill issue on my end). - I avoided the use of the
ByteStringmodule as I couldn't get it to work (likely a skill issue on my end). - I added another validation step for empty strings
""for thehandleArgsfunction - I would occasionally use the
case .. ofstyle of pattern matching while following along with the orignal that uses a different style of pattern matching. - I refactord the code to their
doblock equivalent as much as possible
- Make sure you have Haskell and Cabal installed. I installed and managed Haskell and Cabal verions via
ghcup(available by following the instructions here) - Go to the root of the HaskeDex project folder and run
cabal build - While at the root folder, run the following to display them in the terminal:
cabal run HaskeDex HaskeDex.cabalto display the contents of theHaskeDex.cabalfilecabal run HaskeDex HaskeDex.cabal infoto display the file information of the file