Skip to content

Commit 8dae71e

Browse files
committed
Fix readNew doctest example
1 parent e28b372 commit 8dae71e

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

clash-prelude/src/Clash/Prelude/BlockRam.hs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,11 +838,28 @@ blockRamPow2 = \cnt rd wrM -> withFrozenCallStack
838838

839839
{- | Create a read-after-write block RAM from a read-before-write one
840840
841-
#if __GLASGOW_HASKELL__ >= 908 && !defined(CLASH_MULTIPLE_HIDDEN)
841+
#if defined(CLASH_MULTIPLE_HIDDEN)
842842
>>> :t readNew (blockRam (0 :> 1 :> Nil))
843843
readNew (blockRam (0 :> 1 :> Nil))
844844
:: ...
845845
...
846+
...
847+
... =>
848+
Signal dom addr -> Signal dom (Maybe (addr, a)) -> Signal dom a
849+
850+
#else
851+
#if __GLASGOW_HASKELL__ >= 908
852+
>>> :t readNew (blockRam (0 :> 1 :> Nil))
853+
readNew (blockRam (0 :> 1 :> Nil))
854+
:: ...
855+
...
856+
... =>
857+
Signal dom addr -> Signal dom (Maybe (addr, a)) -> Signal dom a
858+
859+
#elif __GLASGOW_HASKELL__ >= 902
860+
>>> :t readNew (blockRam (0 :> 1 :> Nil))
861+
readNew (blockRam (0 :> 1 :> Nil))
862+
:: ...
846863
... =>
847864
Signal dom addr -> Signal dom (Maybe (addr, a)) -> Signal dom a
848865
@@ -856,6 +873,7 @@ readNew (blockRam (0 :> 1 :> Nil))
856873
... =>
857874
Signal dom addr -> Signal dom (Maybe (addr, a)) -> Signal dom a
858875
876+
#endif
859877
#endif
860878
-}
861879
readNew

nix/overlay.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ let
4848
"ghc-typelits-natnormalise"
4949
"${ghc-typelits-natnormalise}"
5050
{ };
51+
52+
# doctest-parallel = hprev.callHackage "doctest-parallel" "0.3.1" { };
53+
doctest-parallel = hprev.callHackageDirect { pkg = "doctest-parallel"; ver = "0.3.1"; sha256 = "sha256-j0mk4RTEau6Cl90E8vMWZiA/ldRRurtLSYbGGE+q/vk="; } {};
54+
5155
};
5256

5357
# An overlay with the packages in this repository.

0 commit comments

Comments
 (0)