Skip to content

Commit 94735a1

Browse files
committed
big cleanup
1 parent 4ececfe commit 94735a1

36 files changed

+189
-180
lines changed

fortran-src.cabal

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ library
8989
Language.Fortran.PrettyPrint
9090
Language.Fortran.Rewriter
9191
Language.Fortran.Rewriter.Internal
92-
Language.Fortran.Transformation
9392
Language.Fortran.Transformation.Disambiguation.Function
9493
Language.Fortran.Transformation.Disambiguation.Intrinsic
9594
Language.Fortran.Transformation.Grouping
@@ -104,6 +103,25 @@ library
104103
Paths_fortran_src
105104
hs-source-dirs:
106105
src
106+
default-extensions:
107+
EmptyCase
108+
FlexibleContexts
109+
FlexibleInstances
110+
InstanceSigs
111+
MultiParamTypeClasses
112+
PolyKinds
113+
LambdaCase
114+
DerivingStrategies
115+
StandaloneDeriving
116+
DeriveAnyClass
117+
DeriveGeneric
118+
DeriveDataTypeable
119+
DeriveFunctor
120+
DeriveFoldable
121+
DeriveTraversable
122+
DeriveLift
123+
BangPatterns
124+
TupleSections
107125
ghc-options: -Wall -fno-warn-tabs
108126
build-tools:
109127
alex >=3.1
@@ -132,6 +150,25 @@ executable fortran-src
132150
Paths_fortran_src
133151
hs-source-dirs:
134152
app
153+
default-extensions:
154+
EmptyCase
155+
FlexibleContexts
156+
FlexibleInstances
157+
InstanceSigs
158+
MultiParamTypeClasses
159+
PolyKinds
160+
LambdaCase
161+
DerivingStrategies
162+
StandaloneDeriving
163+
DeriveAnyClass
164+
DeriveGeneric
165+
DeriveDataTypeable
166+
DeriveFunctor
167+
DeriveFoldable
168+
DeriveTraversable
169+
DeriveLift
170+
BangPatterns
171+
TupleSections
135172
ghc-options: -Wall -fno-warn-tabs
136173
build-depends:
137174
GenericPretty >=1.2.2 && <2
@@ -187,6 +224,25 @@ test-suite spec
187224
Paths_fortran_src
188225
hs-source-dirs:
189226
test
227+
default-extensions:
228+
EmptyCase
229+
FlexibleContexts
230+
FlexibleInstances
231+
InstanceSigs
232+
MultiParamTypeClasses
233+
PolyKinds
234+
LambdaCase
235+
DerivingStrategies
236+
StandaloneDeriving
237+
DeriveAnyClass
238+
DeriveGeneric
239+
DeriveDataTypeable
240+
DeriveFunctor
241+
DeriveFoldable
242+
DeriveTraversable
243+
DeriveLift
244+
BangPatterns
245+
TupleSections
190246
ghc-options: -Wall
191247
build-tool-depends:
192248
hspec-discover:hspec-discover
@@ -218,6 +274,25 @@ benchmark bench
218274
Paths_fortran_src
219275
hs-source-dirs:
220276
bench
277+
default-extensions:
278+
EmptyCase
279+
FlexibleContexts
280+
FlexibleInstances
281+
InstanceSigs
282+
MultiParamTypeClasses
283+
PolyKinds
284+
LambdaCase
285+
DerivingStrategies
286+
StandaloneDeriving
287+
DeriveAnyClass
288+
DeriveGeneric
289+
DeriveDataTypeable
290+
DeriveFunctor
291+
DeriveFoldable
292+
DeriveTraversable
293+
DeriveLift
294+
BangPatterns
295+
TupleSections
221296
ghc-options: -Wall
222297
build-depends:
223298
GenericPretty >=1.2.2 && <2

package.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,30 @@ extra-source-files:
2222
- CHANGELOG.md
2323
- test-data/**/*
2424

