Fourth assignment now available

Benutzeravatar
sewe
Sonntagsinformatiker
Sonntagsinformatiker
Beiträge: 295
Registriert: 16. Jan 2009 14:53
Kontaktdaten:

Fourth assignment now available

Beitrag von sewe »

The fourth assignment (4 tasks overall, 100 points) is now available from the SVN; please update your working copy.

Benutzeravatar
marlic
Computerversteher
Computerversteher
Beiträge: 365
Registriert: 5. Okt 2006 11:09
Wohnort: Dietesheim

Re: Fourth assignment now available

Beitrag von marlic »

First of all i think its worth mentioning, that the tests are called by typing for example Assignment.test1 in ghci, and not just test1 - it took me a while to figure that out :(

Then there is one thing I'm not sure about in the assignment. In Task 2, You ask us to copy the "original interpreter". I guess you mean the one without the polymorphism, don't you?

But I actually changed the Datastructure?!
"Copy & Passed"

Wahlspruch der Plagiatoren

Benutzeravatar
sewe
Sonntagsinformatiker
Sonntagsinformatiker
Beiträge: 295
Registriert: 16. Jan 2009 14:53
Kontaktdaten:

Re: Fourth assignment now available

Beitrag von sewe »

Whether you need to prefix test1 with the module name depends on how you started ghci. If the prompt reads Main you are currently in the default module and thus have to prefix a call to test1. If it reads Assignment you are already inside the module and thus don't need to prefix calls. (This is very similar to packages and fully-qualified class names in Java.)

Regarding task 2: as test2 directly references the constructor functions of the algebraic type FAE (AppE, etc.) and you need to modify the data declaration in task 1, you will have to deal with the modified FAE and FAEValue in task 2. (It doesn't make much of a difference; only the return type of interp2 is not Maybe FAEValue but something else.) I hope this helps.

Daniel S.
Mausschubser
Mausschubser
Beiträge: 87
Registriert: 25. Sep 2007 12:28
Wohnort: Mörfelden

Re: Fourth assignment now available

Beitrag von Daniel S. »

marlic hat geschrieben:First of all i think its worth mentioning, that the tests are called by typing for example Assignment.test1 in ghci, and not just test1 - it took me a while to figure that out :(
You can simply write test1, if you start ghci by double-clicking assignment.hs.

And why didn't you also mention, that the test-functions are commented by default, that took me a while to figure out :roll:
Mit freundlichen Grüßen
Daniel

Benutzeravatar
Aaron
Windoof-User
Windoof-User
Beiträge: 25
Registriert: 24. Mai 2004 20:09
Wohnort: Darmscht
Kontaktdaten:

Re: Fourth assignment now available

Beitrag von Aaron »

Daniel S. hat geschrieben:And why didn't you also mention, that the test-functions are commented by default, that took me a while to figure out :roll:
Gotta grab some syntax highlighting, mate! ;)
If there's one thing I've learned in all my days ... it's that if knowledge is power, then the internet is full of completely useless power. Think about it. —Brett Erlich

Daniel S.
Mausschubser
Mausschubser
Beiträge: 87
Registriert: 25. Sep 2007 12:28
Wohnort: Mörfelden

Re: Fourth assignment now available

Beitrag von Daniel S. »

Aaron hat geschrieben:Gotta grab some syntax highlighting, mate! ;)
Embarrassingly I am using Notepad++, which has syntax highlighting for Haskell and I was wondering, why the test-cases were green, like the other comments... at least, I figured it out myself.
Mit freundlichen Grüßen
Daniel

Gesperrt

Zurück zu „Archiv“