on master help sign in
Add SCC annotations for compiler profiling / benchmarking.
commit91f35471e4c33121e8e3e597aa279064b822e707 authorJustin Manley <manleyjster@gmail.com> dateFri 22 Jul 2016, 18:38 (10 years ago) parent0685df0
1 file changed+4−4
src/Compile.hs+4−4
src/Compile.hs+4−4
@@ -36,7 +36,7 @@ compile packageName canonicalImports interfaces source =
3636 do
3737 -- Parse the source code
3838 validModule <-
39− Result.format Error.Syntax $
39+ Result.format Error.Syntax $ {-# SCC parsing #-}
4040 Parse.program packageName (getOpTable interfaces) source
4141
4242 -- Canonicalize all variables, pinning down where they came from.
@@ -45,7 +45,7 @@ compile packageName canonicalImports interfaces source =
4545
4646 -- Run type inference on the program.
4747 types <-
48− Result.from Error.Type $
48+ Result.from Error.Type $ {-# SCC type_inference #-}
4949 TI.infer interfaces canonicalModule
5050
5151 -- One last round of checks
@@ -55,11 +55,11 @@ compile packageName canonicalImports interfaces source =
5555 Can.toSortedDefs (Module.program (Module.info canonicalModule))
5656
5757 tagDict <-
58− Result.format Error.Pattern $
58+ Result.format Error.Pattern $ {-# SCC exhaustiveness #-}
5959 Nitpick.patternMatches interfaces canonicalModule
6060
6161 -- Do some basic optimizations
62− let optimisedDefs =
62+ let optimisedDefs = {-# SCC optimization #-}
6363 Optimize.optimize tagDict (Module.name canonicalModule) canonicalDefs
6464
6565 -- Add the real list of types