Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
ghc-lib-parser GHC.Builtin.PrimOps No documentation available.
-
ghc-lib-parser GHC.Builtin.PrimOps No documentation available.
-
ghc-lib-parser GHC.Builtin.Types.Prim No documentation available.
-
ghc-lib-parser GHC.Builtin.Types.Prim No documentation available.
-
ghc-lib-parser GHC.Builtin.Types.Prim No documentation available.
-
ghc-lib-parser GHC.Builtin.Types.Prim No documentation available.
-
ghc-lib-parser GHC.Builtin.Types.Prim No documentation available.
-
ghc-lib-parser GHC.Builtin.Types.Prim No documentation available.
-
ghc-lib-parser GHC.Builtin.Types.Prim No documentation available.
narrowS :: Width -> Integer -> Integerghc-lib-parser GHC.Cmm.Type Narrow a signed value to the given width. The result will reside in [-2^(width-1), +2^(width-1)).
>>> narrowS W8 256 == 0 >>> narrowS W8 255 == -1 >>> narrowS W8 128 == -128 >>> narrowS W8 127 == 127 >>> narrowS W8 0 == 0 >>> narrowS W8 (-127) == -127 >>> narrowS W8 (-128) == -128 >>> narrowS W8 (-129) == 127 >>> narrowS W8 (-255) == 1 >>> narrowS W8 (-256) == 0