Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile-time performance problem in AI.hs #7

Open
cronburg opened this issue Jul 28, 2017 · 1 comment
Open

Compile-time performance problem in AI.hs #7

cronburg opened this issue Jul 28, 2017 · 1 comment
Assignees

Comments

@cronburg
Copy link
Collaborator

Since adding generation of the internal AST representation of a pads description to the output of the quasiquoter, the AI example takes significantly longer to build (minutes). Offending commit: c535c18

But when I try building with profiling information enabled, the build takes on the order of seconds...

@cronburg cronburg self-assigned this Jul 28, 2017
@cronburg
Copy link
Collaborator Author

Minimal PADS example:

[pads| data Entry = Entry { host :: (Int, '.', Int, '.', Int, '.', Int) } |]

which triggers the following GHC hang / panic:

[27 of 28] Compiling Examples.AI      ( Examples/AI.hs, .stack-work/dist
xamples-tmp/Examples/AI.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 8.0.2 for x86_64-unknown-linux):
        Simplifier ticks exhausted
  When trying UnfoldingDone $wlvl_sg2Ag
  To increase the limit, use -fsimpl-tick-factor=N (default 100)
  If you need to do this, let GHC HQ know, and what factor you needed
  To see detailed counts use -ddump-simpl-stats
  Total ticks: 6861563

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

It appears to have something to do with nesting a tuple type inside of a record making it difficult for GHC to deduce the type of the entry_parseM function.

@cronburg cronburg changed the title Compile-time performance with AST generation Compile-time performance problem in AI.hs Sep 30, 2017
cronburg added a commit that referenced this issue Oct 12, 2017
…and f_md of a tuple, and temporary fix for the AI.hs hanging problem of issue #7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant