Skip to content

Commit

Permalink
ghc78 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
imalsogreg committed Sep 21, 2017
1 parent 9dad9c0 commit 927c5b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/Servant/Server/Internal/Context.hs
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
#if __GLASGOW_HASKELL__ < 710

This comment has been minimized.

Copy link
@hvr

hvr Sep 21, 2017

Contributor

@imalsogreg wat? :-)

Why do we need {-# LANGUAGE OverlappingInstances #-} twice for GHC < 7.10?

This comment has been minimized.

Copy link
@imalsogreg

imalsogreg Sep 21, 2017

Author Contributor

Now that you mention it.... maybe one is enough :) fixed

{-# LANGUAGE OverlappingInstances #-}
#endif
{-# LANGUAGE OverlappingInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}

Expand Down Expand Up @@ -99,4 +104,4 @@ descendIntoNamedContext :: forall context name subContext .
Proxy (name :: Symbol) -> Context context -> Context subContext
descendIntoNamedContext Proxy context =
let NamedContext subContext = getContextEntry context :: NamedContext name subContext
in subContext
in subContext
2 changes: 1 addition & 1 deletion test/Servant/ServerSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ basicAuthSpec = do

describe "Checks auth" $ do

it "returns 403 when not logged in" $ do
it "returns 401 when not logged in" $ do
response <- runReqOnApi baApi (baCheck :. EmptyContext) getSecret SC.GET "/secret" "" [] ""
response `shouldHaveStatus` 401

Expand Down

0 comments on commit 927c5b9

Please sign in to comment.