[GHC] #15629: "No skolem info" panic (GHC 8.6 only)
GHC
ghc-devs at haskell.org
Tue Sep 11 23:26:29 UTC 2018
#15629: "No skolem info" panic (GHC 8.6 only)
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler (Type | Version: 8.6.1-beta1
checker) |
Resolution: | Keywords: TypeInType
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
crash or panic | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by RyanGlScott):
In a quick hack, I added a `-fno-eager-unifier` flag:
{{{#!diff
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 9f0ba57..a2f269d 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -557,6 +557,7 @@ data GeneralFlag
| Opt_OptimalApplicativeDo
| Opt_VersionMacros
| Opt_WholeArchiveHsLibs
+ | Opt_NoEagerUnifier
-- copy all libs into a single folder prior to linking binaries
-- this should elivate the excessive command line limit restrictions
-- on windows, by only requiring a single -L argument instead of
@@ -3017,6 +3018,7 @@ dynamic_flags_deps = [
, make_ord_flag defGhcFlag "dhex-word-literals"
(NoArg (setGeneralFlag Opt_HexWordLiterals))
+
, make_ord_flag defGhcFlag "ghcversion-file" (hasArg
addGhcVersionFile)
, make_ord_flag defGhcFlag "main-is" (SepArg setMainIs)
, make_ord_flag defGhcFlag "haddock" (NoArg
(setGeneralFlag Opt_Haddock))
@@ -4003,7 +4005,8 @@ fFlagsDeps = [
flagSpec "show-warning-groups" Opt_ShowWarnGroups,
flagSpec "hide-source-paths" Opt_HideSourcePaths,
flagSpec "show-loaded-modules" Opt_ShowLoadedModules,
- flagSpec "whole-archive-hs-libs" Opt_WholeArchiveHsLibs
+ flagSpec "whole-archive-hs-libs" Opt_WholeArchiveHsLibs,
+ flagSpec "no-eager-unifier" Opt_NoEagerUnifier
]
++ fHoleFlags
diff --git a/compiler/typecheck/TcUnify.hs b/compiler/typecheck/TcUnify.hs
index 045132e..fb937b7 100644
--- a/compiler/typecheck/TcUnify.hs
+++ b/compiler/typecheck/TcUnify.hs
@@ -1348,7 +1348,11 @@ uType_defer t_or_k origin ty1 ty2
--------------
uType t_or_k origin orig_ty1 orig_ty2
- = do { tclvl <- getTcLevel
+ = do { no_eager <- goptM Opt_NoEagerUnifier
+ ; if no_eager
+ then uType_defer t_or_k origin orig_ty1 orig_ty2
+ else do
+ { tclvl <- getTcLevel
; traceTc "u_tys" $ vcat
[ text "tclvl" <+> ppr tclvl
, sep [ ppr orig_ty1, text "~", ppr orig_ty2]
@@ -1357,7 +1361,7 @@ uType t_or_k origin orig_ty1 orig_ty2
; if isReflCo co
then traceTc "u_tys yields no coercion" Outputable.empty
else traceTc "u_tys yields coercion:" (ppr co)
- ; return co }
+ ; return co } }
where
go :: TcType -> TcType -> TcM CoercionN
-- The arguments to 'go' are always semantically identical
}}}
However, the panic does //not// reappear if you compile the original
program with `-fno-eager-unifier`. The only differences I could observe
were minor variations in error quality. With `-fno-eager-unifier` enabled,
you don't see any of the "`āzā is a rigid type variable bound by`..."
stuff, for instance.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15629#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list