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
3 changes: 2 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ packages:
doc/cookbook/basic-streaming
doc/cookbook/db-postgres-pool
doc/cookbook/db-sqlite-simple
doc/cookbook/file-upload
-- Unclear why this started failing with GHC2021
-- doc/cookbook/file-upload
doc/cookbook/named-routes
doc/cookbook/hoist-server-with-context
doc/cookbook/https
Expand Down
1 change: 0 additions & 1 deletion doc/cookbook/basic-auth/BasicAuth.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ First, some throat clearing.
``` haskell
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
import Control.Concurrent
import Control.Exception
import qualified Data.Map as Map
Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/basic-auth/basic-auth.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ executable cookbook-basic-auth
, http-types >= 0.12
, markdown-unlit >= 0.5.1
, http-client >= 0.7.19
default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -pgmL markdown-unlit
build-tool-depends: markdown-unlit:markdown-unlit
3 changes: 0 additions & 3 deletions doc/cookbook/basic-streaming/Streaming.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ In other words, without streaming libraries.
## Code

```haskell
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
module Main (main) where

import Control.Concurrent
Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/basic-streaming/basic-streaming.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ build-type: Simple
executable cookbook-basic-streaming
main-is: Streaming.lhs
build-tool-depends: markdown-unlit:markdown-unlit
default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -pgmL markdown-unlit -threaded -rtsopts

hs-source-dirs: .
Expand Down
8 changes: 0 additions & 8 deletions doc/cookbook/curl-mock/CurlMock.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,8 @@ Also, we will learn how to use the servant-foreign library to generate stuff fro
Language extensions and imports:
``` haskell
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}

import Control.Lens ((^.))
import Data.Aeson
Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/curl-mock/curl-mock.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ executable cookbock-curl-mock
, servant-foreign
, QuickCheck
, generic-arbitrary
default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -pgmL markdown-unlit
build-tool-depends: markdown-unlit:markdown-unlit
3 changes: 0 additions & 3 deletions doc/cookbook/custom-errors/CustomErrors.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ Recently Servant got a way to add such formatting. This Cookbook chapter demonst
Extensions and imports:
```haskell
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}

import Data.Aeson
import Data.Proxy
Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/custom-errors/custom-errors.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ executable cookbook-custom-errors
, text
, wai
, warp
default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -pgmL markdown-unlit
build-tool-depends: markdown-unlit:markdown-unlit
5 changes: 0 additions & 5 deletions doc/cookbook/db-mysql-basics/MysqlBasics.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,10 @@ Let's jump in:

```haskell
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
module Lib where

import Control.Monad.IO.Class (liftIO)
Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/db-mysql-basics/mysql-basics.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ executable run
, transformers
, wai
, warp
default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -pgmL markdown-unlit
build-tool-depends: markdown-unlit:markdown-unlit

Expand Down
1 change: 0 additions & 1 deletion doc/cookbook/db-postgres-pool/PostgresPool.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ As usual, we start with a little bit of throat clearing.
``` haskell
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
import Data.ByteString (ByteString)
import Control.Concurrent
import Control.Exception (bracket)
Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/db-postgres-pool/db-postgres-pool.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ executable cookbook-db-postgres-pool
, postgresql-simple >= 0.7
, resource-pool >= 0.5
, transformers
default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -pgmL markdown-unlit
build-tool-depends: markdown-unlit:markdown-unlit
1 change: 0 additions & 1 deletion doc/cookbook/db-sqlite-simple/DBConnection.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ messages. As usual, we start with a little bit of throat clearing.
``` haskell
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
import Control.Concurrent
import Control.Exception (bracket)
import Control.Monad.IO.Class
Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/db-sqlite-simple/db-sqlite-simple.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ executable cookbook-db-sqlite-simple
, http-client >= 0.7.19
, sqlite-simple >= 0.4.19.0
, transformers
default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -pgmL markdown-unlit
build-tool-depends: markdown-unlit:markdown-unlit
3 changes: 0 additions & 3 deletions doc/cookbook/expose-prometheus/ExposePrometheus.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ First, the imports.
``` haskell
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}

import Control.Monad (forever)
import Control.Concurrent (ThreadId, forkIO, threadDelay)
Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/expose-prometheus/expose-prometheus.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ executable cookbook-expose-prometheus
, http-types >= 0.12
, markdown-unlit >= 0.5.1
, http-client >= 0.7.19
default-language: Haskell2010
default-language: GHC2021
ghc-options: -rtsopts -Wall -pgmL markdown-unlit
build-tool-depends: markdown-unlit:markdown-unlit
1 change: 0 additions & 1 deletion doc/cookbook/file-upload/FileUpload.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ As usual, a bit of throat clearing.

``` haskell
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}

import Control.Concurrent
Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/file-upload/file-upload.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ executable cookbook-file-upload
, wai >= 3.2
, markdown-unlit >= 0.5.1
, http-client >= 0.7.19
default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -pgmL markdown-unlit
build-tool-depends: markdown-unlit:markdown-unlit
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ This recipe uses the following ingredients:

```haskell
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}

import Prelude ()
import Prelude.Compat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ executable cookbook-hoist-server-with-context
, http-types >= 0.12
, bytestring >= 0.11
, mtl
default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -pgmL markdown-unlit
build-tool-depends: markdown-unlit:markdown-unlit
1 change: 0 additions & 1 deletion doc/cookbook/https/Https.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ and imports.

