diff options
author | Yann Herklotz Grave <git@yannherklotzgrave.com> | 2019-02-16 14:28:30 +0000 |
---|---|---|
committer | Yann Herklotz Grave <git@yannherklotzgrave.com> | 2019-02-16 14:28:30 +0000 |
commit | f28188fc54d187b501b861d43592702bc7e460ec (patch) | |
tree | c1d898d080dcfa44a5461218a047d04883076a23 /src/VeriFuzz/Internal.hs | |
parent | a83b3b40f683400914d0f3ae23bd9e69e6e0fd96 (diff) | |
download | verismith-f28188fc54d187b501b861d43592702bc7e460ec.tar.gz verismith-f28188fc54d187b501b861d43592702bc7e460ec.zip |
Add export lists
Diffstat (limited to 'src/VeriFuzz/Internal.hs')
-rw-r--r-- | src/VeriFuzz/Internal.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/VeriFuzz/Internal.hs b/src/VeriFuzz/Internal.hs index 6a880ee..3c339b5 100644 --- a/src/VeriFuzz/Internal.hs +++ b/src/VeriFuzz/Internal.hs @@ -13,12 +13,16 @@ Shared high level code used in the other modules internally. module VeriFuzz.Internal ( -- * Useful functions safe + , showT + , comma -- * Module Specific Internals , module VeriFuzz.Internal.Circuit , module VeriFuzz.Internal.Simulator , module VeriFuzz.Internal.AST ) where +import Data.Text (Text) +import qualified Data.Text as T import VeriFuzz.Internal.AST import VeriFuzz.Internal.Circuit import VeriFuzz.Internal.Simulator @@ -27,3 +31,11 @@ import VeriFuzz.Internal.Simulator safe :: ([a] -> b) -> [a] -> Maybe b safe _ [] = Nothing safe f l = Just $ f l + +-- | Show function for 'Text' +showT :: (Show a) => a -> Text +showT = T.pack . show + +-- | Inserts commas between '[Text]' and except the last one. +comma :: [Text] -> Text +comma = T.intercalate ", " |