From 126cdc528570fca8d60f8b41114fcefbbe2eef37 Mon Sep 17 00:00:00 2001 From: joshvera Date: Mon, 26 Mar 2018 12:00:19 -0400 Subject: [PATCH 1/3] Make typeapplications a default extension --- .stylish-haskell.yaml | 7 ++++--- semantic.cabal | 2 ++ src/Analysis/Abstract/Evaluating.hs | 2 +- src/Data/Syntax/Literal.hs | 2 +- src/Semantic/Util.hs | 2 +- test/Analysis/Python/Spec.hs | 2 +- test/Analysis/TypeScript/Spec.hs | 2 +- test/SpecHelpers.hs | 2 +- 8 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.stylish-haskell.yaml b/.stylish-haskell.yaml index 99ff94350..98702f987 100644 --- a/.stylish-haskell.yaml +++ b/.stylish-haskell.yaml @@ -218,16 +218,17 @@ newline: native # command line instead of using language pragmas in the file. stylish-haskell # needs to be aware of these, so it can parse the file correctly. language_extensions: - - ExplicitNamespaces + - DataKinds - DeriveFoldable - DeriveFunctor - DeriveGeneric - DeriveTraversable + - ExplicitNamespaces - FlexibleContexts - FlexibleInstances - MultiParamTypeClasses - - StandaloneDeriving - - DataKinds - OverloadedStrings - RecordWildCards + - StandaloneDeriving - StrictData + - TypeApplications diff --git a/semantic.cabal b/semantic.cabal index 90c80fb65..2adf634b1 100644 --- a/semantic.cabal +++ b/semantic.cabal @@ -197,6 +197,7 @@ library , RecordWildCards , StandaloneDeriving , StrictData + , TypeApplications ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -fno-warn-name-shadowing -O -j ghc-prof-options: -fprof-auto @@ -273,6 +274,7 @@ test-suite test , OverloadedStrings , RecordWildCards , StandaloneDeriving + , TypeApplications test-suite doctests type: exitcode-stdio-1.0 diff --git a/src/Analysis/Abstract/Evaluating.hs b/src/Analysis/Abstract/Evaluating.hs index c0d043bed..cefbe8220 100644 --- a/src/Analysis/Abstract/Evaluating.hs +++ b/src/Analysis/Abstract/Evaluating.hs @@ -1,5 +1,5 @@ {-# LANGUAGE DataKinds, GADTs, GeneralizedNewtypeDeriving, MultiParamTypeClasses, Rank2Types, ScopedTypeVariables, - StandaloneDeriving, TypeApplications, TypeFamilies, TypeOperators, UndecidableInstances #-} + StandaloneDeriving, TypeFamilies, TypeOperators, UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Analysis.Abstract.Evaluating ( type Evaluating diff --git a/src/Data/Syntax/Literal.hs b/src/Data/Syntax/Literal.hs index 1fb1adfda..6d2322bdd 100644 --- a/src/Data/Syntax/Literal.hs +++ b/src/Data/Syntax/Literal.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE DataKinds, DeriveAnyClass, DeriveGeneric, MultiParamTypeClasses, TypeApplications, ViewPatterns #-} +{-# LANGUAGE DataKinds, DeriveAnyClass, DeriveGeneric, MultiParamTypeClasses, ViewPatterns #-} module Data.Syntax.Literal where import Control.Arrow ((>>>)) diff --git a/src/Semantic/Util.hs b/src/Semantic/Util.hs index 3c7dc6f3b..27e968800 100644 --- a/src/Semantic/Util.hs +++ b/src/Semantic/Util.hs @@ -1,5 +1,5 @@ -- MonoLocalBinds is to silence a warning about a simplifiable constraint. -{-# LANGUAGE DataKinds, MonoLocalBinds, ScopedTypeVariables, TypeFamilies, TypeApplications, TypeOperators #-} +{-# LANGUAGE DataKinds, MonoLocalBinds, ScopedTypeVariables, TypeFamilies, TypeOperators #-} {-# OPTIONS_GHC -Wno-missing-signatures #-} module Semantic.Util where diff --git a/test/Analysis/Python/Spec.hs b/test/Analysis/Python/Spec.hs index 229ee35a3..b9046d05b 100644 --- a/test/Analysis/Python/Spec.hs +++ b/test/Analysis/Python/Spec.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE OverloadedLists, TypeApplications #-} +{-# LANGUAGE OverloadedLists, #-} module Analysis.Python.Spec (spec) where import Data.Abstract.Value diff --git a/test/Analysis/TypeScript/Spec.hs b/test/Analysis/TypeScript/Spec.hs index 4b59ecc5a..9620eaad4 100644 --- a/test/Analysis/TypeScript/Spec.hs +++ b/test/Analysis/TypeScript/Spec.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE OverloadedLists, TypeApplications #-} +{-# LANGUAGE OverloadedLists #-} module Analysis.TypeScript.Spec (spec) where import Data.Abstract.Value diff --git a/test/SpecHelpers.hs b/test/SpecHelpers.hs index 0f2350da0..10fa53f79 100644 --- a/test/SpecHelpers.hs +++ b/test/SpecHelpers.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE GADTs, ScopedTypeVariables, TypeFamilies, TypeOperators, TypeApplications #-} +{-# LANGUAGE GADTs, ScopedTypeVariables, TypeFamilies, TypeOperators #-} module SpecHelpers ( module X , diffFilePaths From 3fea455061a7f6f565515c117d5c88a7ca045a81 Mon Sep 17 00:00:00 2001 From: joshvera Date: Mon, 26 Mar 2018 12:05:54 -0400 Subject: [PATCH 2/3] typo --- test/Analysis/Python/Spec.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Analysis/Python/Spec.hs b/test/Analysis/Python/Spec.hs index b9046d05b..c5fec4f2c 100644 --- a/test/Analysis/Python/Spec.hs +++ b/test/Analysis/Python/Spec.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE OverloadedLists, #-} +{-# LANGUAGE OverloadedLists #-} module Analysis.Python.Spec (spec) where import Data.Abstract.Value From e6fce8f67d1a1950611b80c1191102c9b4b531b6 Mon Sep 17 00:00:00 2001 From: joshvera Date: Mon, 26 Mar 2018 12:20:22 -0400 Subject: [PATCH 3/3] Add it to the doctest file --- test/Doctests.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Doctests.hs b/test/Doctests.hs index b5108f932..847e646d8 100644 --- a/test/Doctests.hs +++ b/test/Doctests.hs @@ -24,4 +24,5 @@ extensions = , "RecordWildCards" , "StandaloneDeriving" , "StrictData" + , "TypeApplications" ]