diff options
author | Yann Herklotz <git@yannherklotz.com> | 2020-05-12 12:21:36 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2020-05-12 12:21:42 +0100 |
commit | 7124a4f00e536b4d5323a7488c1f65469dddb102 (patch) | |
tree | 150ccfd9bf1549c930a12ee5200826cedfa37fa3 /src/Verismith/Tool/Identity.hs | |
parent | d1b04fc068b1484f8bd0020598d3a2f023772f46 (diff) | |
download | verismith-7124a4f00e536b4d5323a7488c1f65469dddb102.tar.gz verismith-7124a4f00e536b4d5323a7488c1f65469dddb102.zip |
Format with ormolu
Diffstat (limited to 'src/Verismith/Tool/Identity.hs')
-rw-r--r-- | src/Verismith/Tool/Identity.hs | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/src/Verismith/Tool/Identity.hs b/src/Verismith/Tool/Identity.hs index 804f096..f8b9026 100644 --- a/src/Verismith/Tool/Identity.hs +++ b/src/Verismith/Tool/Identity.hs @@ -1,48 +1,48 @@ -{-| -Module : Verismith.Tool.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.Tool.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.Tool.Identity - ( Identity(..) - , defaultIdentity - ) + ( 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.Tool.Internal -import Verismith.Verilog.AST -import Verismith.Verilog.CodeGen - -data Identity = Identity { identityDesc :: !Text - , identityOutput :: !FilePath - } - deriving (Eq) +import Control.DeepSeq (NFData, rnf, rwhnf) +import Data.Text (Text, unpack) +import Shelly (FilePath) +import Shelly.Lifted (writefile) +import Verismith.Tool.Internal +import Verismith.Verilog.AST +import Verismith.Verilog.CodeGen +import Prelude hiding (FilePath) + +data Identity + = Identity + { identityDesc :: !Text, + identityOutput :: !FilePath + } + deriving (Eq) instance Tool Identity where - toText (Identity d _) = d + toText (Identity d _) = d instance Show Identity where - show t = unpack $ toText t + show t = unpack $ toText t instance Synthesiser Identity where - runSynth = runSynthIdentity - synthOutput = identityOutput - setSynthOutput (Identity a _) = Identity a + runSynth = runSynthIdentity + synthOutput = identityOutput + setSynthOutput (Identity a _) = Identity a instance NFData Identity where - rnf = rwhnf + rnf = rwhnf runSynthIdentity :: Show ann => Identity -> (SourceInfo ann) -> ResultSh () runSynthIdentity (Identity _ out) = writefile out . genSource |