souplesse/app/Main.hs

28 lines
600 B
Haskell

{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Main where
import Track(parseFile)
import Data.List as List
import Yesod.Core
data HelloWorld = HelloWorld
mkYesod "HelloWorld" [parseRoutes|
/ HomeR GET
|]
instance Yesod HelloWorld
getHomeR :: Handler Html
getHomeR = defaultLayout [whamlet|Hello World!|]
main :: IO ()
main = do
points <- Track.parseFile "track.gpx"
putStrLn ("loaded " ++ (show (List.length points)) ++ " points from GPX")
warp 3000 HelloWorld