From defc7aa7ed9d93821aa4787f01ff143a9a256b35 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 14 May 2019 11:22:44 +0100 Subject: Add renameSource --- src/VeriFuzz/Sim/Internal.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/VeriFuzz/Sim') 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. -- cgit