qfpl / applied-fp-course

Applied Functional Programming Course - Move from exercises to a working app!

Home Page:http://qfpl.io/projects/professional-fp-courses/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HKD Bonus stage for Config

endgame opened this issue · comments

We define configs and partial configs, but with HKD being used more often these days maybe we want a bonus level where you define

data Config f = Config
  { port :: f Port
  , dbPath :: f DBFilePath
  }

instance Semigroup (Config Last)
instance Monoid (Config Last)

?

Double jeopardy round where the scores can really change

Use deriving via

How? Won't we be plugging in different things in for f, explicitly? I'm not sure I understand.