Skip to content

Commit

Permalink
Fix readNew doctest example
Browse files Browse the repository at this point in the history
  • Loading branch information
leonschoorl committed Oct 19, 2023
1 parent e28b372 commit 8dae71e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
20 changes: 19 additions & 1 deletion clash-prelude/src/Clash/Prelude/BlockRam.hs
Original file line number Diff line number Diff line change
Expand Up @@ -838,11 +838,28 @@ blockRamPow2 = \cnt rd wrM -> withFrozenCallStack

{- | Create a read-after-write block RAM from a read-before-write one
#if __GLASGOW_HASKELL__ >= 908 && !defined(CLASH_MULTIPLE_HIDDEN)
#if defined(CLASH_MULTIPLE_HIDDEN)
>>> :t readNew (blockRam (0 :> 1 :> Nil))
readNew (blockRam (0 :> 1 :> Nil))
:: ...
...
...
... =>
Signal dom addr -> Signal dom (Maybe (addr, a)) -> Signal dom a
#else
#if __GLASGOW_HASKELL__ >= 908
>>> :t readNew (blockRam (0 :> 1 :> Nil))
readNew (blockRam (0 :> 1 :> Nil))
:: ...
...
... =>
Signal dom addr -> Signal dom (Maybe (addr, a)) -> Signal dom a
#elif __GLASGOW_HASKELL__ >= 902
>>> :t readNew (blockRam (0 :> 1 :> Nil))
readNew (blockRam (0 :> 1 :> Nil))
:: ...
... =>
Signal dom addr -> Signal dom (Maybe (addr, a)) -> Signal dom a
Expand All @@ -856,6 +873,7 @@ readNew (blockRam (0 :> 1 :> Nil))
... =>
Signal dom addr -> Signal dom (Maybe (addr, a)) -> Signal dom a
#endif
#endif
-}
readNew
Expand Down
4 changes: 4 additions & 0 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ let
"ghc-typelits-natnormalise"
"${ghc-typelits-natnormalise}"
{ };

# doctest-parallel = hprev.callHackage "doctest-parallel" "0.3.1" { };
doctest-parallel = hprev.callHackageDirect { pkg = "doctest-parallel"; ver = "0.3.1"; sha256 = "sha256-j0mk4RTEau6Cl90E8vMWZiA/ldRRurtLSYbGGE+q/vk="; } {};

};

# An overlay with the packages in this repository.
Expand Down

0 comments on commit 8dae71e

Please sign in to comment.