Browse Source

starting to work on test stanzas

Getty Ritter 3 years ago
parent
commit
d8088ac627
2 changed files with 11 additions and 0 deletions
  1. 4 0
      src/Templates.hs
  2. 7 0
      src/Types.hs

+ 4 - 0
src/Templates.hs

@@ -79,6 +79,10 @@ defaultLib mod = T.unlines $
   , ") where"
   ]
 
+defaultTest :: T.Text -> T.Text
+defaultTest mod = T.unlines $
+  [ "module " <> mod <> "(main) where" ]
+
 defaultGitignore :: T.Text
 defaultGitignore = T.unlines
   [ "dist"

+ 7 - 0
src/Types.hs

@@ -27,6 +27,12 @@ data ExecutableDetails = ExecutableDetails
   , _execDeps :: [T.Text]
   }
 
+data TestDetails = TestDetails
+  { _testName :: T.Text
+  , _testDir  :: T.Text
+  , _testDeps :: [T.Text]
+  }
+
 data Project = Project
   { _projectDetails :: ProjectDetails
   , _libDetails     :: Maybe LibraryDetails
@@ -37,4 +43,5 @@ data Project = Project
 Lens.makeLenses ''ProjectDetails
 Lens.makeLenses ''LibraryDetails
 Lens.makeLenses ''ExecutableDetails
+Lens.makeLenses ''TestDetails
 Lens.makeLenses ''Project