diff options
author | Yann Herklotz <git@yannherklotz.com> | 2019-09-18 19:06:32 +0200 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2019-09-18 19:06:32 +0200 |
commit | 8d96fd2a541a2602544ced741552ebd17714c67d (patch) | |
tree | 2f53addec05793cf5b3e0274a3e8e9e5f76a7abe /src/VeriSmith/Sim/Identity.hs | |
parent | d14196cce14d1b4a4a9fba768b9f5238c8626624 (diff) | |
download | verismith-8d96fd2a541a2602544ced741552ebd17714c67d.tar.gz verismith-8d96fd2a541a2602544ced741552ebd17714c67d.zip |
Rename main modules
Diffstat (limited to 'src/VeriSmith/Sim/Identity.hs')
-rw-r--r-- | src/VeriSmith/Sim/Identity.hs | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/VeriSmith/Sim/Identity.hs b/src/VeriSmith/Sim/Identity.hs deleted file mode 100644 index cac230f..0000000 --- a/src/VeriSmith/Sim/Identity.hs +++ /dev/null @@ -1,51 +0,0 @@ -{-| -Module : VeriSmith.Sim.Identity -Description : The identity simulator and synthesiser. -Copyright : (c) 2019, Yann Herklotz Grave -License : GPL-3 -Maintainer : yann [at] yannherklotz [dot] com -Stability : experimental -Portability : POSIX - -The identity simulator and synthesiser. --} - -module VeriSmith.Sim.Identity - ( Identity(..) - , defaultIdentity - ) -where - -import Control.DeepSeq (NFData, rnf, rwhnf) -import Data.Text (Text, unpack) -import Prelude hiding (FilePath) -import Shelly (FilePath) -import Shelly.Lifted (writefile) -import VeriSmith.Sim.Internal -import VeriSmith.Verilog.AST -import VeriSmith.Verilog.CodeGen - -data Identity = Identity { identityDesc :: {-# UNPACK #-} !Text - , identityOutput :: {-# UNPACK #-} !FilePath - } - deriving (Eq) - -instance Tool Identity where - toText (Identity d _) = d - -instance Show Identity where - show t = unpack $ toText t - -instance Synthesiser Identity where - runSynth = runSynthIdentity - synthOutput = identityOutput - setSynthOutput (Identity a _) = Identity a - -instance NFData Identity where - rnf = rwhnf - -runSynthIdentity :: Identity -> SourceInfo -> ResultSh () -runSynthIdentity (Identity _ out) = writefile out . genSource - -defaultIdentity :: Identity -defaultIdentity = Identity "identity" "syn_identity.v" |