Skip to content

Commit e989935

Browse files
committed
Remove Generic and NFData instances from IDE types
1 parent 5ae86b0 commit e989935

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

src/Language/PureScript/Ide/Reexports.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ data ReexportResult a
3535
= ReexportResult
3636
{ reResolved :: a
3737
, reFailed :: [(P.ModuleName, P.DeclarationRef)]
38-
} deriving (Show, Eq, Functor, Generic)
38+
} deriving (Show, Eq, Functor)
3939

40-
instance NFData a => NFData (ReexportResult a)
4140

4241
-- | Uses the passed formatter to format the resolved module, and adds possible
4342
-- failures

src/Language/PureScript/Ide/Types.hs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,59 +31,59 @@ data IdeDeclaration
3131
| IdeDeclValueOperator IdeValueOperator
3232
| IdeDeclTypeOperator IdeTypeOperator
3333
| IdeDeclModule P.ModuleName
34-
deriving (Show, Eq, Ord, Generic, NFData)
34+
deriving (Show, Eq, Ord)
3535

3636
data IdeValue = IdeValue
3737
{ _ideValueIdent :: P.Ident
3838
, _ideValueType :: P.SourceType
39-
} deriving (Show, Eq, Ord, Generic, NFData)
39+
} deriving (Show, Eq, Ord)
4040

4141
data IdeType = IdeType
4242
{ _ideTypeName :: P.ProperName 'P.TypeName
4343
, _ideTypeKind :: P.SourceType
4444
, _ideTypeDtors :: [(P.ProperName 'P.ConstructorName, P.SourceType)]
45-
} deriving (Show, Eq, Ord, Generic, NFData)
45+
} deriving (Show, Eq, Ord)
4646

4747
data IdeTypeSynonym = IdeTypeSynonym
4848
{ _ideSynonymName :: P.ProperName 'P.TypeName
4949
, _ideSynonymType :: P.SourceType
5050
, _ideSynonymKind :: P.SourceType
51-
} deriving (Show, Eq, Ord, Generic, NFData)
51+
} deriving (Show, Eq, Ord)
5252

5353
data IdeDataConstructor = IdeDataConstructor
5454
{ _ideDtorName :: P.ProperName 'P.ConstructorName
5555
, _ideDtorTypeName :: P.ProperName 'P.TypeName
5656
, _ideDtorType :: P.SourceType
57-
} deriving (Show, Eq, Ord, Generic, NFData)
57+
} deriving (Show, Eq, Ord)
5858

5959
data IdeTypeClass = IdeTypeClass
6060
{ _ideTCName :: P.ProperName 'P.ClassName
6161
, _ideTCKind :: P.SourceType
6262
, _ideTCInstances :: [IdeInstance]
63-
} deriving (Show, Eq, Ord, Generic, NFData)
63+
} deriving (Show, Eq, Ord)
6464

6565
data IdeInstance = IdeInstance
6666
{ _ideInstanceModule :: P.ModuleName
6767
, _ideInstanceName :: P.Ident
6868
, _ideInstanceTypes :: [P.SourceType]
6969
, _ideInstanceConstraints :: Maybe [P.SourceConstraint]
70-
} deriving (Show, Eq, Ord, Generic, NFData)
70+
} deriving (Show, Eq, Ord)
7171

7272
data IdeValueOperator = IdeValueOperator
7373
{ _ideValueOpName :: P.OpName 'P.ValueOpName
7474
, _ideValueOpAlias :: P.Qualified (Either P.Ident (P.ProperName 'P.ConstructorName))
7575
, _ideValueOpPrecedence :: P.Precedence
7676
, _ideValueOpAssociativity :: P.Associativity
7777
, _ideValueOpType :: Maybe P.SourceType
78-
} deriving (Show, Eq, Ord, Generic, NFData)
78+
} deriving (Show, Eq, Ord)
7979

8080
data IdeTypeOperator = IdeTypeOperator
8181
{ _ideTypeOpName :: P.OpName 'P.TypeOpName
8282
, _ideTypeOpAlias :: P.Qualified (P.ProperName 'P.TypeName)
8383
, _ideTypeOpPrecedence :: P.Precedence
8484
, _ideTypeOpAssociativity :: P.Associativity
8585
, _ideTypeOpKind :: Maybe P.SourceType
86-
} deriving (Show, Eq, Ord, Generic, NFData)
86+
} deriving (Show, Eq, Ord)
8787

8888
_IdeDeclValue :: Traversal' IdeDeclaration IdeValue
8989
_IdeDeclValue f (IdeDeclValue x) = map IdeDeclValue (f x)
@@ -131,15 +131,15 @@ makeLenses ''IdeTypeOperator
131131
data IdeDeclarationAnn = IdeDeclarationAnn
132132
{ _idaAnnotation :: Annotation
133133
, _idaDeclaration :: IdeDeclaration
134-
} deriving (Show, Eq, Ord, Generic, NFData)
134+
} deriving (Show, Eq, Ord)
135135

136136
data Annotation
137137
= Annotation
138138
{ _annLocation :: Maybe P.SourceSpan
139139
, _annExportedFrom :: Maybe P.ModuleName
140140
, _annTypeAnnotation :: Maybe P.SourceType
141141
, _annDocumentation :: Maybe Text
142-
} deriving (Show, Eq, Ord, Generic, NFData)
142+
} deriving (Show, Eq, Ord)
143143

144144
makeLenses ''Annotation
145145
makeLenses ''IdeDeclarationAnn
@@ -152,7 +152,7 @@ type TypeAnnotations = Map P.Ident P.SourceType
152152
newtype AstData a = AstData (ModuleMap (DefinitionSites a, TypeAnnotations))
153153
-- ^ SourceSpans for the definition sites of values and types as well as type
154154
-- annotations found in a module
155-
deriving (Show, Eq, Ord, Generic, NFData, Functor, Foldable)
155+
deriving (Show, Eq, Ord, Functor, Foldable)
156156

157157
data IdeLogLevel = LogDebug | LogPerf | LogAll | LogDefault | LogNone
158158
deriving (Show, Eq)
@@ -313,7 +313,7 @@ encodeImport (P.runModuleName -> mn, importType, map P.runModuleName -> qualifie
313313

314314
-- | Denotes the different namespaces a name in PureScript can reside in.
315315
data IdeNamespace = IdeNSValue | IdeNSType | IdeNSModule
316-
deriving (Show, Eq, Ord, Generic, NFData)
316+
deriving (Show, Eq, Ord)
317317

318318
instance FromJSON IdeNamespace where
319319
parseJSON = Aeson.withText "Namespace" $ \case
@@ -324,4 +324,4 @@ instance FromJSON IdeNamespace where
324324

325325
-- | A name tagged with a namespace
326326
data IdeNamespaced = IdeNamespaced IdeNamespace Text
327-
deriving (Show, Eq, Ord, Generic, NFData)
327+
deriving (Show, Eq, Ord)

0 commit comments

Comments
 (0)