25+
# 2022-01-25: raehik: the essentials + handful of syntax (most in GHC2021)
26+
default-extensions:
27+
# essential
28+
- EmptyCase
29+
- FlexibleContexts
30+
- FlexibleInstances
31+
- InstanceSigs
32+
- MultiParamTypeClasses
33+
- PolyKinds
34+
- LambdaCase
35+
# deriving-related
36+
- DerivingStrategies
37+
- StandaloneDeriving
38+
- DeriveAnyClass
39+
- DeriveGeneric
40+
- DeriveDataTypeable
41+
- DeriveFunctor
42+
- DeriveFoldable
43+
- DeriveTraversable
44+
- DeriveLift
45+
# less essential but still gimmes
46+
- BangPatterns
47+
- TupleSections
48+
2549
dependencies:
2650
- base >=4.6 && <5
2751
- mtl >=2.2 && <3

src/Language/Fortran/AST.hs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
{-# LANGUAGE FlexibleInstances #-}
2-
{-# LANGUAGE MultiParamTypeClasses #-}
3-
{-# LANGUAGE DeriveDataTypeable #-}
4-
{-# LANGUAGE DeriveGeneric #-}
5-
{-# LANGUAGE DeriveFunctor #-}
61
{-# LANGUAGE DefaultSignatures #-}
7-
{-# LANGUAGE FlexibleContexts #-}
82

93
-- |
104
--

src/Language/Fortran/AST/AList.hs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
{-# LANGUAGE MultiParamTypeClasses #-}
2-
{-# LANGUAGE FlexibleInstances #-}
3-
{-# LANGUAGE DeriveDataTypeable #-}
4-
{-# LANGUAGE DeriveGeneric #-}
5-
{-# LANGUAGE DeriveFunctor #-}
6-
71
module Language.Fortran.AST.AList where
82

93
import Language.Fortran.Util.FirstParameter

src/Language/Fortran/AST/Boz.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ converting to a numeric type and using something like 'showIntAtBase', or a
1515
'Bits' instance.
1616
-}
1717

18-
{-# LANGUAGE DerivingStrategies, DeriveDataTypeable, DeriveGeneric, DeriveAnyClass #-}
19-
{-# LANGUAGE LambdaCase #-}
20-
2118
module Language.Fortran.AST.Boz where
2219

2320
import GHC.Generics

src/Language/Fortran/AST/RealLit.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ that can be easily exported with full precision later. Things we do:
1212
Haskell literals do not support this.)
1313
-}
1414

15-
{-# LANGUAGE DeriveDataTypeable, DeriveGeneric, DeriveAnyClass #-}
16-
{-# LANGUAGE RecordWildCards, LambdaCase #-}
15+
{-# LANGUAGE RecordWildCards #-}
1716

1817
module Language.Fortran.AST.RealLit where
1918

src/Language/Fortran/Analysis.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable, StandaloneDeriving, DeriveGeneric, TupleSections #-}
1+
{-# LANGUAGE ScopedTypeVariables #-}
22
{-# OPTIONS_GHC -Wno-orphans #-}
33

44
-- |

src/Language/Fortran/Analysis/BBlocks.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- | Analyse a program file and create basic blocks.
22

3-
{-# LANGUAGE TupleSections, FlexibleContexts, PatternGuards, ScopedTypeVariables #-}
3+
{-# LANGUAGE ScopedTypeVariables #-}
44
module Language.Fortran.Analysis.BBlocks
55
( analyseBBlocks, genBBlockMap, showBBGr, showAnalysedBBGr, showBBlocks, bbgrToDOT, BBlockMap, ASTBlockNode, ASTExprNode
66
, genSuperBBGr, SuperBBGr(..), showSuperBBGr, superBBGrToDOT, findLabeledBBlock, showBlock )

src/Language/Fortran/Analysis/DataFlow.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- | Dataflow analysis to be applied once basic block analysis is complete.
22

3-
{-# LANGUAGE FlexibleContexts, PatternGuards, ScopedTypeVariables, TupleSections, DeriveGeneric, DeriveDataTypeable, BangPatterns #-}
3+
{-# LANGUAGE ScopedTypeVariables #-}
44
module Language.Fortran.Analysis.DataFlow
55
( dominators, iDominators, DomMap, IDomMap
66
, postOrder, revPostOrder, preOrder, revPreOrder, OrderF

src/Language/Fortran/Analysis/Renaming.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# LANGUAGE ScopedTypeVariables, PatternGuards, TupleSections #-}
1+
{-# LANGUAGE ScopedTypeVariables #-}
22

33
-- |
44
-- Analyse variables/function names and produce unique names that can

0 commit comments

Comments
 (0)