We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
BitPack (Proxy a)
1 parent 363184d commit bf935ccCopy full SHA for bf935cc
clash-prelude/src/Clash/Class/BitPack/Internal.hs
@@ -58,6 +58,7 @@ import Clash.Sized.Internal.BitVector
58
>>> :m -Prelude
59
>>> :set -XDataKinds
60
>>> import Clash.Prelude
61
+>>> import Data.Proxy
62
-}
63
64
-- | Convert data to/from a 'BitVector'. This allows functions to be defined
@@ -478,6 +479,14 @@ instance ( BitPack a
478
479
) => BitPack (Either a b)
480
481
instance BitPack a => BitPack (Maybe a)
482
+
483
+-- |
484
+-- >>> pack (Proxy @())
485
+-- 0
486
+-- >>> pack (Proxy @5)
487
488
+-- >>> pack (Proxy @Bool)
489
490
instance BitPack (Proxy a) => BitPack (Proxy a)
491
492
instance BitPack a => BitPack (Complex a)
0 commit comments