CIS 194 not compiling under new GHC

Hi all, I've been working through the CIS 194 https://www.cis.upenn.edu/~cis1940/spring13/lectures.html course recently and unfortunately from lecture 7 onwards the code is not compliant with current compiler. I can still follow the lectures but I'd like to do every homework exercise. Unfortunately most homework exercises provide you with a code framework to work with and this code does not compile. Do any of you know about updated versions or corrections to this course? I believe there could be a repo where someone is keeping the course's homework up to date because this course is still quite popular. Regards Borys

The changes needed to make it work should be minor. Since you call out the
chapter on monoids, any Monoid instance now needs a Semigroup instance.
Before:
instance Monoid X where
mappend a b = ...
mempty = ...
Now:
instance Semigroup X where
a <> b = ...
instance Monoid X where
-- mappend no longer needs to be defined
mempty = ...
On Sun, Nov 6, 2022, 12:37 PM Borys Kopeć
Hi all,
I've been working through the CIS 194 https://www.cis.upenn.edu/~cis1940/spring13/lectures.html course recently and unfortunately from lecture 7 onwards the code is not compliant with current compiler.
I can still follow the lectures but I'd like to do every homework exercise. Unfortunately most homework exercises provide you with a code framework to work with and this code does not compile.
Do any of you know about updated versions or corrections to this course? I believe there could be a repo where someone is keeping the course's homework up to date because this course is still quite popular.
Regards Borys _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

This being a beginners course, it would still be better if it were
kept up to date with such changes instead of requiring newcomers to
know about them. Byorgey?
On Sun, Nov 6, 2022 at 12:42 PM David Feuer
The changes needed to make it work should be minor. Since you call out the chapter on monoids, any Monoid instance now needs a Semigroup instance.
Before:
instance Monoid X where mappend a b = ... mempty = ...
Now:
instance Semigroup X where a <> b = ... instance Monoid X where -- mappend no longer needs to be defined mempty = ...
On Sun, Nov 6, 2022, 12:37 PM Borys Kopeć
wrote: Hi all,
I've been working through the CIS 194 course recently and unfortunately from lecture 7 onwards the code is not compliant with current compiler.
I can still follow the lectures but I'd like to do every homework exercise. Unfortunately most homework exercises provide you with a code framework to work with and this code does not compile.
Do any of you know about updated versions or corrections to this course? I believe there could be a repo where someone is keeping the course's homework up to date because this course is still quite popular.
Regards Borys _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- brandon s allbery kf8nh allbery.b@gmail.com

Yes, I agree.
Unfortunately in the framework provided in this chapter there are more
problems than the one you mentioned David.
I know I could google each one, make the compiler happy and then get on
with exercises but I think that this is not an optimal learning experience.
Also I don't know whether all exercises are even sensical with new features
being added.
On Sun, 6 Nov 2022 at 18:44, Brandon Allbery
This being a beginners course, it would still be better if it were kept up to date with such changes instead of requiring newcomers to know about them. Byorgey?
On Sun, Nov 6, 2022 at 12:42 PM David Feuer
wrote: The changes needed to make it work should be minor. Since you call out
the chapter on monoids, any Monoid instance now needs a Semigroup instance.
Before:
instance Monoid X where mappend a b = ... mempty = ...
Now:
instance Semigroup X where a <> b = ... instance Monoid X where -- mappend no longer needs to be defined mempty = ...
On Sun, Nov 6, 2022, 12:37 PM Borys Kopeć
Hi all,
I've been working through the CIS 194 course recently and unfortunately
from lecture 7 onwards the code is not compliant with current compiler.
I can still follow the lectures but I'd like to do every homework
exercise. Unfortunately most homework exercises provide you with a code
wrote: framework to work with and this code does not compile.
Do any of you know about updated versions or corrections to this
course? I believe there could be a repo where someone is keeping the course's homework up to date because this course is still quite popular.
Regards Borys _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- brandon s allbery kf8nh allbery.b@gmail.com

