GaloisInc / macaw

Open source binary analysis tools.
BSD 3-Clause "New" or "Revised" License
208 stars 21 forks source link

GHC 8.8 support #106

Closed robdockins closed 4 years ago

robdockins commented 4 years ago

GHC 8.8 builds currently fail with the following errors.

Current best practice seems to be to use Lens' instead of Simple Lens, which requires an additional language extension to continue working on 8.8.

The other error is MonadFail related.

Building library for macaw-base-0.3.15..
[ 1 of 29] Compiling Data.Macaw.AbsDomain.StridedInterval ( src/Data/Macaw/AbsDomain/StridedInterval.hs, dist/build/Data/Macaw/AbsDomain/StridedInterval.o )
[ 2 of 29] Compiling Data.Macaw.DebugLogging ( src/Data/Macaw/DebugLogging.hs, dist/build/Data/Macaw/DebugLogging.o )
[ 3 of 29] Compiling Data.Macaw.Dwarf ( src/Data/Macaw/Dwarf.hs, dist/build/Data/Macaw/Dwarf.o )

src/Data/Macaw/Dwarf.hs:108:3: error:
    ‘fail’ is not a (visible) method of class ‘Monad’
    |
108 |   fail msg = WarnT $ throwError msg
    |   ^^^^
[ 4 of 29] Compiling Data.Macaw.Memory.Permissions ( src/Data/Macaw/Memory/Permissions.hs, dist/build/Data/Macaw/Memory/Permissions.o )
[ 5 of 29] Compiling Data.Macaw.Memory ( src/Data/Macaw/Memory.hs, dist/build/Data/Macaw/Memory.o )
[ 6 of 29] Compiling Data.Macaw.Memory.LoadCommon ( src/Data/Macaw/Memory/LoadCommon.hs, dist/build/Data/Macaw/Memory/LoadCommon.o )
[ 7 of 29] Compiling Data.Macaw.Memory.Symbols ( src/Data/Macaw/Memory/Symbols.hs, dist/build/Data/Macaw/Memory/Symbols.o )
[ 8 of 29] Compiling Data.Macaw.Memory.ElfLoader ( src/Data/Macaw/Memory/ElfLoader.hs, dist/build/Data/Macaw/Memory/ElfLoader.o )
[ 9 of 29] Compiling Data.Macaw.Types ( src/Data/Macaw/Types.hs, dist/build/Data/Macaw/Types.o )
[10 of 29] Compiling Data.Macaw.AbsDomain.CallParams ( src/Data/Macaw/AbsDomain/CallParams.hs, dist/build/Data/Macaw/AbsDomain/CallParams.o )
[11 of 29] Compiling Data.Macaw.Utils.Pretty ( src/Data/Macaw/Utils/Pretty.hs, dist/build/Data/Macaw/Utils/Pretty.o )
[12 of 29] Compiling Data.Macaw.CFG.App ( src/Data/Macaw/CFG/App.hs, dist/build/Data/Macaw/CFG/App.o )
[13 of 29] Compiling Data.Macaw.CFG.AssignRhs ( src/Data/Macaw/CFG/AssignRhs.hs, dist/build/Data/Macaw/CFG/AssignRhs.o )
[14 of 29] Compiling Data.Macaw.CFG.Core ( src/Data/Macaw/CFG/Core.hs, dist/build/Data/Macaw/CFG/Core.o )

src/Data/Macaw/CFG/Core.hs:568:15: error:
    • The type synonym ‘Lens’ should have 4 arguments, but has been given none
    • In the type signature:
        boundValue :: forall r f tp.
                      OrdF r => r tp -> Simple Lens (RegState r f) (f tp)
    |
568 | boundValue :: forall r f tp
    |               ^^^^^^^^^^^^^...

src/Data/Macaw/CFG/Core.hs:646:10: error:
    • The type synonym ‘Lens’ should have 4 arguments, but has been given none
    • In the type signature:
        curIP :: RegisterInfo r =>
                 Simple Lens (RegState r f) (f (BVType (RegAddrWidth r)))
    |
646 | curIP :: RegisterInfo r
    |          ^^^^^^^^^^^^^^...
travitch commented 4 years ago

Fixed