Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Properly synify promoted list types#922

Merged
harpocrates merged 2 commits intohaskell:ghc-headfrom
harpocrates:promoted-lists
Sep 3, 2018
Merged

Properly synify promoted list types#922
harpocrates merged 2 commits intohaskell:ghc-headfrom
harpocrates:promoted-lists

Conversation

@harpocrates
Copy link
Collaborator

We reconstruct promoted list literals whenever possible. That means
that synifyType produces

'[Int, Bool, ()]

instead of

(Int ': (() ': (Bool ': ([] :: [Type]))))

We reconstruct promoted list literals whenever possible. That means
that 'synifyType' produces

   '[Int, Bool, ()]

instead of

   (Int ': (() ': (Bool ': ([] :: [Type]))))
@harpocrates
Copy link
Collaborator Author

For the Hi-Haddock branch (which uses synifyType much more), this helps quite a bit:

Before:
screen shot 2018-08-27 at 2 29 00 pm

After:
screen shot 2018-08-27 at 2 29 16 pm

/cc @sjakobi

Copy link
Member

@sjakobi sjakobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! :)

The other types are still looked at when considering whether to make
a kind signature or not.
@harpocrates harpocrates merged commit 8635e4b into haskell:ghc-head Sep 3, 2018
@harpocrates harpocrates deleted the promoted-lists branch September 3, 2018 14:38
hubot pushed a commit to ghc/ghc that referenced this pull request May 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants