At my university i currently have a Lecture about Haskell. Now i got a Job to make a Program. We got this Sample File: https://pastebin.com/6wPdEgHZ
Starting from that, we have to develop the Program around it. The Functions simulate a Database-Access.
Since i dont like programming in WinHugs, i set up Visual Studio Code with GHC. I added a main-Function to print out Function-Outputs. It looks like this:
module Main where
main :: IO ()
main = print artikel
i added that to the top. Thats it. At first i wanted to output the Articles. That are the runghc-Outputs:
[Running] runghc "c:\Users\5CG949285X\Documents\DHBW\5_Semester\Funktionale Programmierung\restaurant.hs"
[(1,"Hamburger","Hauptgericht",8.0,6.0),(2,"Cheeseburger","Hauptgericht",9.0,6.5),(3,"Chickenburger","Hauptgericht",8.5,6.5),(4,"Pommes frites","Beilage",3.0,2.0),(5,"Wedges","Beilage",3.5,2.0),(6,"Cola","Getraenk",2.5,1.0),(7,"Eistee","Getraenk",2.0,1.0),(8,"Wasser","Getraenk",1.5,0.5)]
[Done] exited with code=0 in 24.527 seconds
[Running] runghc "c:\Users\5CG949285X\Documents\DHBW\5_Semester\Funktionale Programmierung\restaurant.hs"
[(1,"Hamburger","Hauptgericht",8.0,6.0),(2,"Cheeseburger","Hauptgericht",9.0,6.5),(3,"Chickenburger","Hauptgericht",8.5,6.5),(4,"Pommes frites","Beilage",3.0,2.0),(5,"Wedges","Beilage",3.5,2.0),(6,"Cola","Getraenk",2.5,1.0),(7,"Eistee","Getraenk",2.0,1.0),(8,"Wasser","Getraenk",1.5,0.5)]
[Done] exited with code=0 in 30.182 seconds
As u see, it takes very long. Is it just cause the file has VERY much code in it? Or did i do something wrong setting it up?