Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions profile-admin.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
'purs' 'compile' '--source-globs-file' '.spago/sources.txt' +RTS '-N' '-A256m' '-n16m' '-sprofile.txt'
764,715,301,176 bytes allocated in the heap
71,684,539,216 bytes copied during GC
5,771,888,480 bytes maximum residency (8 sample(s))
57,078,368 bytes maximum slop
19290 MiB total memory in use (0 MB lost due to fragmentation)
761,228,159,336 bytes allocated in the heap
67,159,730,112 bytes copied during GC
6,254,952,296 bytes maximum residency (7 sample(s))
60,486,624 bytes maximum slop
20480 MiB total memory in use (0 MB lost due to fragmentation)

Tot time (elapsed) Avg pause Max pause
Gen 0 347 colls, 347 par 109.302s 25.584s 0.0737s 0.8975s
Gen 1 8 colls, 7 par 33.883s 6.849s 0.8561s 2.4644s
Gen 0 343 colls, 343 par 108.075s 24.970s 0.0728s 0.9448s
Gen 1 7 colls, 6 par 28.102s 6.969s 0.9955s 2.7504s

Parallel GC work balance: 87.94% (serial 0%, perfect 100%)
Parallel GC work balance: 87.91% (serial 0%, perfect 100%)

TASKS: 63 (1 bound, 62 peak workers (62 total), using -N10)
TASKS: 61 (1 bound, 60 peak workers (60 total), using -N10)

SPARKS: 7516 (7516 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)

INIT time 0.003s ( 0.156s elapsed)
MUT time 340.588s ( 94.439s elapsed)
GC time 143.185s ( 32.433s elapsed)
EXIT time 0.108s ( 0.004s elapsed)
Total time 483.883s (127.032s elapsed)
INIT time 0.003s ( 0.172s elapsed)
MUT time 349.491s ( 93.497s elapsed)
GC time 136.177s ( 31.939s elapsed)
EXIT time 0.144s ( 0.016s elapsed)
Total time 485.814s (125.624s elapsed)

Alloc rate 2,245,281,654 bytes per MUT second
Alloc rate 2,178,106,693 bytes per MUT second

Productivity 70.4% of total user, 74.3% of total elapsed
Productivity 71.9% of total user, 74.4% of total elapsed

30 changes: 15 additions & 15 deletions profile.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
'purs' 'compile' '--source-globs-file' '.spago/sources.txt' +RTS '-N' '-A256m' '-n16m' '-sprofile.txt'
1,514,670,705,400 bytes allocated in the heap
100,283,741,944 bytes copied during GC
3,311,678,824 bytes maximum residency (14 sample(s))
47,472,136 bytes maximum slop
11326 MiB total memory in use (0 MB lost due to fragmentation)
1,506,791,961,952 bytes allocated in the heap
98,435,279,688 bytes copied during GC
3,334,673,848 bytes maximum residency (13 sample(s))
47,501,584 bytes maximum slop
11887 MiB total memory in use (0 MB lost due to fragmentation)

Tot time (elapsed) Avg pause Max pause
Gen 0 693 colls, 693 par 196.375s 42.165s 0.0608s 0.5568s
Gen 1 14 colls, 13 par 37.234s 5.165s 0.3689s 0.5430s
Gen 0 690 colls, 690 par 198.872s 41.325s 0.0599s 0.6849s
Gen 1 13 colls, 12 par 34.478s 4.768s 0.3668s 0.5143s

Parallel GC work balance: 84.01% (serial 0%, perfect 100%)
Parallel GC work balance: 84.54% (serial 0%, perfect 100%)

TASKS: 68 (1 bound, 67 peak workers (67 total), using -N10)

SPARKS: 7516 (7516 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)

INIT time 0.003s ( 0.191s elapsed)
MUT time 692.332s (136.117s elapsed)
GC time 233.609s ( 47.330s elapsed)
EXIT time 0.053s ( 0.009s elapsed)
Total time 925.997s (183.648s elapsed)
INIT time 0.003s ( 0.185s elapsed)
MUT time 700.605s (133.224s elapsed)
GC time 233.350s ( 46.093s elapsed)
EXIT time 0.050s ( 0.008s elapsed)
Total time 934.007s (179.510s elapsed)

Alloc rate 2,187,780,137 bytes per MUT second
Alloc rate 2,150,702,531 bytes per MUT second

Productivity 74.8% of total user, 74.1% of total elapsed
Productivity 75.0% of total user, 74.2% of total elapsed

