Skip to content

collapseRHSNoops introduces unsafeCoerce's which DebugSilent then complains about #2956

@martijnbastiaan

Description

@martijnbastiaan

I.e., I get:

Unmatchable constant as case subject: unsafeCoerce# @(Vec (* 1 4) (BitVector (BitSize (BitVector 8)))) @(Vec (* 1 4) (BitVector 8))
  (unconcatBitVector# @(* 1 4) @(BitSize (BitVector 8)) (removedArg @(SNatKn "GHC.TypeNats.*")) (removedArg @Natural)
     (++# @(* (ByteSizeC (Signed 0)) 8)
        @(- (* (* (Div (+ (ByteSizeC (Signed 0)) (- 4 1)) 4) 4) 8) (* (ByteSizeC (Signed 0)) 8))
        (removedArg @(SNatKn "GHC.TypeNats.*"))
        (fromInteger# @(- (* (* (Div (+ (ByteSizeC (Signed 0)) (- 4 1)) 4) 4) 8) (* (ByteSizeC (Signed 0)) 8)) 24 0 0)
        (xToBV @(* 1 (BitSize (BitVector 8))) (removedArg @(SNatKn "GHC.TypeNats.*"))
           (concatBitVector# @1 @(BitSize (BitVector 8)) (removedArg @Natural) (removedArg @Natural)
              (Cons @1 @(BitVector (BitSize (BitVector 8))) @0 _CO_
                 (xToBV @8 (removedArg @Natural) (fromInteger# @(BitSize (BitVector 8)) 8 0 0))
                 (Nil @0 @(BitVector (BitSize (BitVector 8))) _CO_))))))
WHNF is: unsafeCoerce# @(Vec (* 1 4) (BitVector (BitSize (BitVector 8)))) @(Vec (* 1 4) (BitVector 8))
  (Cons @4 @(BitVector (BitSize (BitVector 8))) @3 _CO_
     (case (split# @(* 3 (BitSize (BitVector 8))) @(BitSize (BitVector 8)) 24
              (fromInteger#
                 @(+
                     (- (* (* (Div (+ (ByteSizeC (Signed 0)) (- 4 1)) 4) 4) 8) (* (ByteSizeC (Signed 0)) 8))
                     (* (ByteSizeC (Signed 0)) 8))
                 32
                 0
                 0)) of
        (,) (x :: BitVector (BitSize (BitVector 8))) (bv' :: BitVector (* 3 (BitSize (BitVector 8)))) ->
          x[LocalId])
     (unconcatBitVector# @3 @(BitSize (BitVector 8)) 3 (removedArg @Natural)
        (case (split# @(* 3 (BitSize (BitVector 8))) @(BitSize (BitVector 8)) 24
                 (fromInteger#
                    @(+
                        (- (* (* (Div (+ (ByteSizeC (Signed 0)) (- 4 1)) 4) 4) 8) (* (ByteSizeC (Signed 0)) 8))
                        (* (ByteSizeC (Signed 0)) 8))
                    32
                    0
                    0)) of
           (,) (x :: BitVector (BitSize (BitVector 8))) (bv' :: BitVector (* 3 (BitSize (BitVector 8)))) ->
             bv'[LocalId])))

Metadata

Metadata

Assignees

No one assigned

    Labels

    papercutSmall quality-of-life issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions