Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Snap/Restful.hs
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ instance HasFormlet Word64 where

validDate :: Text -> Result Text Day
validDate = maybe (Error "invalid date") Success .
parseTime LC.defaultTimeLocale "%F" . T.unpack
parseTimeM True LC.defaultTimeLocale "%F" . T.unpack


dayText :: Day -> Text
Expand Down
4 changes: 2 additions & 2 deletions src/Snap/Restful/TH.hs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ iSplices n = do
-- return $ TupE [LitE $ StringL $ nameBase fn, f]
return $ NoBindS $ UInfixE (LitE $ StringL $ nameBase fn) (VarE $ mkName "##") f
fs <- mapM fieldToSplice fields
return $ LamE [VarP param] (DoE fs)
return $ LamE [VarP param] (DoE Nothing fs)
_ -> error "You can only generate splices for a data type with a single constructor and named record fields"


Expand All @@ -120,7 +120,7 @@ cSplices n = do
-- return $ TupE [LitE $ StringL $ nameBase fn, f]
return $ NoBindS $ UInfixE (LitE $ StringL $ nameBase fn) (VarE $ mkName "##") f
fs <- mapM fieldToSplice fields
return $ DoE fs
return $ DoE Nothing fs
_ -> error "You can only generate splices for a data type with a single constructor and named record fields"


Expand Down