on master help sign in
Add SCC annotations for compiler profiling / benchmarking.
91f3547Justin Manley
src/Compile.hs+4−4
@@ -36,7 +36,7 @@ compile packageName canonicalImports interfaces source =
36 do
36 do
37 -- Parse the source code
37 -- Parse the source code
38 validModule <-
38 validModule <-
39− Result.format Error.Syntax $
39+ Result.format Error.Syntax $ {-# SCC parsing #-}
40 Parse.program packageName (getOpTable interfaces) source
40 Parse.program packageName (getOpTable interfaces) source
41
41
42 -- Canonicalize all variables, pinning down where they came from.
42 -- Canonicalize all variables, pinning down where they came from.
@@ -45,7 +45,7 @@ compile packageName canonicalImports interfaces source =
45
45
46 -- Run type inference on the program.
46 -- Run type inference on the program.
47 types <-
47 types <-
48− Result.from Error.Type $
48+ Result.from Error.Type $ {-# SCC type_inference #-}
49 TI.infer interfaces canonicalModule
49 TI.infer interfaces canonicalModule
50
50
51 -- One last round of checks
51 -- One last round of checks
@@ -55,11 +55,11 @@ compile packageName canonicalImports interfaces source =
55 Can.toSortedDefs (Module.program (Module.info canonicalModule))
55 Can.toSortedDefs (Module.program (Module.info canonicalModule))
56
56
57 tagDict <-
57 tagDict <-
58− Result.format Error.Pattern $
58+ Result.format Error.Pattern $ {-# SCC exhaustiveness #-}
59 Nitpick.patternMatches interfaces canonicalModule
59 Nitpick.patternMatches interfaces canonicalModule
60
60
61 -- Do some basic optimizations
61 -- Do some basic optimizations
62− let optimisedDefs =
62+ let optimisedDefs = {-# SCC optimization #-}
63 Optimize.optimize tagDict (Module.name canonicalModule) canonicalDefs
63 Optimize.optimize tagDict (Module.name canonicalModule) canonicalDefs
64
64
65 -- Add the real list of types
65 -- Add the real list of types