diff options
author | Yann Herklotz <git@ymhg.org> | 2019-05-14 11:22:44 +0100 |
---|---|---|
committer | Yann Herklotz <git@ymhg.org> | 2019-05-14 11:22:44 +0100 |
commit | defc7aa7ed9d93821aa4787f01ff143a9a256b35 (patch) | |
tree | b0e11865bc9966a422ea317fd5220b2df74492c9 /src/VeriFuzz | |
parent | 76e9b994258d9af87868ba9f420db4ee1c29de67 (diff) | |
download | verismith-defc7aa7ed9d93821aa4787f01ff143a9a256b35.tar.gz verismith-defc7aa7ed9d93821aa4787f01ff143a9a256b35.zip |
Add renameSource
Diffstat (limited to 'src/VeriFuzz')
-rw-r--r-- | src/VeriFuzz/Sim/Internal.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/VeriFuzz/Sim/Internal.hs b/src/VeriFuzz/Sim/Internal.hs index ea90122..5c58e1a 100644 --- a/src/VeriFuzz/Sim/Internal.hs +++ b/src/VeriFuzz/Sim/Internal.hs @@ -19,6 +19,7 @@ module VeriFuzz.Sim.Internal , Simulator(..) , Synthesiser(..) , Failed(..) + , renameSource , checkPresent , checkPresentModules , replace @@ -95,6 +96,10 @@ class Tool a => Synthesiser a where synthOutput :: a -> FilePath setSynthOutput :: a -> FilePath -> a +renameSource :: (Synthesiser a) => a -> SourceInfo -> SourceInfo +renameSource a src = + src & infoSrc . _Wrapped . traverse . modId . _Wrapped %~ (<> toText a) + -- | Type synonym for a 'ResultT' that will be used throughout 'VeriFuzz'. This -- has instances for 'MonadSh' and 'MonadIO' if the 'Monad' it is parametrised -- with also has those instances. |