``` haskell
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
import Network.Wai
import Network.Wai.Handler.Warp
import Network.Wai.Handler.WarpTLS
Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/https/https.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ executable cookbook-https
, warp >= 3.4.9
, warp-tls >= 3.3.4
, markdown-unlit >= 0.5.1
default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -pgmL markdown-unlit
build-tool-depends: markdown-unlit:markdown-unlit
4 changes: 1 addition & 3 deletions doc/cookbook/infinite-streams/InfiniteStreams.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ To keep the connection alive, we will need to send bytes on a regular basis.
This is a Literate Haskell file, so let's get imports out of the way.

```haskell
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NumericUnderscores #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ExplicitNamespaces #-}
module Main (main) where

-- from `aeson`
Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/infinite-streams/infinite-streams.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ build-type: Simple
executable cookbook-infinite-streams
main-is: InfiniteStreams.lhs
build-tool-depends: markdown-unlit:markdown-unlit
default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -pgmL markdown-unlit -Wunused-packages -threaded -rtsopts -with-rtsopts=-N

hs-source-dirs: .
Expand Down
3 changes: 1 addition & 2 deletions doc/cookbook/jwt-and-basic-auth/JWTAndBasicAuth.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ packages are needed for the JWT-based one.
This recipe uses the following ingredients:

```haskell
{-# LANGUAGE OverloadedStrings, TypeFamilies, DataKinds,
DeriveGeneric, TypeOperators #-}
{-# LANGUAGE OverloadedStrings, TypeFamilies, DataKinds, ExplicitNamespaces #-}
import Data.Aeson
import GHC.Generics
import Data.Proxy
Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/jwt-and-basic-auth/jwt-and-basic-auth.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ executable cookbook-jwt-and-basic-auth
, http-client >= 0.7.19
, bytestring >= 0.11
, transformers
default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -pgmL markdown-unlit
build-tool-depends: markdown-unlit:markdown-unlit
1 change: 0 additions & 1 deletion doc/cookbook/managed-resource/ManagedResource.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ As usual, we start with a little bit of throat clearing.

``` haskell
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
import Control.Concurrent
import Control.Exception (bracket)
import Control.Monad.IO.Class
Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/managed-resource/managed-resource.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ executable cookbook-managed-resource
, http-client >= 0.7.19
, transformers
, resourcet
default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -pgmL markdown-unlit
build-tool-depends: markdown-unlit:markdown-unlit
2 changes: 1 addition & 1 deletion doc/cookbook/multiverb/multiverb.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ executable cookbook-multiverb
, swagger2
, wai
, warp
default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -pgmL markdown-unlit
build-tool-depends: markdown-unlit:markdown-unlit

1 change: 0 additions & 1 deletion doc/cookbook/named-routes/NamedRoutes.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ why ever look back? Let's get started!
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedRecordDot #-}

Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/named-routes/cookbook-named-routes.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ executable cookbook-named-routes
, wai >=3.2
, warp >=3.4.9

default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -pgmL markdown-unlit
build-tool-depends: markdown-unlit:markdown-unlit
2 changes: 1 addition & 1 deletion doc/cookbook/open-id-connect/OpenIdConnect.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ executable cookbook-openidconnect
, vector
, wai
, warp >= 3.4.9
default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -Wcompat -Wincomplete-uni-patterns -Wredundant-constraints -Wnoncanonical-monad-instances -pgmL markdown-unlit
build-tool-depends: markdown-unlit:markdown-unlit >= 0.5.1
8 changes: 0 additions & 8 deletions doc/cookbook/open-id-connect/OpenIdConnect.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,13 @@ Let's put the imports behind us:

``` haskell
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeSynonymInstances #-}

module Main where
Expand Down
3 changes: 0 additions & 3 deletions doc/cookbook/openapi3/OpenAPI.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ Let's start with an API of an example TODO service:

```haskell
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}

import GHC.Generics
import Data.Text
Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/openapi3/openapi3.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ build-type: Simple
executable cookbook-openapi3
main-is: OpenAPI.lhs
build-tool-depends: markdown-unlit:markdown-unlit
default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -pgmL markdown-unlit
build-depends: base >= 4.16 && <5
, aeson
Expand Down
5 changes: 0 additions & 5 deletions doc/cookbook/pagination/Pagination.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,7 @@ So, let's start with some imports and extensions to get this out of the way:

``` haskell
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}

import Data.Aeson
(ToJSON, genericToJSON)
Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/pagination/pagination.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ build-type: Simple
executable cookbook-pagination
main-is: Pagination.lhs
build-tool-depends: markdown-unlit:markdown-unlit
default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -pgmL markdown-unlit
build-depends: base >= 4.16 && <5
, aeson
Expand Down
1 change: 0 additions & 1 deletion doc/cookbook/sentry/Sentry.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ To exemplify this we will need the following imports

```haskell
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}

import Control.Exception (Exception,
SomeException, throw)
Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/sentry/sentry.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ executable cookbook-sentry
, servant-server
, warp >= 3.4.9
, wai >= 3.2
default-language: Haskell2010
default-language: GHC2021
ghc-options: -Wall -pgmL markdown-unlit
build-tool-depends: markdown-unlit:markdown-unlit
3 changes: 0 additions & 3 deletions doc/cookbook/structuring-apis/StructuringApis.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ clearing.

``` haskell
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE KindSignatures #-}
import Data.Aeson
import GHC.Generics
import GHC.TypeLits
Expand Down
Loading
Loading