On Nov 6, 2022, at 9:47 AM, Borys Kopeć
wrote: I know I could google each one, make the compiler happy and then get on with exercises but I think that this is not an optimal learning experience.
Not ideal, but it would be worth giving it a try and seeing if you can push through, because deciphering compiler errors are something you will have to deal with when writing your solutions, so it's educational in its own way. It might turn out to be just a few things that need fixing up.
Also I don't know whether all exercises are even sensical with new features being added.
I would think they probably are still relevant; the language concepts haven't changed. (I did some quick Googling to see if anyone had put an updated version on GitHub, but I didn't turn anything up. There are a bunch of repos with exercise solutions, so some of them might contain updates to the provided sources but I didn't dig into it.) Jeff
On Sun, 6 Nov 2022 at 18:44, Brandon Allbery
wrote: This being a beginners course, it would still be better if it were kept up to date with such changes instead of requiring newcomers to know about them. Byorgey? On Sun, Nov 6, 2022 at 12:42 PM David Feuer
wrote: The changes needed to make it work should be minor. Since you call out the chapter on monoids, any Monoid instance now needs a Semigroup instance.
Before:
instance Monoid X where mappend a b = ... mempty = ...
Now:
instance Semigroup X where a <> b = ... instance Monoid X where -- mappend no longer needs to be defined mempty = ...
On Sun, Nov 6, 2022, 12:37 PM Borys Kopeć
wrote: Hi all,
I've been working through the CIS 194 course recently and unfortunately from lecture 7 onwards the code is not compliant with current compiler.
I can still follow the lectures but I'd like to do every homework exercise. Unfortunately most homework exercises provide you with a code framework to work with and this code does not compile.
Do any of you know about updated versions or corrections to this course? I believe there could be a repo where someone is keeping the course's homework up to date because this course is still quite popular.
Regards Borys
-- brandon s allbery kf8nh allbery.b@gmail.com

https://github.com/byorgey/haskell-course is the canonical github repo with the materials (though unfortunately I think most people get the material from the upenn-hosted site, which I no longer have access to). I'm very happy to take PRs with updates. -Brent On Sun, Nov 6, 2022 at 12:48 PM Jeff Clites via Haskell-Cafe < haskell-cafe@haskell.org> wrote:
On Nov 6, 2022, at 9:47 AM, Borys Kopeć
wrote: I know I could google each one, make the compiler happy and then get on with exercises but I think that this is not an optimal learning experience.
Not ideal, but it would be worth giving it a try and seeing if you can push through, because deciphering compiler errors are something you will have to deal with when writing your solutions, so it's educational in its own way. It might turn out to be just a few things that need fixing up.
Also I don't know whether all exercises are even sensical with new features being added.
I would think they probably are still relevant; the language concepts haven't changed.
(I did some quick Googling to see if anyone had put an updated version on GitHub, but I didn't turn anything up. There are a bunch of repos with exercise solutions, so some of them might contain updates to the provided sources but I didn't dig into it.)
Jeff
On Sun, 6 Nov 2022 at 18:44, Brandon Allbery
wrote: This being a beginners course, it would still be better if it were kept up to date with such changes instead of requiring newcomers to know about them. Byorgey? On Sun, Nov 6, 2022 at 12:42 PM David Feuer
wrote: The changes needed to make it work should be minor. Since you call out
the chapter on monoids, any Monoid instance now needs a Semigroup instance.
Before:
instance Monoid X where mappend a b = ... mempty = ...
Now:
instance Semigroup X where a <> b = ... instance Monoid X where -- mappend no longer needs to be defined mempty = ...
On Sun, Nov 6, 2022, 12:37 PM Borys Kopeć
Hi all,
I've been working through the CIS 194 course recently and
unfortunately from lecture 7 onwards the code is not compliant with current compiler.
I can still follow the lectures but I'd like to do every homework
exercise. Unfortunately most homework exercises provide you with a code
wrote: framework to work with and this code does not compile.
Do any of you know about updated versions or corrections to this
course? I believe there could be a repo where someone is keeping the course's homework up to date because this course is still quite popular.
Regards Borys
-- brandon s allbery kf8nh allbery.b@gmail.com
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

