[GHC] #9190: Iface type variable out of scope: s
GHC
ghc-devs at haskell.org
Wed Jun 11 08:59:39 UTC 2014
#9190: Iface type variable out of scope: s
-------------------------------------+------------------------------------
Reporter: nomeata | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.9
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Old description:
> I just tried to install criterion with the current GHC HEAD, and
> `statistics` failed with this message:
>
> {{{
> /home/jojo/.cabal/lib/x86_64-linux-ghc-7.9.20140609/math-
> functions-0.1.5.2/Numeric/Sum.hi
> Declaration for R:MVectorsKBNSum:
> Iface type variable out of scope: s
> Cannot continue after interface file error
> }}}
>
> I tried to reproduce this with smaller code than `statistics`, but could
> not trigger it.
>
> The interface dump gives me:
> {{{
> 661d69e55c1491128ac1ed3c03f864e2
> axiom TFCo:R:MVectorsKB2Sum::
> Data.Vector.Unboxed.Base.MVector s0 Numeric.Sum.KB2Sum
> = Numeric.Sum.R:MVectorsKB2Sum s0
> a69bb56c3760003bcb7d99cd40c3d843
> axiom TFCo:R:MVectorsKBNSum::
> Data.Vector.Unboxed.Base.MVector s0 Numeric.Sum.KBNSum
> = Numeric.Sum.R:MVectorsKBNSum s0
> }}}
> – not sure if there is a `forall` missing or not. Note that these data
> types are generated using template haskell [http://hdiff.luite.com/cgit
> /math-
> functions/tree/Numeric/Sum.hs?id=06b09eb4f110f99fb51a9ec0ec598fba54ac0986#n123
> source].
>
> In order to reproduce this, run someting like
> `cabal install --with-compiler=.../inplace/bin/ghc-stage2 --ghc-
> option=-XTypeFamilies .` in `statistics-0.11.0.3` with the attached patch
> applied.
New description:
I just tried to install criterion with the current GHC HEAD, and
`statistics` failed with this message:
{{{
/home/jojo/.cabal/lib/x86_64-linux-ghc-7.9.20140609/math-
functions-0.1.5.2/Numeric/Sum.hi
Declaration for R:MVectorsKBNSum:
Iface type variable out of scope: s
Cannot continue after interface file error
}}}
I tried to reproduce this with smaller code than `statistics`, but could
not trigger it.
The interface dump gives me:
{{{
661d69e55c1491128ac1ed3c03f864e2
axiom TFCo:R:MVectorsKB2Sum::
Data.Vector.Unboxed.Base.MVector s0 Numeric.Sum.KB2Sum
= Numeric.Sum.R:MVectorsKB2Sum s0
a69bb56c3760003bcb7d99cd40c3d843
axiom TFCo:R:MVectorsKBNSum::
Data.Vector.Unboxed.Base.MVector s0 Numeric.Sum.KBNSum
= Numeric.Sum.R:MVectorsKBNSum s0
}}}
– not sure if there is a `forall` missing or note. Note that these data
types are generated using template haskell [http://hdiff.luite.com/cgit
/math-
functions/tree/Numeric/Sum.hs?id=06b09eb4f110f99fb51a9ec0ec598fba54ac0986#n123
source].
In order to reproduce this, run someting like
`cabal install --with-compiler=.../inplace/bin/ghc-stage2 --ghc-
option=-XTypeFamilies .` in `statistics-0.11.0.3` with the attached patch
applied.
--
Comment (by simonpj):
I tried reproducing this, but the `cabal install` process fell over much
earlier in `mwc-random`:
{{{
System\Random\MWC\Distributions.hs:83:5:
Illegal equational constraint PrimState m ~ PrimState m
(Use GADTs or TypeFamilies to permit this)
When checking that `normalTail'
has the inferred type `forall (m1 :: * -> *).
(PrimMonad m1, PrimState m1 ~ PrimState m) =>
Bool -> m1 Double'
In an equation for `standard':
standard gen
= loop
where ....
}}}
This is more fallout from #8883. (The inferred type also looks ambiguous,
but it isn't because the type variable `m` is free in the environment.)
Very similar errors show up in `vector-algorithms`.
Both are solved by `-XMonoLocalBinds`. I'm not sure why this didn't
happen to you.
Simon
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9190#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list