summaryrefslogtreecommitdiff
path: root/libraries/base/tests/SystemInfoTest.hs
blob: ef8c829df426ed9a6b56def2ad8366fb8502dbc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
{-# LANGUAGE CPP #-}
module Main where

import           Data.Version (showVersion)
import           System.Info  (fullCompilerVersion)

main :: IO ()
main = if textualVersion == macroVersion
       then putStrLn "Match"
       else putStrLn $ "[!]" <> textualVersion <> "should be equal to " <> macroVersion
  where
    macroVersion   = __GLASGOW_HASKELL_FULL_VERSION__
    textualVersion = showVersion fullCompilerVersion