Skip to content

Commit

Permalink
Simplify build by using default-extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Dec 19, 2023
1 parent ed4c5a3 commit 57f2f13
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 34 deletions.
4 changes: 0 additions & 4 deletions slides/Course01.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{-# OPTIONS_GHC -Wno-missing-signatures #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}

module Course01 where

Expand Down
5 changes: 0 additions & 5 deletions slides/Course02.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RecordWildCards #-}

module Course02 where

Expand Down
6 changes: 2 additions & 4 deletions slides/course-01.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -250,6 +246,8 @@ Instead of loops, functional programs use:
}
```

--

<center>
⚠️ The Haskell <code>-></code> syntax is unrelated to Java lambdas 💣
</center>
Expand Down
5 changes: 0 additions & 5 deletions slides/course-02.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions slides/course-03.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions slides/course-04.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ Clément Hurlin
used by exdown (see check.sh).
```hs
{-# Language DeriveFunctor #-}
{-# Language MultiParamTypeClasses #-}
module Course04 where
import Data.Word
Expand Down
23 changes: 14 additions & 9 deletions tn-fp-course.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 57f2f13

Please sign in to comment.