on master help sign in
Merge pull request #3399 from enolan/hot-comments
4615cffAhmad Salim Al-Sibahi
src/Idris/AbsSyntaxTree.hs−26
@@ -320,7 +320,6 @@ data SizeChange = Smaller | Same | Bigger | Unknown
320 deriving (Show, Eq, Generic)
320 deriving (Show, Eq, Generic)
321{-!
321{-!
322deriving instance Binary SizeChange
322deriving instance Binary SizeChange
323−deriving instance NFData SizeChange
324!-}
323!-}
325
324
326type SCGEntry = (Name, [Maybe (Int, SizeChange)])
325type SCGEntry = (Name, [Maybe (Int, SizeChange)])
@@ -333,7 +332,6 @@ data CGInfo = CGInfo {
333 } deriving (Show, Generic)
332 } deriving (Show, Generic)
334{-!
333{-!
335deriving instance Binary CGInfo
334deriving instance Binary CGInfo
336−deriving instance NFData CGInfo
337!-}
335!-}
338
336
339primDefs = [ sUN "unsafePerformPrimIO"
337primDefs = [ sUN "unsafePerformPrimIO"
@@ -428,9 +426,6 @@ throwError = Trans.lift . throwE
428data Codegen = Via IRFormat String
426data Codegen = Via IRFormat String
429 | Bytecode
427 | Bytecode
430 deriving (Show, Eq, Generic)
428 deriving (Show, Eq, Generic)
431−{-!
432−deriving instance NFData Codegen
433−!-}
434
429
435data IRFormat = IBCFormat | JSONFormat deriving (Show, Eq, Generic)
430data IRFormat = IBCFormat | JSONFormat deriving (Show, Eq, Generic)
436
431
@@ -567,7 +562,6 @@ data Fixity = Infixl { prec :: Int }
567 deriving (Eq, Generic)
562 deriving (Eq, Generic)
568{-!
563{-!
569deriving instance Binary Fixity
564deriving instance Binary Fixity
570−deriving instance NFData Fixity
571!-}
565!-}
572
566
573instance Show Fixity where
567instance Show Fixity where
@@ -584,7 +578,6 @@ instance Show FixDecl where
584
578
585{-!
579{-!
586deriving instance Binary FixDecl
580deriving instance Binary FixDecl
587−deriving instance NFData FixDecl
588!-}
581!-}
589
582
590instance Ord FixDecl where
583instance Ord FixDecl where
@@ -595,7 +588,6 @@ data Static = Static | Dynamic
595 deriving (Show, Eq, Data, Generic, Typeable)
588 deriving (Show, Eq, Data, Generic, Typeable)
596{-!
589{-!
597deriving instance Binary Static
590deriving instance Binary Static
598−deriving instance NFData Static
599!-}
591!-}
600
592
601-- ^ Mark bindings with their explicitness, and laziness
593-- ^ Mark bindings with their explicitness, and laziness
@@ -620,7 +612,6 @@ data Plicity = Imp { pargopts :: [ArgOpt]
620
612
621{-!
613{-!
622deriving instance Binary Plicity
614deriving instance Binary Plicity
623−deriving instance NFData Plicity
624!-}
615!-}
625
616
626is_scoped :: Plicity -> Maybe ImplicitInfo
617is_scoped :: Plicity -> Maybe ImplicitInfo
@@ -664,7 +655,6 @@ data FnOpt = Inlinable -- ^ always evaluate when simplifying
664 deriving (Show, Eq, Generic)
655 deriving (Show, Eq, Generic)
665{-!
656{-!
666deriving instance Binary FnOpt
657deriving instance Binary FnOpt
667−deriving instance NFData FnOpt
668!-}
658!-}
669
659
670type FnOpts = [FnOpt]
660type FnOpts = [FnOpt]
@@ -767,7 +757,6 @@ data PDecl' t
767 deriving (Functor, Generic)
757 deriving (Functor, Generic)
768{-!
758{-!
769deriving instance Binary PDecl'
759deriving instance Binary PDecl'
770−deriving instance NFData PDecl'
771!-}
760!-}
772
761
773-- | The set of source directives
762-- | The set of source directives
@@ -839,7 +828,6 @@ data PClause' t = PClause FC Name t [t] t [PDecl' t] -- ^ A
839 deriving (Functor, Generic)
828 deriving (Functor, Generic)
840{-!
829{-!
841deriving instance Binary PClause'
830deriving instance Binary PClause'
842−deriving instance NFData PClause'
843!-}
831!-}
844
832
845-- | Data declaration
833-- | Data declaration
@@ -869,7 +857,6 @@ mapPDataFC f g (PLaterdecl n nfc tycon) =
869 PLaterdecl n (g nfc) (mapPTermFC f g tycon)
857 PLaterdecl n (g nfc) (mapPTermFC f g tycon)
870{-!
858{-!
871deriving instance Binary PData'
859deriving instance Binary PData'
872−deriving instance NFData PData'
873!-}
860!-}
874
861
875-- Handy to get a free function for applying PTerm -> PTerm functions
862-- Handy to get a free function for applying PTerm -> PTerm functions
@@ -1174,7 +1161,6 @@ mapPTermFC f g (PQuoteName n x fc) = PQuoteName n x (g fc)
1174
1161
1175{-!
1162{-!
1176dg instance Binary PTerm
1163dg instance Binary PTerm
1177−deriving instance NFData PTerm
1178!-}
1164!-}
1179
1165
1180mapPT :: (PTerm -> PTerm) -> PTerm -> PTerm
1166mapPT :: (PTerm -> PTerm) -> PTerm -> PTerm
@@ -1238,7 +1224,6 @@ data PTactic' t = Intro [Name] | Intros | Focus Name
1238 deriving (Show, Eq, Functor, Foldable, Traversable, Data, Generic, Typeable)
1224 deriving (Show, Eq, Functor, Foldable, Traversable, Data, Generic, Typeable)
1239{-!
1225{-!
1240deriving instance Binary PTactic'
1226deriving instance Binary PTactic'
1241−deriving instance NFData PTactic'
1242!-}
1227!-}
1243instance Sized a => Sized (PTactic' a) where
1228instance Sized a => Sized (PTactic' a) where
1244 size (Intro nms) = 1 + size nms
1229 size (Intro nms) = 1 + size nms
@@ -1285,7 +1270,6 @@ data PDo' t = DoExp FC t
1285 deriving (Eq, Functor, Data, Generic, Typeable)
1270 deriving (Eq, Functor, Data, Generic, Typeable)
1286{-!
1271{-!
1287deriving instance Binary PDo'
1272deriving instance Binary PDo'
1288−deriving instance NFData PDo'
1289!-}
1273!-}
1290
1274
1291instance Sized a => Sized (PDo' a) where
1275instance Sized a => Sized (PDo' a) where
@@ -1339,7 +1323,6 @@ instance Sized a => Sized (PArg' a) where
1339
1323
1340{-!
1324{-!
1341deriving instance Binary PArg'
1325deriving instance Binary PArg'
1342−deriving instance NFData PArg'
1343!-}
1326!-}
1344
1327
1345pimp n t mach = PImp 1 mach [] n t
1328pimp n t mach = PImp 1 mach [] n t
@@ -1421,7 +1404,6 @@ data InterfaceInfo = CI {
1421 } deriving (Show, Generic)
1404 } deriving (Show, Generic)
1422{-!
1405{-!
1423deriving instance Binary InterfaceInfo
1406deriving instance Binary InterfaceInfo
1424−deriving instance NFData InterfaceInfo
1425!-}
1407!-}
1426
1408
1427-- Record data
1409-- Record data
@@ -1442,7 +1424,6 @@ data FnInfo = FnInfo { fn_params :: [Int] }
1442 deriving (Show, Generic)
1424 deriving (Show, Generic)
1443{-!
1425{-!
1444deriving instance Binary FnInfo
1426deriving instance Binary FnInfo
1445−deriving instance NFData FnInfo
1446!-}
1427!-}
1447
1428
1448data OptInfo = Optimise {
1429data OptInfo = Optimise {
@@ -1451,7 +1432,6 @@ data OptInfo = Optimise {
1451 } deriving (Show, Generic)
1432 } deriving (Show, Generic)
1452{-!
1433{-!
1453deriving instance Binary OptInfo
1434deriving instance Binary OptInfo
1454−deriving instance NFData OptInfo
1455!-}
1435!-}
1456
1436
1457-- | Syntactic sugar info
1437-- | Syntactic sugar info
@@ -1468,7 +1448,6 @@ data DSL' t = DSL {
1468 } deriving (Show, Functor, Generic)
1448 } deriving (Show, Functor, Generic)
1469{-!
1449{-!
1470deriving instance Binary DSL'
1450deriving instance Binary DSL'
1471−deriving instance NFData DSL'
1472!-}
1451!-}
1473
1452
1474type DSL = DSL' PTerm
1453type DSL = DSL' PTerm
@@ -1479,7 +1458,6 @@ data SynContext = PatternSyntax
1479 deriving (Show, Generic)
1458 deriving (Show, Generic)
1480{-!
1459{-!
1481deriving instance Binary SynContext
1460deriving instance Binary SynContext
1482−deriving instance NFData SynContext
1483!-}
1461!-}
1484
1462
1485data Syntax = Rule [SSymbol] PTerm SynContext
1463data Syntax = Rule [SSymbol] PTerm SynContext
@@ -1499,7 +1477,6 @@ syntaxSymbols (Rule ss _ _) = ss
1499syntaxSymbols (DeclRule ss _) = ss
1477syntaxSymbols (DeclRule ss _) = ss
1500{-!
1478{-!
1501deriving instance Binary Syntax
1479deriving instance Binary Syntax
1502−deriving instance NFData Syntax
1503!-}
1480!-}
1504
1481
1505data SSymbol = Keyword Name
1482data SSymbol = Keyword Name
@@ -1512,7 +1489,6 @@ data SSymbol = Keyword Name
1512
1489
1513{-!
1490{-!
1514deriving instance Binary SSymbol
1491deriving instance Binary SSymbol
1515−deriving instance NFData SSymbol
1516!-}
1492!-}
1517
1493
1518newtype SyntaxRules = SyntaxRules { syntaxRulesList :: [Syntax] }
1494newtype SyntaxRules = SyntaxRules { syntaxRulesList :: [Syntax] }
@@ -1572,7 +1548,6 @@ data Using = UImplicit Name PTerm
1572 deriving (Show, Eq, Data, Generic, Typeable)
1548 deriving (Show, Eq, Data, Generic, Typeable)
1573{-!
1549{-!
1574deriving instance Binary Using
1550deriving instance Binary Using
1575−deriving instance NFData Using
1576!-}
1551!-}
1577
1552
1578data SyntaxInfo = Syn {
1553data SyntaxInfo = Syn {
@@ -1595,7 +1570,6 @@ data SyntaxInfo = Syn {
1595 , withAppAllowed :: Bool
1570 , withAppAllowed :: Bool
1596 } deriving (Show, Generic)
1571 } deriving (Show, Generic)
1597{-!
1572{-!
1598−deriving instance NFData SyntaxInfo
1599deriving instance Binary SyntaxInfo
1573deriving instance Binary SyntaxInfo
1600!-}
1574!-}
1601
1575
src/Idris/Core/CaseTree.hs−2
@@ -50,7 +50,6 @@ data SC' t = Case CaseType Name [CaseAlt' t] -- ^ invariant: lowest tags first
50 deriving (Eq, Ord, Functor, Generic)
50 deriving (Eq, Ord, Functor, Generic)
51{-!
51{-!
52deriving instance Binary SC'
52deriving instance Binary SC'
53−deriving instance NFData SC'
54!-}
53!-}
55
54
56data CaseType = Updatable | Shared
55data CaseType = Updatable | Shared
@@ -66,7 +65,6 @@ data CaseAlt' t = ConCase Name Int [Name] !(SC' t)
66 deriving (Show, Eq, Ord, Functor, Generic)
65 deriving (Show, Eq, Ord, Functor, Generic)
67{-!
66{-!
68deriving instance Binary CaseAlt'
67deriving instance Binary CaseAlt'
69−deriving instance NFData CaseAlt'
70!-}
68!-}
71
69
72type CaseAlt = CaseAlt' Term
70type CaseAlt = CaseAlt' Term
src/Idris/Core/Evaluate.hs−18
@@ -757,15 +757,6 @@ deriving instance Binary CaseInfo
757{-!
757{-!
758deriving instance Binary CaseDefs
758deriving instance Binary CaseDefs
759!-}
759!-}
760−{-!
761−deriving instance NFData Def
762−!-}
763−{-!
764−deriving instance NFData CaseInfo
765−!-}
766−{-!
767−deriving instance NFData CaseDefs
768−!-}
769
760
770instance Show Def where
761instance Show Def where
771 show (Function ty tm) = "Function: " ++ show (ty, tm)
762 show (Function ty tm) = "Function: " ++ show (ty, tm)
@@ -794,9 +785,6 @@ instance Show Def where
794
785
795data Accessibility = Hidden | Public | Frozen | Private
786data Accessibility = Hidden | Public | Frozen | Private
796 deriving (Eq, Ord, Generic)
787 deriving (Eq, Ord, Generic)
797−{-!
798−deriving instance NFData Accessibility
799−!-}
800
788
801instance Show Accessibility where
789instance Show Accessibility where
802 show Public = "public export"
790 show Public = "public export"
@@ -813,17 +801,11 @@ data Totality = Total [Int] -- ^ well-founded arguments
813 | Unchecked
801 | Unchecked
814 | Generated
802 | Generated
815 deriving (Eq, Generic)
803 deriving (Eq, Generic)
816−{-!
817−deriving instance NFData Totality
818−!-}
819
804
820-- | Reasons why a function may not be total
805-- | Reasons why a function may not be total
821data PReason = Other [Name] | Itself | NotCovering | NotPositive | UseUndef Name
806data PReason = Other [Name] | Itself | NotCovering | NotPositive | UseUndef Name
822 | ExternalIO | BelieveMe | Mutual [Name] | NotProductive
807 | ExternalIO | BelieveMe | Mutual [Name] | NotProductive
823 deriving (Show, Eq, Generic)
808 deriving (Show, Eq, Generic)
824−{-!
825−deriving instance NFData PReason
826−!-}
827
809
828instance Show Totality where
810instance Show Totality where
829 show (Total args)= "Total" -- ++ show args ++ " decreasing arguments"
811 show (Total args)= "Total" -- ++ show args ++ " decreasing arguments"
src/Idris/Core/TT.hs−23
@@ -182,7 +182,6 @@ fileFC s = FileFC s
182
182
183{-!
183{-!
184deriving instance Binary FC
184deriving instance Binary FC
185−deriving instance NFData FC
186!-}
185!-}
187
186
188instance Sized FC where
187instance Sized FC where
@@ -246,7 +245,6 @@ data Provenance = ExpectedType
246 | SourceTerm Term
245 | SourceTerm Term
247 deriving (Show, Eq, Data, Generic, Typeable)
246 deriving (Show, Eq, Data, Generic, Typeable)
248{-!
247{-!
249−deriving instance NFData Err
250deriving instance Binary Err
248deriving instance Binary Err
251!-}
249!-}
252
250
@@ -344,10 +342,6 @@ instance Alternative TC where
344 empty = mzero
342 empty = mzero
345 (<|>) = mplus
343 (<|>) = mplus
346
344
347−{-!
348−deriving instance NFData Err
349−!-}
350−
351instance Sized ErrorReportPart where
345instance Sized ErrorReportPart where
352 size (TextPart msg) = 1 + length msg
346 size (TextPart msg) = 1 + length msg
353 size (TermPart t) = 1 + size t
347 size (TermPart t) = 1 + size t
@@ -499,7 +493,6 @@ caseName _ = False
499
493
500{-!
494{-!
501deriving instance Binary Name
495deriving instance Binary Name
502−deriving instance NFData Name
503!-}
496!-}
504
497
505data SpecialName = WhereN !Int !Name !Name
498data SpecialName = WhereN !Int !Name !Name
@@ -514,7 +507,6 @@ data SpecialName = WhereN !Int !Name !Name
514 deriving (Eq, Ord, Data, Generic, Typeable)
507 deriving (Eq, Ord, Data, Generic, Typeable)
515{-!
508{-!
516deriving instance Binary SpecialName
509deriving instance Binary SpecialName
517−deriving instance NFData SpecialName
518!-}
510!-}
519
511
520sInstanceN :: Name -> [String] -> SpecialName
512sInstanceN :: Name -> [String] -> SpecialName
@@ -695,11 +687,6 @@ intTyName (ITChar) = "Char"
695
687
696data ArithTy = ATInt IntTy | ATFloat -- TODO: Float vectors https://github.com/idris-lang/Idris-dev/issues/1723
688data ArithTy = ATInt IntTy | ATFloat -- TODO: Float vectors https://github.com/idris-lang/Idris-dev/issues/1723
697 deriving (Show, Eq, Ord, Data, Generic, Typeable)
689 deriving (Show, Eq, Ord, Data, Generic, Typeable)
698−{-!
699−deriving instance NFData IntTy
700−deriving instance NFData NativeTy
701−deriving instance NFData ArithTy
702−!-}
703
690
704instance Pretty ArithTy OutputAnnotation where
691instance Pretty ArithTy OutputAnnotation where
705 pretty (ATInt ITNative) = text "Int"
692 pretty (ATInt ITNative) = text "Int"
@@ -752,7 +739,6 @@ instance Eq Const where
752
739
753{-!
740{-!
754deriving instance Binary Const
741deriving instance Binary Const
755−deriving instance NFData Const
756!-}
742!-}
757
743
758isTypeConst :: Const -> Bool
744isTypeConst :: Const -> Bool
@@ -850,7 +836,6 @@ instance Pretty Raw OutputAnnotation where
850
836
851{-!
837{-!
852deriving instance Binary Raw
838deriving instance Binary Raw
853−deriving instance NFData Raw
854!-}
839!-}
855
840
856data ImplicitInfo = Impl { tcinstance :: Bool, toplevel_imp :: Bool,
841data ImplicitInfo = Impl { tcinstance :: Bool, toplevel_imp :: Bool,
@@ -859,7 +844,6 @@ data ImplicitInfo = Impl { tcinstance :: Bool, toplevel_imp :: Bool,
859
844
860{-!
845{-!
861deriving instance Binary ImplicitInfo
846deriving instance Binary ImplicitInfo
862−deriving instance NFData ImplicitInfo
863!-}
847!-}
864
848
865-- The type parameter `b` will normally be something like `TT Name` or just
849-- The type parameter `b` will normally be something like `TT Name` or just
@@ -910,7 +894,6 @@ data Binder b = Lam { binderTy :: !b {-^ type annotation for bound variable-}
910 deriving (Show, Eq, Ord, Functor, Foldable, Traversable, Data, Generic, Typeable)
894 deriving (Show, Eq, Ord, Functor, Foldable, Traversable, Data, Generic, Typeable)
911{-!
895{-!
912deriving instance Binary Binder
896deriving instance Binary Binder
913−deriving instance NFData Binder
914!-}
897!-}
915
898
916instance Sized a => Sized (Binder a) where
899instance Sized a => Sized (Binder a) where
@@ -953,9 +936,6 @@ internalNS = "(internal)"
953data UExp = UVar String Int -- ^ universe variable, with source file to disambiguate
936data UExp = UVar String Int -- ^ universe variable, with source file to disambiguate
954 | UVal Int -- ^ explicit universe level
937 | UVal Int -- ^ explicit universe level
955 deriving (Eq, Ord, Data, Generic, Typeable)
938 deriving (Eq, Ord, Data, Generic, Typeable)
956−{-!
957−deriving instance NFData UExp
958−!-}
959
939
960instance Sized UExp where
940instance Sized UExp where
961 size _ = 1
941 size _ = 1
@@ -995,7 +975,6 @@ data NameType = Bound
995 deriving (Show, Ord, Data, Generic, Typeable)
975 deriving (Show, Ord, Data, Generic, Typeable)
996{-!
976{-!
997deriving instance Binary NameType
977deriving instance Binary NameType
998−deriving instance NFData NameType
999!-}
978!-}
1000
979
1001instance Sized NameType where
980instance Sized NameType where
@@ -1035,7 +1014,6 @@ data TT n = P NameType n (TT n) -- ^ named references with type
1035 deriving (Ord, Functor, Data, Generic, Typeable)
1014 deriving (Ord, Functor, Data, Generic, Typeable)
1036{-!
1015{-!
1037deriving instance Binary TT
1016deriving instance Binary TT
1038−deriving instance NFData TT
1039!-}
1017!-}
1040
1018
1041class TermSize a where
1019class TermSize a where
@@ -1109,7 +1087,6 @@ data TypeInfo = TI { con_names :: [Name],
1109 deriving (Show, Generic)
1087 deriving (Show, Generic)
1110{-!
1088{-!
1111deriving instance Binary TypeInfo
1089deriving instance Binary TypeInfo
1112−deriving instance NFData TypeInfo
1113!-}
1090!-}
1114
1091
1115instance Eq n => Eq (TT n) where
1092instance Eq n => Eq (TT n) where