Skip to content

GHC panic (no skolem info)

The attached program causes GHC 7.10.2 to panic with the following output:

bug.hs:6:19:
    Found hole ‘_’ with type: t1 → t2 → m1 a1 → m1 a1
    Where: ‘t1’ is a rigid type variable bound by
                the inferred type of
                whenMultipleOf ∷ MonadPlus m1 ⇒ t1 → t2 → m1 a1 → m1 a1
                at bug.hs:7:1
           ‘a1’ is a rigid type variable bound by
                the inferred type of
                whenMultipleOf ∷ MonadPlus m1 ⇒ t1 → t2 → m1 a1 → m1 a1
                at bug.hs:7:1
           ‘m1’ is a rigid type variable bound by
                the inferred type of
                whenMultipleOf ∷ MonadPlus m1 ⇒ t1 → t2 → m1 a1 → m1 a1
                at bug.hs:7:1
           ‘t2’ is a rigid type variable bound by
                the inferred type of
                whenMultipleOf ∷ MonadPlus m1 ⇒ t1 → t2 → m1 a1 → m1 a1
                at bug.hs:7:1
    To use the inferred type, enable PartialTypeSignatures
    In the type signature for ‘whenMultipleOf’: _

bug.hs:7:1:
    No instance for (MonadPlus m)
    When checking that ‘whenMultipleOf’ has the specified type
      whenMultipleOf ∷ ∀ t a (m ∷ * → *) t1. t → t1 → m a → m a
    Probable cause: the inferred type is ambiguous

bug.hs:10:62:
    Couldn't match type ‘a1’ with ‘t’
      ‘a1’ is a rigid type variable bound by
           the type signature for
             sumOfMultiples ∷ Integral a1 ⇒ [a1] → a1 → [a1]
           at bug.hs:9:19ghci-ng: panic! (the 'impossible' happened)
  (GHC version 7.10.2 for x86_64-unknown-linux):
	No skolem info: t_a7vV[sk]

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information