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