"Could not find module" in Automatic Fire-Checks

33 views
Skip to first unread message

michae...@gmail.com

unread,
Nov 27, 2018, 12:14:49 PM11/27/18
to 2018 Functional Programming TDA452 / DIT 143
Hi,
for the current lab assignment we used the module "Data.List.Split" for easier list comprehension.

Now the automatic Fire-Checks fail because it could not find the module. Aren't we allowed to use that specific module?
The assignment states that we should use Data.List but this module does not contain the desired function "chunksOf".

Thanks,
Michael

Thomas Hallgren

unread,
Nov 27, 2018, 1:23:53 PM11/27/18
to michae...@gmail.com, 2018 Functional Programming TDA452 / DIT 143
Hi,

The Data.List.Split module comes from the split package, which is included in the Haskell Platform, so I think it should be OK to use it in the assignments. Apparently the split package isn't installed on the servers that run the automatic checks, but hopefully this is something we could fix.

As a workaround in the mean time, you could include your own implementation of chunksOf in your submission. It's a simple recursive definition using take & drop (or splitAt), simpler than the function segments that we saw in the lecture on Higher Order Functions.

Anyway, thanks for alerting us to problems with the automatic checks, they are new this year. We grade your submissions even if the automatic checks fail for some reason.

Best regards,
Thomas Hallgren

--
You received this message because you are subscribed to the Google Groups "2018 Functional Programming TDA452 / DIT 143" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chalmers-fp-20...@googlegroups.com.
To post to this group, send email to chalmers...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chalmers-fp-2018/d33710e1-b3e9-4652-ab0e-2359c05128eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

michae...@gmail.com

unread,
Nov 27, 2018, 5:40:45 PM11/27/18
to 2018 Functional Programming TDA452 / DIT 143
Thank you very much for the detailed answer.

I encountered another problem with the automatic checks where the checks for the function blocks fails.

I looked at the output and noticed that the comparison fails because the elements are not in the same order. But in my opinion
that should not matter and in the assignment it is not stated in which order for example a 3x3 block should be put together.

With the following example I came to the solution which would be appropriate for this check:

a = [["c", "a", "b"],["z", "y", "x"]]
b = [["x", "y", "z"],["a", "b", "c"]]

   a =/= b
  sort a =/= sort b
  map sort a =/= map sort b
sort (map sort a) == sort (map sort b)

The last statement above returns true.

Best regards,
Michael

Jannis Limperg

unread,
Nov 27, 2018, 6:19:23 PM11/27/18
to chalmers...@googlegroups.com
Hej,

I have now added the split package, as well as various other packages
from the Haskell platform, to the test environment. However, the tester
has to be rebuilt before these changes go into effect. This may take a
while because I can't trigger the rebuild myself; I have to bother one
of the Fire people.

Cheers,
Jannis

Jannis Limperg

unread,
Nov 27, 2018, 6:22:10 PM11/27/18
to chalmers...@googlegroups.com
Hej Michael,

thanks again for your reports. Given how we use `blocks`, there is
indeed no reason to require that the blocks remain in order, so I've
modified the tests according to your suggestion. This change should
already be online.

Cheers,
Jannis

michae...@gmail.com

unread,
Nov 28, 2018, 4:11:41 AM11/28/18
to 2018 Functional Programming TDA452 / DIT 143
Hi Jannis,

thank you very much the test works now as desired.

Best regards,
Michael
Reply all
Reply to author
Forward
0 new messages