repos / handle-examples.hs.git


handle-examples.hs.git / vinyl-handle / domain
Evgenii Akentev  ·  2021-01-09

WindProvider.hs

 1{-# LANGUAGE DataKinds #-}
 2{-# LANGUAGE OverloadedStrings #-}
 3{-# LANGUAGE TypeApplications #-}
 4
 5module WindProvider where
 6
 7import HandleRec
 8import QueryTypes
 9
10type WindSpeed = Int
11
12type Methods = '[ '("getWindData", (Location -> Day -> IO WindSpeed)) ]
13
14type Handle = HandleRec Methods
15
16getWindData :: Handle -> Location -> Day -> IO WindSpeed
17getWindData = getMethod @"getWindData"