Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

formatting change #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
23 changes: 12 additions & 11 deletions test/ReserveSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,26 @@ import System.IO
import Network
import Network.HTTP.Conduit
import Data.String.Interpolate
import Data.String.Interpolate.Util

import Options
import Reserve

appWithResponse :: String -> IO ()
appWithResponse response = writeFile "app.hs" [i|
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
appWithResponse response = writeFile "app.hs" $ unindent [i|
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where

import Network.Wai
import Network.HTTP.Types
import Network.Wai.Handler.Warp (run)
import qualified Data.ByteString.Lazy.Char8 as B
import Network.Wai
import Network.HTTP.Types
import Network.Wai.Handler.Warp (run)
import qualified Data.ByteString.Lazy.Char8 as B

app :: Application
app _ = ($ responseLBS status200 [("Content-Type", "text/plain")] #{response})
app :: Application
app _ = ($ responseLBS status200 [("Content-Type", "text/plain")] #{response})

main :: IO ()
main = run 3000 app
main :: IO ()
main = run 3000 app
|]

literal :: String -> String
Expand Down