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

Don't barf on 'HsSpliceTy' #745

Merged
merged 1 commit into from
Feb 6, 2018

Conversation

harpocrates
Copy link
Collaborator

This handles HsSpliceTys by replacing them with what they expand to. IIUC everything that is happening, renameHsSpliceTy should not be able to fail for the inputs we feed it from GHC.

This fixes #574.


Troublesome snippet from secret-sharing that was causing the error (FYI, this is primeField):

-- | A finite prime field. All computations are performed in this field.
newtype FField = FField { number :: $(primeField $ fromIntegral 1021) }
  deriving(Show,Read,Ord,Eq,Num,Fractional,Generic,Typeable,FiniteField)

Snippet of Haddock produced after this PR

screen shot 2018-02-05 at 1 51 24 pm

This handles 'HsSpliceTy's by replacing them with what they expand to.
IIUC everything that is happening, 'renameHsSpliceTy' should not be
able to fail for the inputs we feed it from GHC.

This fixes haskell#574.
@alexbiehl
Copy link
Member

Nice! Thanks Alec (btw. could you open your next PRs to the GHC-8.4 branch? It will become the default branch once ghc-8.4.1 is released)

@alexbiehl alexbiehl merged commit 76d0f9b into haskell:master Feb 6, 2018
alexbiehl pushed a commit that referenced this pull request Feb 6, 2018
This handles 'HsSpliceTy's by replacing them with what they expand to.
IIUC everything that is happening, 'renameHsSpliceTy' should not be
able to fail for the inputs we feed it from GHC.

This fixes #574.
@philderbeast
Copy link
Contributor

Is there a chance that this small fix could be added to the GHC-8.2 branch too please? I'm currently depending on uom-plugin that fails to build on the GHC-8.4 branch and I'm hitting the HsSpliceTy problem using stackage lts-11.8 when building docs.

adamgundry/uom-plugin#43
GlideAngle/flare-timing#31

sjakobi pushed a commit to sjakobi/haddock that referenced this pull request Jun 10, 2018
This handles 'HsSpliceTy's by replacing them with what they expand to.
IIUC everything that is happening, 'renameHsSpliceTy' should not be
able to fail for the inputs we feed it from GHC.

This fixes haskell#574.

(cherry picked from commit 1446450)
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.

3 participants