Hoogle Search
Within LTS Haskell 24.32 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
gdp Data.Refined Take a simple function with one named argument and a named return, plus an implication relating a precondition to a postcondition of the function, and produce a function between refined input and output types.
newtype NonEmpty xs = NonEmpty Defn type role Nonempty nominal -- disallows coercion of Nonempty's argument. newtype Reverse xs = Reverse Defn type role Reverse nominal rev :: ([a] ~~ xs) -> ([a] ~~ Reverse xs) rev xs = defn (reverse (the xs)) rev_nonempty_lemma :: NonEmpty xs -> Proof (NonEmpty (Reverse xs)) rev' :: ([a] ?NonEmpty) -> ([a] ?NonEmpty) rev' = rev ...? rev_nonempty_lemma
-
ghci-hexcalc Data.GHex Integer mod
>>> 18 .% 16 0x0000_0000_0000_0002
-
ghci-hexcalc Data.GHex Bitwise "and"
>>> 0x1234 .& 0xff 0x0000_0000_0000_0034
(
.++ ) :: (Int, Hex) -> (Int, Hex) -> (Int, Hex)ghci-hexcalc Data.GHex Concatinate pairs of (length,Hex)
>>> (3,0b101) .++ (2,0b11) (5,0x0000_0000_0000_0017) >>> (4,0xa) .++ (4,0xb) .++ (8,0xcd) (16,0x0000_0000_0000_abcd) >>> (4,0xe) .++ (4,0xf) .@snd 0x0000_0000_0000_00ef
-
ghci-hexcalc Data.GHex Integer div
>>> 0x1000 ./ 16 0x0000_0000_0000_0100
-
ghci-hexcalc Data.GHex Logical left shift
>>> 1 .<< 16 0x0000_0000_0001_0000
-
ghci-hexcalc Data.GHex Logical right shift
>>> 0x0f00 .>> 4 0x0000_0000_0000_00f0
-
ghci-hexcalc Data.GHex Operator for postfix notation (same as Data.Function.(&))
>>> 255 .@hex "0x0000_0000_0000_00ff" >>> 0xf1 .@bin "0b1111_0001" >>> 2^12 .@dec "4096" >>> 4 * giga .@pos1 [32]
0x0 .@color (bits 31 24) 0b0000_0000_0000_0000_0000_0000_0000_0000_1111_1111_0000_0000_0000_0000_0000_0000 ^^^^ ^^^^
-
ghci-hexcalc Data.GHex Bitwise "xor"
>>> 0xf .^ 0xa 0x0000_0000_0000_0005
-
ghci-hexcalc Data.GHex Bitwise "or"
>>> 0xf000 .| 0xa 0x0000_0000_0000_f00a