Re: BoxedRep UNPACK pragma

2023-08-12 Thread Mikolaj Konarski
On Sat, Aug 12, 2023 at 5:20 PM Brandon Allbery  wrote:
>
> The warning sounds correct to me: `Maybe` has two constructors?

It says at 
https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/pragmas.html#unpack-pragma

"Since 9.6.1, data types with multiple constructors can also be
unpacked, effectively transforming the field into an unboxed sum of
the unpackings of each constructor (see UnboxedSums)."

> On Sat, Aug 12, 2023 at 10:25 AM Alan & Kim Zimmerman
>  wrote:
> >
> > I have seen the following warning on master for some time
> >
> > compiler/GHC/Core/TyCon.hs:1540:5: warning:
> > • Ignoring unusable UNPACK pragma
> > on the first argument of ‘BoxedRep’
> > • In the definition of data constructor ‘BoxedRep’
> >   In the data type declaration for ‘PrimRep’
> >  |
> > 1540 |   | BoxedRep {-# UNPACK #-} !(Maybe Levity) -- ^ Boxed, heap value
> >  | ^^^
> >
> > Is it something that needs to be fixed? Can the code be updated to remove 
> > the warning?
> >
> > Alan
> > ___
> > ghc-devs mailing list
> > ghc-devs@haskell.org
> > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
>
>
> --
> brandon s allbery kf8nh
> allber...@gmail.com
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: BoxedRep UNPACK pragma

2023-08-12 Thread Brandon Allbery
The warning sounds correct to me: `Maybe` has two constructors?

On Sat, Aug 12, 2023 at 10:25 AM Alan & Kim Zimmerman
 wrote:
>
> I have seen the following warning on master for some time
>
> compiler/GHC/Core/TyCon.hs:1540:5: warning:
> • Ignoring unusable UNPACK pragma
> on the first argument of ‘BoxedRep’
> • In the definition of data constructor ‘BoxedRep’
>   In the data type declaration for ‘PrimRep’
>  |
> 1540 |   | BoxedRep {-# UNPACK #-} !(Maybe Levity) -- ^ Boxed, heap value
>  | ^^^
>
> Is it something that needs to be fixed? Can the code be updated to remove the 
> warning?
>
> Alan
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs



-- 
brandon s allbery kf8nh
allber...@gmail.com
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


BoxedRep UNPACK pragma

2023-08-12 Thread Alan & Kim Zimmerman
I have seen the following warning on master for some time

compiler/GHC/Core/TyCon.hs:1540:5: warning:
• Ignoring unusable UNPACK pragma
on the first argument of ‘BoxedRep’
• In the definition of data constructor ‘BoxedRep’
  In the data type declaration for ‘PrimRep’
 |
1540 |   | BoxedRep {-# UNPACK #-} !(Maybe Levity) -- ^ Boxed, heap value
 | ^^^

Is it something that needs to be fixed? Can the code be updated to remove
the warning?

Alan
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs