haskell / play-haskell

Haskell Playground
125 stars 8 forks source link

Store ghc version for each snippet #24

Open trevorsibanda opened 1 year ago

trevorsibanda commented 1 year ago

Proposed changes

Contributor checklist

tomsmeding commented 1 year ago

Haven't built or tested locally, but from reading the code, this looks good so far. :) Thanks!

tomsmeding commented 1 year ago

Something that I thought of (not sure if this is still applicable after your last commit): I'm not sure I'd like the string "default" to ever appear in a Version. This is kind of in-band signalling of an unusual value, which I usually prefer to model using an ADT, i.e. Maybe Version in this case. In the database, the same idea would apply by making the ghcVersion column nullable, and storing NULL whenever there is no version specified.

trevorsibanda commented 1 year ago

I've made the ghcVersion column nullable and left it empty if it's not a supported version.

tomsmeding commented 1 year ago

Oh oops -- apparently I do not get notifications of PRs being set to "ready for review", and I'd missed most of what happened here completely. Sorry for the silence.

I'll try to review this either today or early next week.