remove unused names

This commit is contained in:
Daniel Barlow 2024-11-04 23:36:10 +00:00
parent f581107869
commit 5995a4083a

View File

@ -8,11 +8,8 @@ module Main where
import Data.ByteString.Lazy as BS
import Data.List as List
import Data.Text as T
import Debug.Trace (traceShow)
import Track (parseBS, parseFile)
-- import Import
import Yesod.Core
import Yesod.Form.Fields
import Yesod.Form.Functions
@ -41,7 +38,7 @@ instance Yesod Souplesse
getCalendarR :: Handler Html
getCalendarR = do
(formWidget, formEnctype) <- generateFormPost uploadForm
(formWidget, _) <- generateFormPost uploadForm
defaultLayout
[whamlet|
<h1>Calendar
@ -92,14 +89,14 @@ instance RenderMessage Souplesse FormMessage where
postUploadR :: Handler Html
postUploadR = do
((result, widget), enctype) <- runFormPost uploadForm
((result, _), _) <- runFormPost uploadForm
case result of
FormSuccess upload -> do
bs <- fileSourceByteString $ fileInfo upload
case Track.parseBS (fromStrict bs) of
Right points ->
defaultLayout [whamlet|<p>#{List.length points} points - thanks!|]
Left e ->
Left _ ->
defaultLayout
[whamlet|<p>parse error ]
FormMissing ->