Skip to content

WIP: Ghc 8.4 #1330

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

Closed
wants to merge 2 commits into from
Closed

WIP: Ghc 8.4 #1330

wants to merge 2 commits into from

Conversation

phadej
Copy link
Contributor

@phadej phadej commented Jun 9, 2018

I hopefully did most of the boring parts.

Current state:

[117 of 121] Compiling Language.Haskell.Liquid.Model ( src/Language/Haskell/Liquid/Model.hs, /home/ogre/Documents/other-haskell/liquidhaskell/dist-newstyle/build/x86_64-linux/ghc-8.4.3/liquidhaskell-0.8.2.4/build/Language/Haskell/Liquid/Model.o )

src/Language/Haskell/Liquid/Model.hs:332:31: error:
    • Couldn't match type ‘(TyThing, Fixity, [ClsInst], [FamInst],
                            GHC.SDoc)’
                     with ‘(a0, b0, [ClsInst], d0)’

@@ -3,9 +3,12 @@

packages: .
./liquid-fixpoint
./text-format
Copy link
Contributor Author

Choose a reason for hiding this comment

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

haskell/text-format#21 local.

Let's see what Hackage Trustees can do with that.

@ranjitjhala
Copy link
Member

Sweet -- thanks for starting this @phadej -- have some cycles now so will try to wrap it up soon!

@phadej
Copy link
Contributor Author

phadej commented Jun 27, 2018

@ranjitjhala no worries, thank @nikivazou for mentioning this task in her ZuriHac-keynote :)

I'll return to text-format issue next week.

@ranjitjhala
Copy link
Member

Ok, I got this to build properly etc. and addressed the TODO GHC-8.4 but it appears to hit this

rjhala@borscht ~/r/s/liquidhaskell (phadej-ghc-8.4)> stack exec -- liquid tests/pos/Abs.hs
LiquidHaskell Version 0.8.4.0, Git revision 3f8facc34af23e623603b26526e7074c88cdbb5a (dirty)
Copyright 2013-18 Regents of the University of California. All Rights Reserved.

liquid:
lookupSymbol failed in relocateSection (RELOC_GOT)
/Users/rjhala/.stack/programs/x86_64-osx/ghc-8.4.3/lib/ghc-8.4.3/integer-gmp-1.0.2.0/HSinteger-gmp-1.0.2.0.o: unknown symbol `___gmp_rands'
liquid: liquid: unable to load package `integer-gmp-1.0.2.0'

which AFAICT appears to be this GHC bug ...

https://ghc.haskell.org/trac/ghc/ticket/15105

So as directed above I simply deleted the file

/Users/rjhala/.stack/programs/x86_64-osx/ghc-8.4.3/lib/ghc-8.4.3/integer-gmp-1.0.2.0/HSinteger-gmp-1.0.2.0.o 

After this I am stuck on the below:


In doing so, I find that I can no longer resolve
(i.e. get the TyThing, and hence TyCon)
corresponding to the name:

GHC.Prim.Int#

It seems like in older versions, we had

λ> :i GHC.Prim.Int#
data GHC.Prim.Int# -- Defined in ‘GHC.Prim’
λ> :k GHC.Prim.Int#
GHC.Prim.Int# :: #

but in GHC 8.4 this is changed so:

λ> :i GHC.Prim.Int#
data GHC.Prim.Int# :: TYPE 'GHC.Types.IntRep
-- Defined in ‘GHC.Prim’
λ> :k GHC.Prim.Int#
GHC.Prim.Int# :: TYPE 'GHC.Types.IntRep

Does the above indicate that in fact, GHC.Prim.Int#
DOES NOT (any longer) correspond to a TyCon? If so,
what does it correspond to? i.e. how is it represented
as a Type in GHC?

[This is in the branch phadej-ghc-8.4]

@ranjitjhala
Copy link
Member

Closing this as its folded into #1353

@ranjitjhala ranjitjhala closed this Oct 6, 2018
@ranjitjhala ranjitjhala mentioned this pull request Oct 6, 2018
23 tasks
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

Successfully merging this pull request may close these issues.

2 participants