packages feed

HaskellAnalysisProgram-0.1.0: src/Main.hs

{-|
Module      : Main
Description : Main module for compilation.
Copyright   : Copyright (C) 2019 S. Kamps
License     : -- This file is distributed under the  terms of the Apache License 2.0.
              For more information, see the file "LICENSE", which is included in the distribution.
Stability   : experimental
-}
module Main
    where

import Settings
import Analyse
import FileOperation
import Text.Printf

-- | Settings for the Implementation Under Test.
runSettings :: String ->
                    String ->
                    String ->
                    AnalysisType ->
                    MetricType ->
                    Settings
runSettings programName version commitHash analysisType metricType =
  Settings
    { programName = programName
    , version = version
    , commitHash = commitHash
    , analysis = analysisType
    , metricType = metricType
    }

-- | Main function for profiling purposes.
main :: IO ()
main = getSettings >>= analyse