Compare commits
No commits in common. "d23ee5a948b30efe0c80eeaee46782165bdbe785" and "dcaa38e5fe86ff660053800d83181f7d0999eb9a" have entirely different histories.
d23ee5a948
...
dcaa38e5fe
@ -60,11 +60,3 @@ _Do not look below this line_
|
|||||||
* can we lose this "if isJust lat && isJust lon && isJust ts" wart?
|
* can we lose this "if isJust lat && isJust lon && isJust ts" wart?
|
||||||
* probably we should store points in a more efficient form than
|
* probably we should store points in a more efficient form than
|
||||||
a singly-linked list
|
a singly-linked list
|
||||||
|
|
||||||
* need a web server in haskell that
|
|
||||||
- accepts file upload and parses the gpx file
|
|
||||||
- serves the data points in some format elm can digest easily
|
|
||||||
* need a database of some kind so the data can be saved
|
|
||||||
* and boring stuff like auth[zn]
|
|
||||||
* frontend can get data from backend
|
|
||||||
* for DX, backend can serve the js files needed by frontend
|
|
||||||
|
21
app/Main.hs
21
app/Main.hs
@ -1,27 +1,10 @@
|
|||||||
{-# LANGUAGE OverloadedStrings #-}
|
|
||||||
{-# LANGUAGE QuasiQuotes #-}
|
|
||||||
{-# LANGUAGE TemplateHaskell #-}
|
|
||||||
{-# LANGUAGE TypeFamilies #-}
|
|
||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
|
import Control.Exception
|
||||||
import Track(parseFile)
|
import Track(parseFile)
|
||||||
import Data.List as List
|
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 :: IO ()
|
||||||
main = do
|
main = do
|
||||||
points <- Track.parseFile "track.gpx"
|
points <- Track.parseFile "track.gpx"
|
||||||
putStrLn ("loaded " ++ (show (List.length points)) ++ " points from GPX")
|
putStrLn ("loaded " ++ (show (List.length points)))
|
||||||
warp 3000 HelloWorld
|
|
||||||
|
@ -71,7 +71,6 @@ executable souplesse
|
|||||||
build-depends:
|
build-depends:
|
||||||
base ^>=4.18.2.1
|
base ^>=4.18.2.1
|
||||||
, souplesse-lib
|
, souplesse-lib
|
||||||
, yesod-core == 1.6.25.1
|
|
||||||
|
|
||||||
-- Directories containing source files.
|
-- Directories containing source files.
|
||||||
hs-source-dirs: app
|
hs-source-dirs: app
|
||||||
|
Loading…
Reference in New Issue
Block a user