Examples of simple Haskell projects with no lib dependency. You can launch these projects directly from ghci (so you won’t need to set up cabal and build files).
Basic apps
Code for these apps is a slight modification of:
https://www.haskellforall.com/2015/10/basic-haskell-examples.html
ToDo App
This is todo-list that will look smth like this (in terminal):
Current TODO list:
0: NewEntry
1: Something
>> Enter command:
Example usage:
- Add new entry with command like
+ DoSmth
. - To remove entry #0, type
- 0
. - To exit type
q
|
|
Calendar
This app prints pretty-formated calendar for 2015. For example, November looks like:
November 2015
--------------------
Su Mo Tu We Th Fr Sa
_1 _2 _3 _4 _5 _6 _7
_8 _9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
|
|
Genes decoder
This app will translate input like GCUAGG
to AlaArg
.
Warning! App does not bother itself to properly check user input, so providing bad RNA will result in error.
|
|
Story generator
This app pre-generates 972 variants of story and then asks user to select one of them:
ghci> Enter a number from 0 to 971
user:30
ghci>
There once was a princess who lived in a shoe.
They found a giant while while strolling along and immediately regretted it.
Then a magical pony named Pinkie Pie found them and saved the day.
The end.
|
|
More
Later, homies