Migrate from purty to purs-tidy (#178)

* Replace purty with purs-tidy

* run purs-tidy
This commit is contained in:
Thomas Honeyman
2021-11-06 20:37:31 +01:00
committed by GitHub
parent af027845e9
commit 6ce52417f7
16 changed files with 76 additions and 91 deletions

View File

@@ -8,9 +8,7 @@ import Effect.Console as Console
import HTTPure as HTTPure
-- | A type to hold the environment for our ReaderT
type Env
= { name :: String
}
type Env = { name :: String }
-- | A middleware that introduces a ReaderT
readerMiddleware ::

View File

@@ -37,7 +37,6 @@ pathMiddleware ::
HTTPure.Request ->
HTTPure.ResponseM
pathMiddleware _ { path: [ "middleware" ] } = HTTPure.ok "Middleware!"
pathMiddleware router request = router request
-- | Say 'hello' when run, and add a default value to the X-Middleware header

View File

@@ -7,9 +7,7 @@ import HTTPure as HTTPure
-- | Specify the routes
router :: HTTPure.Request -> HTTPure.ResponseM
router { path: [ "hello" ] } = HTTPure.ok "hello"
router { path: [ "goodbye" ] } = HTTPure.ok "goodbye"
router _ = HTTPure.notFound
-- | Boot up the server

View File

@@ -7,7 +7,6 @@ import HTTPure as HTTPure
-- | Route to the correct handler
router :: HTTPure.Request -> HTTPure.ResponseM
router { body, method: HTTPure.Post } = HTTPure.ok body
router _ = HTTPure.notFound
-- | Boot up the server