Commit 004d2ef6 authored by Ryan Scott's avatar Ryan Scott

Add patches for ghc-{tcplugins-extra,typelits-extra,typelits-natnormalise}

parent 816ff170
Pipeline #10585 passed with stages
in 117 minutes and 57 seconds
name: ghc-tcplugins-extra
version: 0.3
x-revision: 2
synopsis: Utilities for writing GHC type-checker plugins
description: Utilities for writing GHC type-checker plugins, such as
creating constraints, with a stable API covering multiple
GHC releases.
homepage: http://github.com/clash-lang/ghc-tcplugins-extra
bug-reports: http://github.com/clash-lang/ghc-tcplugins-extra/issues
license: BSD2
license-file: LICENSE
author: Christiaan Baaij
maintainer: christiaan.baaij@gmail.com
copyright: Copyright © 2015-2016, University of Twente,
2017-2018, QBayLogic
category: Type System
build-type: Simple
extra-source-files: README.md
CHANGELOG.md
cabal-version: >=1.10
tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4,
GHC == 8.6.5, GHC == 8.8.1
source-repository head
type: git
location: https://github.com/clash-lang/ghc-tcplugins-extra.git
flag deverror
description:
Enables `-Werror` for development mode and TravisCI
default: False
manual: True
library
exposed-modules: GHC.TcPluginM.Extra
build-depends: base >=4.8 && <5,
ghc >=7.10 && <8.9
hs-source-dirs: src
default-language: Haskell2010
other-extensions: CPP
LambdaCase
RecordWildCards
PatternSynonyms
if flag(deverror)
ghc-options: -Wall -Werror
else
ghc-options: -Wall
diff -ru ghc-tcplugins-extra-0.3.orig/src/GHC/TcPluginM/Extra.hs ghc-tcplugins-extra-0.3/src/GHC/TcPluginM/Extra.hs
--- ghc-tcplugins-extra-0.3.orig/src/GHC/TcPluginM/Extra.hs 2018-05-08 17:59:20.000000000 -0400
+++ ghc-tcplugins-extra-0.3/src/GHC/TcPluginM/Extra.hs 2019-09-25 14:36:22.152454160 -0400
@@ -371,8 +371,16 @@
-- TODO: Is it safe to do "dumb" substitution under binders?
-- ForAllTy tv (substType subst ty)
t
-substType subst (FunTy t1 t2) =
- FunTy (substType subst t1) (substType subst t2)
+substType subst (FunTy
+#if __GLASGOW_HASKELL__ >= 809
+ af
+#endif
+ t1 t2) =
+ FunTy
+#if __GLASGOW_HASKELL__ >= 809
+ af
+#endif
+ (substType subst t1) (substType subst t2)
substType _ l@(LitTy _) = l
substType subst (CastTy ty co) =
CastTy (substType subst ty) co
diff -ru ghc-typelits-extra-0.3.1.orig/src/GHC/TypeLits/Extra/Solver.hs ghc-typelits-extra-0.3.1/src/GHC/TypeLits/Extra/Solver.hs
--- ghc-typelits-extra-0.3.1.orig/src/GHC/TypeLits/Extra/Solver.hs 2001-09-08 21:46:40.000000000 -0400
+++ ghc-typelits-extra-0.3.1/src/GHC/TypeLits/Extra/Solver.hs 2019-09-25 14:44:31.281376098 -0400
@@ -42,9 +42,8 @@
import TcPluginM (TcPluginM, tcLookupTyCon, tcPluginTrace)
import TcRnTypes (Ct, TcPlugin(..), TcPluginResult (..), ctEvidence, ctEvPred,
isWantedCt)
-import TcType (typeKind)
import Type (EqRel (NomEq), Kind, PredTree (EqPred), classifyPredType,
- eqType)
+ eqType, typeKind)
import TyCoRep (Type (..))
import TysWiredIn (typeNatKind, promotedTrueDataCon, promotedFalseDataCon)
import TcTypeNats (typeNatLeqTyCon)
diff -ru ghc-typelits-natnormalise-0.7.orig/src/GHC/TypeLits/Normalise.hs ghc-typelits-natnormalise-0.7/src/GHC/TypeLits/Normalise.hs
--- ghc-typelits-natnormalise-0.7.orig/src/GHC/TypeLits/Normalise.hs 2001-09-08 21:46:40.000000000 -0400
+++ ghc-typelits-natnormalise-0.7/src/GHC/TypeLits/Normalise.hs 2019-09-25 14:42:55.688411613 -0400
@@ -205,8 +205,7 @@
import TcRnTypes (ShadowInfo (WDeriv))
#endif
import TyCoRep (UnivCoProvenance (..))
-import Type (mkClassPred, mkPrimEqPred)
-import TcType (typeKind)
+import Type (mkClassPred, mkPrimEqPred, typeKind)
import TyCoRep (Type (..))
import TcTypeNats (typeNatAddTyCon, typeNatExpTyCon, typeNatMulTyCon,
typeNatSubTyCon)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment