/src/Gcc.hs

http://github.com/Eelis/geordi · Haskell · 13 lines · 8 code · 4 blank · 1 comment · 0 complexity · 79504cb7de724366edb8946dbdb55390 MD5 · raw file

  1. {-# LANGUAGE UnicodeSyntax #-}
  2. module Gcc where
  3. import Data.Maybe (isJust)
  4. import Text.Regex (mkRegex, matchRegex)
  5. data Stage = Preprocess | Analyze | Compile | Assemble | Link | Run
  6. deriving (Show, Eq, Enum, Ord)
  7. isMainMissingDiagnostic :: String Bool
  8. isMainMissingDiagnostic =
  9. isJust . matchRegex (mkRegex "undefined reference to [^[:alnum:]]+main[^[:alnum:]]+$")