I just updated the entry in lambdabot for it; that should help some.
sm may have some other references to update.
On Sun, Nov 6, 2022 at 3:26 PM Brent Yorgey
https://github.com/byorgey/haskell-course is the canonical github repo with the materials (though unfortunately I think most people get the material from the upenn-hosted site, which I no longer have access to). I'm very happy to take PRs with updates.
-Brent
On Sun, Nov 6, 2022 at 12:48 PM Jeff Clites via Haskell-Cafe
wrote: On Nov 6, 2022, at 9:47 AM, Borys Kopeć
wrote: I know I could google each one, make the compiler happy and then get on with exercises but I think that this is not an optimal learning experience.
Not ideal, but it would be worth giving it a try and seeing if you can push through, because deciphering compiler errors are something you will have to deal with when writing your solutions, so it's educational in its own way. It might turn out to be just a few things that need fixing up.
Also I don't know whether all exercises are even sensical with new features being added.
I would think they probably are still relevant; the language concepts haven't changed.
(I did some quick Googling to see if anyone had put an updated version on GitHub, but I didn't turn anything up. There are a bunch of repos with exercise solutions, so some of them might contain updates to the provided sources but I didn't dig into it.)
Jeff
On Sun, 6 Nov 2022 at 18:44, Brandon Allbery
wrote: This being a beginners course, it would still be better if it were kept up to date with such changes instead of requiring newcomers to know about them. Byorgey? On Sun, Nov 6, 2022 at 12:42 PM David Feuer
wrote: The changes needed to make it work should be minor. Since you call out the chapter on monoids, any Monoid instance now needs a Semigroup instance.
Before:
instance Monoid X where mappend a b = ... mempty = ...
Now:
instance Semigroup X where a <> b = ... instance Monoid X where -- mappend no longer needs to be defined mempty = ...
On Sun, Nov 6, 2022, 12:37 PM Borys Kopeć
wrote: Hi all,
I've been working through the CIS 194 course recently and unfortunately from lecture 7 onwards the code is not compliant with current compiler.
I can still follow the lectures but I'd like to do every homework exercise. Unfortunately most homework exercises provide you with a code framework to work with and this code does not compile.
Do any of you know about updated versions or corrections to this course? I believe there could be a repo where someone is keeping the course's homework up to date because this course is still quite popular.
Regards Borys
-- brandon s allbery kf8nh allbery.b@gmail.com
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- brandon s allbery kf8nh allbery.b@gmail.com

Thank you Brent for answering. I'll continue with the course and try to
update the code framework as necessary.
If there happens to be a problem that I cannot solve (since it goes outside
of my beginner's knowledge scope) is it okay for me to write to you?
On Sun, 6 Nov 2022 at 21:26, Brent Yorgey
https://github.com/byorgey/haskell-course is the canonical github repo with the materials (though unfortunately I think most people get the material from the upenn-hosted site, which I no longer have access to). I'm very happy to take PRs with updates.
-Brent
On Sun, Nov 6, 2022 at 12:48 PM Jeff Clites via Haskell-Cafe < haskell-cafe@haskell.org> wrote:
On Nov 6, 2022, at 9:47 AM, Borys Kopeć
wrote: I know I could google each one, make the compiler happy and then get on with exercises but I think that this is not an optimal learning experience.
Not ideal, but it would be worth giving it a try and seeing if you can push through, because deciphering compiler errors are something you will have to deal with when writing your solutions, so it's educational in its own way. It might turn out to be just a few things that need fixing up.
Also I don't know whether all exercises are even sensical with new features being added.
I would think they probably are still relevant; the language concepts haven't changed.
(I did some quick Googling to see if anyone had put an updated version on GitHub, but I didn't turn anything up. There are a bunch of repos with exercise solutions, so some of them might contain updates to the provided sources but I didn't dig into it.)
Jeff
On Sun, 6 Nov 2022 at 18:44, Brandon Allbery
wrote: This being a beginners course, it would still be better if it were kept up to date with such changes instead of requiring newcomers to know about them. Byorgey? On Sun, Nov 6, 2022 at 12:42 PM David Feuer
wrote: The changes needed to make it work should be minor. Since you call
out the chapter on monoids, any Monoid instance now needs a Semigroup instance.
Before:
instance Monoid X where mappend a b = ... mempty = ...
Now:
instance Semigroup X where a <> b = ... instance Monoid X where -- mappend no longer needs to be defined mempty = ...
On Sun, Nov 6, 2022, 12:37 PM Borys Kopeć
Hi all,
I've been working through the CIS 194 course recently and
unfortunately from lecture 7 onwards the code is not compliant with current compiler.
I can still follow the lectures but I'd like to do every homework
exercise. Unfortunately most homework exercises provide you with a code
wrote: framework to work with and this code does not compile.
Do any of you know about updated versions or corrections to this
course? I believe there could be a repo where someone is keeping the course's homework up to date because this course is still quite popular.
Regards Borys
-- brandon s allbery kf8nh allbery.b@gmail.com
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
participants (5)
-
Borys Kopeć
-
Brandon Allbery
-
Brent Yorgey
-
David Feuer
-
Jeff Clites