haskell/play-haskell

Save GHC version in stored pastes

tomsmeding opened this issue · 3 comments

Currently when loading a stored paste, the playground just selects the default GHC version, rather than the version selected when the paste was created. This is annoying when wanting to demonstrate behaviour with one particular GHC version.

Hi @tomsmeding I'd like to start on this. Any tips or anything I should be aware of?

Thanks! I expect that you'll need to do the following things:

  • Change the database schema in play-haskell-server/src/DB.hs (don't forget to up the version number)
  • Write a DB migration script like the existing migrate_db_N_M.sh
  • Modify the Save endpoint in Play.hs to take a JSON value instead of plain bytes (look at other endpoints how that might work) -- also looks like that endpoint could use a exitExitEarlyT
  • Modify the client in play.mustache to do the right thing

Let me know if you get stuck!

Opened a draft PR.

Comments welcome before I move forward tomorrow.