12345678910111213141516171819202122 |
- {-# LANGUAGE TemplateHaskell #-}
- module Types where
- import qualified Data.Text as T
- import qualified Lens.Family.TH as Lens
- data Compiler = Compiler
- { _compilerVersion :: (Int, Int, Int)
- } deriving (Eq, Show)
- data Config = Config
- { _configInstallPath :: FilePath
- , _configCurrentCompiler :: Maybe Compiler
- } deriving (Eq, Show)
- Lens.makeLenses ''Compiler
- Lens.makeLenses ''Config
- compilerString :: Compiler -> String
- compilerString (Compiler (x, y, z)) =
- "ghc-" ++ show x ++ "." ++ show y ++ "." ++ show z
|