1 change: 1 addition & 0 deletions src/Language/PureScript/CST/Convert.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ comment :: Comment a -> Maybe C.Comment
comment = \case
Comment t
| "{-" `Text.isPrefixOf` t -> Just $ C.BlockComment $ Text.drop 2 $ Text.dropEnd 2 t
| "-- @generated" `Text.isPrefixOf` t -> Just C.PragmaGenerated
| "--" `Text.isPrefixOf` t -> Just $ C.LineComment $ Text.drop 2 t
_ -> Nothing

Expand Down
1 change: 1 addition & 0 deletions src/Language/PureScript/CodeGen/JS/Printer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ literals = mkPattern' match'
match _ = mzero

comment :: (Emit gen) => Comment -> StateT PrinterState Maybe gen
comment PragmaGenerated = return $ emit ""
comment (LineComment com) = mconcat <$> sequence
[ currentIndent
, return $ emit "//" <> emit com <> emit "\n"
Expand Down
1 change: 1 addition & 0 deletions src/Language/PureScript/Comments.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import Data.Aeson.TH (Options(..), SumEncoding(..), defaultOptions, deriveJSON)
data Comment
= LineComment Text
| BlockComment Text
| PragmaGenerated
deriving (Show, Eq, Ord, Generic)

instance NFData Comment
Expand Down
1 change: 1 addition & 0 deletions src/Language/PureScript/Docs/Convert/Single.hs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ convertComments cs = do
pure (T.unlines docs)

where
toLines (P.PragmaGenerated) = []
toLines (P.LineComment s) = [s]
toLines (P.BlockComment s) = T.lines s

Expand Down
13 changes: 9 additions & 4 deletions src/Language/PureScript/TypeChecker.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import Data.Text qualified as T

import Language.PureScript.AST
import Language.PureScript.AST.Declarations.ChainId (ChainId)
import Language.PureScript.Comments qualified as C
import Language.PureScript.Constants.Libs qualified as Libs
import Language.PureScript.Crash (internalError)
import Language.PureScript.Environment (DataDeclType(..), Environment(..), FunctionalDependency, NameKind(..), NameVisibility(..), TypeClassData(..), TypeKind(..), isDictTypeName, kindArity, makeTypeClassData, nominalRolesForKind, tyFunction)
Expand Down Expand Up @@ -251,10 +252,11 @@ checkTypeSynonyms = void . replaceAllTypeSynonyms
typeCheckAll
:: forall m
. (MonadSupply m, MonadState CheckState m, MonadError MultipleErrors m, MonadWriter MultipleErrors m)
=> ModuleName
=> Bool
-> ModuleName
-> [Declaration]
-> m [Declaration]
typeCheckAll moduleName = traverse go
typeCheckAll pragmaGenerated moduleName = traverse go
where
go :: Declaration -> m Declaration
go (DataDeclaration sa@(ss, _) dtype name args dctors) = do
Expand Down Expand Up @@ -404,7 +406,8 @@ typeCheckAll moduleName = traverse go
let nonOrphanModules = findNonOrphanModules className typeClass tys''
checkOrphanInstance dictName className tys'' nonOrphanModules
let chainId = Just ch
checkOverlappingInstance ss chainId dictName vars className typeClass tys'' nonOrphanModules
when (not pragmaGenerated) $ do
checkOverlappingInstance ss chainId dictName vars className typeClass tys'' nonOrphanModules
_ <- traverseTypeInstanceBody checkInstanceMembers body
deps'' <- (traverse . overConstraintArgs . traverse) replaceAllTypeSynonyms deps'
let dict =
Expand Down Expand Up @@ -589,7 +592,7 @@ typeCheckModule modulesExports (Module ss coms mn decls (Just exps)) =
warnAndRethrow (addHint (ErrorInModule mn)) $ do
let (decls', imports) = partitionEithers $ fromImportDecl <$> decls
modify (\s -> s { checkCurrentModule = Just mn, checkCurrentModuleImports = imports })
decls'' <- typeCheckAll mn $ ignoreWildcardsUnderCompleteTypeSignatures <$> decls'
decls'' <- typeCheckAll pragmaGenerated mn $ ignoreWildcardsUnderCompleteTypeSignatures <$> decls'
checkSuperClassesAreExported <- getSuperClassExportCheck
for_ exps $ \e -> do
checkTypesAreExported e
Expand All @@ -599,6 +602,8 @@ typeCheckModule modulesExports (Module ss coms mn decls (Just exps)) =
checkDataConstructorsAreExported e
return $ Module ss coms mn (map toImportDecl imports ++ decls'') (Just exps)
where
pragmaGenerated :: Bool
pragmaGenerated = elem C.PragmaGenerated coms

fromImportDecl
:: Declaration
Expand Down
Loading