on master help sign in
remove use of DeriveAnyClass
commit8579263ab37b5884ce1da79c41c3f6d7e56c7afa authorRui Barreiro <rui.barreiro@gmail.com> dateWed 17 May 2017, 07:40 (9 years ago) parentb5715bf
2 files changed+3−32
src/IRTS/JavaScript/Codegen.hs+2−4 src/IRTS/JavaScript/LangTransforms.hs+1−28
src/IRTS/JavaScript/Codegen.hs+2−4
@@ -12,7 +12,6 @@ module IRTS.JavaScript.Codegen( codegenJs
1212 , CGStats(..)
1313 ) where
1414
15−import Control.DeepSeq
1615import Idris.Core.TT
1716import IRTS.CodegenCommon
1817import IRTS.JavaScript.AST
@@ -85,10 +84,10 @@ codegenJs conf ci =
8584 else pure ()
8685 let defs = Map.fromList $ liftDecls ci
8786 let used = Map.elems $ used_defs defs [sMN 0 "runMain"]
88− used `deepseq` if debug then
87+ if debug then
8988 do
90− putStrLn $ "Finished calculating used"
9189 writeFile (outputFile ci ++ ".LDeclsDebug") $ (unlines $ intersperse "" $ map show used) ++ "\n\n\n"
90+ putStrLn $ "Finished calculating used"
9291 else pure ()
9392
9493 let (out, stats) = doCodegen conf defs used
@@ -99,7 +98,6 @@ codegenJs conf ci =
9998 else return ""
10099
101100
102− out `deepseq` if debug then putStrLn $ "Finished generating code" else pure ()
103101 includes <- get_includes $ includes ci
104102 TIO.writeFile (outputFile ci) $ T.concat [ header conf
105103 , "\"use strict\";\n\n"
src/IRTS/JavaScript/LangTransforms.hs+1−28
@@ -5,7 +5,7 @@ Copyright :
55License : BSD3
66Maintainer : The Idris Community.
77-}
8−{-# LANGUAGE DeriveAnyClass, DeriveDataTypeable, DeriveGeneric,
8+{-# LANGUAGE DeriveDataTypeable, DeriveGeneric,
99 FlexibleInstances, OverloadedStrings, StandaloneDeriving #-}
1010
1111module IRTS.JavaScript.LangTransforms( used_defs
@@ -29,7 +29,6 @@ import IRTS.Lang
2929import Data.Data
3030import Data.Generics.Uniplate.Data
3131import GHC.Generics (Generic)
32−import Idris.Core.DeepSeq
3332
3433deriving instance Typeable (LAlt' LExp)
3534deriving instance Data (LAlt' LExp)
@@ -48,32 +47,6 @@ deriving instance Data LDecl
4847deriving instance Typeable LOpt
4948deriving instance Data LOpt
5049
51−deriving instance Generic LDecl
52−deriving instance NFData LDecl
53−deriving instance Generic LOpt
54−deriving instance NFData LOpt
55−deriving instance Generic LExp
56−deriving instance NFData LExp
57−deriving instance NFData PrimFn
58−deriving instance Generic LVar
59−deriving instance NFData LVar
60−deriving instance NFData (LAlt' LExp)
61−deriving instance Generic (LAlt' e)
62−deriving instance NFData FDesc
63−deriving instance Generic FDesc
64−
65−{-
66−deriving instance NFData FC
67−deriving instance NFData FC'
68−deriving instance NFData SpecialName
69−deriving instance NFData Name
70−deriving instance NFData ArithTy
71−deriving instance NFData IntTy
72−deriving instance NFData NativeTy
73−deriving instance NFData Const
74−deriving instance NFData CaseType
75−-}
76−
7750
7851restrictKeys :: Ord k => Map k a -> Set k -> Map k a
7952restrictKeys m s = Map.filterWithKey (\k _ -> k `Set.member` s) m