Skip to content

HEAD Core Lint failure building hmatrix

I'm getting the following Core Lint failure building the hmatrix package on HEAD, with optimisations turned on:

*** Core Lint errors : in result of Simplifier ***
src\Internal\Algorithms.hs:978:1: warning:
    The type of this binder is unlifted: x_sfxi
    Binder's type: Double#
    In the RHS of sqrtmInv :: forall {t}.
                              Field t =>
                              Matrix t -> Matrix t
    In the body of lambda with binder t_a7P2 :: *
    In the body of lambda with binder $dField_a7PD :: Field t_a7P2
    In the RHS of x_sfxi :: Double#
    Substitution: [TCvSubst
                     In scope: InScope {t_a7P2 co_a9ot}
                     Type env: [a7P2 :-> t_a7P2]
                     Co env: [a9ot :-> co_a9ot]]

[...]

sqrtmInv :: forall {t}. Field t => Matrix t -> Matrix t
[LclIdX,
 Arity=1,
 Str=<SP(LP(LP(LP(LP(L,A,LCL(C1(C1(L))),LCL(C1(C1(C1(L)))),A,A,A,A),LCL(C1(L)),LCL(C1(C1(C1(C1(C1(L)))))),A,A,A,A,A,A,A,A,A),A,A,A,LCL(C1(L)),A,LCL(C1(L)),LCL(C1(L)),A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A),A,A,A,A,LP(LP(A,A,A,A,A,A,L),A,A,A,A,A,A),A,A,A,A),A,LP(A,LCL(C1(L))),A,LP(LP(A,A,A,L),A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A),A,A,A,A,SP(SL),A,A,A,A,A,A,LCL(C1(L)),A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A)>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=NEVER}]
sqrtmInv
  = \ (@t_a7P2)
      ($dField_a7PD [Dmd=SP(LP(LP(LP(LP(L,A,LCL(C1(C1(L))),LCL(C1(C1(C1(L)))),A,A,A,A),LCL(C1(L)),LCL(C1(C1(C1(C1(C1(L)))))),A,A,A,A,A,A,A,A,A),A,A,A,LCL(C1(L)),A,LCL(C1(L)),LCL(C1(L)),A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A),A,A,A,A,LP(LP(A,A,A,A,A,A,L),A,A,A,A,A,A),A,A,A,A),A,LP(A,LCL(C1(L))),A,LP(LP(A,A,A,L),A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A),A,A,A,A,SP(SL),A,A,A,A,A,A,LCL(C1(L)),A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A)]
         :: Field t_a7P2) ->
      case eq_sel
             @(*) @(RealOf t_a7P2) @Double ($p10Field @t_a7P2 $dField_a7PD)
      of co_a9ot
      { __DEFAULT ->
      letrec {
        x_sfxi :: Double#
        [LclId,
         Unf=Unf{Src=<vanilla>, TopLvl=False, Value=False, ConLike=False,
                 WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 4 0}]
        x_sfxi = **## 2.0## -52.0##;
        x_sfxj :: Double
        [LclId,
         Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
                 WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
        x_sfxj = D# x_sfxi;
        [...]

I haven't minimised the reproducer, but it happens when compiling the Internal.Algorithms module with -O1.

This error doesn't happen with ghc-9.2.1.

Edited by sheaf
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information