An API as a type - Servant by construction part 1

This file is a Literate Haskell module, so we have to get some ceremony out-of-the-way. {-# LANGUAGE DerivingStrategies #-} -- We'll get back to DataKinds {-# LANGUAGE DataKinds #-} module ApiAsType where -- we'll need these later on import Data.Text ( Text ) import Data.Time ( UTCTime , Day ) import GHC.TypeLits ( Symbol ) A web application programming interface (API) can be represent by a tree…