From bc02a2f75a74b5e385c0735ee2cd5d0a92397004 Mon Sep 17 00:00:00 2001 From: Arian van Putten Date: Sat, 3 Oct 2015 01:45:16 +0200 Subject: [PATCH] formatting --- servant-mock/src/Servant/Mock.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/servant-mock/src/Servant/Mock.hs b/servant-mock/src/Servant/Mock.hs index 5489d33e..a168fea8 100644 --- a/servant-mock/src/Servant/Mock.hs +++ b/servant-mock/src/Servant/Mock.hs @@ -154,8 +154,10 @@ instance (KnownSymbol s, HasMock rest) => HasMock (MatrixFlag s :> rest) where instance (KnownSymbol h, FromText a, HasMock rest) => HasMock (Header h a :> rest) where mock _ = \_ -> mock (Proxy :: Proxy rest) -instance (HasMock rest, AuthData authdata, Arbitrary usr) => HasMock (AuthProtect authdata (usr :: *) 'Lax :> rest) where - mock _ = laxProtect (\_ -> do { a <- generate arbitrary; return (Just a)}) (\_ -> mock (Proxy :: Proxy rest)) +instance (HasMock rest, AuthData authdata, Arbitrary usr) + => HasMock (AuthProtect authdata (usr :: *) 'Lax :> rest) where + mock _ = laxProtect (\_ -> do { a <- generate arbitrary; return (Just a)}) + (\_ -> mock (Proxy :: Proxy rest)) instance (HasMock rest, Arbitrary usr, KnownSymbol realm) => HasMock (AuthProtect (BasicAuth realm) (usr :: *) 'Strict :> rest) where