diff options
author | Yann Herklotz <git@yannherklotz.com> | 2019-10-18 14:29:07 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2019-10-18 14:29:07 +0100 |
commit | e7f57642f068650ea362201b239efad1c9a841d9 (patch) | |
tree | 2d68c28c0644089b9afcfc21fc05f88d50ef6703 /src/Verismith/Sim/Identity.hs | |
parent | 349c1fa290c068a0f4100469e7485d062dd995ce (diff) | |
download | verismith-e7f57642f068650ea362201b239efad1c9a841d9.tar.gz verismith-e7f57642f068650ea362201b239efad1c9a841d9.zip |
Rename Sim to Tool
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 89c6b36..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" |