From 57f2f13b2f08583f618ed99ecf39543dfcc5db3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Hurlin?= Date: Tue, 19 Dec 2023 11:23:14 +0100 Subject: [PATCH] Simplify build by using default-extensions --- slides/Course01.hs | 4 ---- slides/Course02.hs | 5 ----- slides/course-01.md | 6 ++---- slides/course-02.md | 5 ----- slides/course-03.md | 4 ---- slides/course-04.md | 3 --- tn-fp-course.cabal | 23 ++++++++++++++--------- 7 files changed, 16 insertions(+), 34 deletions(-) diff --git a/slides/Course01.hs b/slides/Course01.hs index 0060fc9..9291574 100644 --- a/slides/Course01.hs +++ b/slides/Course01.hs @@ -1,8 +1,4 @@ {-# OPTIONS_GHC -Wno-missing-signatures #-} -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE ScopedTypeVariables #-} module Course01 where diff --git a/slides/Course02.hs b/slides/Course02.hs index b0e734f..b6716f8 100644 --- a/slides/Course02.hs +++ b/slides/Course02.hs @@ -1,8 +1,3 @@ -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE LambdaCase #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE NamedFieldPuns #-} -{-# LANGUAGE RecordWildCards #-} module Course02 where diff --git a/slides/course-01.md b/slides/course-01.md index 58cf63f..d969146 100644 --- a/slides/course-01.md +++ b/slides/course-01.md @@ -17,10 +17,6 @@ Clément Hurlin, Director of Engineering, Tweag ```hs {-# OPTIONS_GHC -Wno-missing-signatures #-} -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE ScopedTypeVariables #-} module Course01 where @@ -250,6 +246,8 @@ Instead of loops, functional programs use: } ``` +-- +
⚠️ The Haskell -> syntax is unrelated to Java lambdas 💣
diff --git a/slides/course-02.md b/slides/course-02.md index 3f1f5eb..07845fb 100644 --- a/slides/course-02.md +++ b/slides/course-02.md @@ -37,11 +37,6 @@ In large companies you can: used by exdown (see check.sh). ```hs -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE LambdaCase #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE NamedFieldPuns #-} -{-# LANGUAGE RecordWildCards #-} module Course02 where diff --git a/slides/course-03.md b/slides/course-03.md index 8f6e9da..41d0493 100644 --- a/slides/course-03.md +++ b/slides/course-03.md @@ -16,13 +16,9 @@ Clément Hurlin used by exdown (see check.sh). ```hs -{-# Language LambdaCase #-} -{-# Language NamedFieldPuns #-} -{-# Language ScopedTypeVariables #-} {-# OPTIONS_GHC -Wno-missing-signatures #-} {-# OPTIONS_GHC -Wno-unused-matches #-} - module Course03 where import Data.Char (isLower) diff --git a/slides/course-04.md b/slides/course-04.md index 16861f4..9f19d1d 100644 --- a/slides/course-04.md +++ b/slides/course-04.md @@ -16,9 +16,6 @@ Clément Hurlin used by exdown (see check.sh). ```hs -{-# Language DeriveFunctor #-} -{-# Language MultiParamTypeClasses #-} - module Course04 where import Data.Word diff --git a/tn-fp-course.cabal b/tn-fp-course.cabal index c89df09..12c1b3e 100644 --- a/tn-fp-course.cabal +++ b/tn-fp-course.cabal @@ -34,15 +34,20 @@ common common-all -Wno-unused-imports -Werror -Wwarn=missing-home-modules - default-extensions: DataKinds - DeriveGeneric - DuplicateRecordFields - NamedFieldPuns - LambdaCase - OverloadedRecordDot - OverloadedStrings - ScopedTypeVariables - TypeApplications + default-extensions: DataKinds + DeriveGeneric + DeriveFunctor + DuplicateRecordFields + FlexibleContexts + FlexibleInstances + MultiParamTypeClasses + NamedFieldPuns + LambdaCase + OverloadedRecordDot + OverloadedStrings + RecordWildCards + ScopedTypeVariables + TypeApplications library slides import: common-all