never executed always true always false
    1 {-# LANGUAGE DeriveGeneric #-}
    2 module Distribution.Client.Types.InstallMethod where
    3 
    4 import Distribution.Client.Compat.Prelude
    5 import Prelude ()
    6 
    7 import qualified Distribution.Compat.CharParsing as P
    8 import qualified Text.PrettyPrint                as PP
    9 
   10 data InstallMethod
   11     = InstallMethodCopy
   12     | InstallMethodSymlink
   13   deriving (Eq, Show, Generic, Bounded, Enum)
   14 
   15 instance Binary InstallMethod
   16 instance Structured InstallMethod
   17 
   18 -- | Last
   19 instance Semigroup InstallMethod where
   20     _ <> x = x
   21 
   22 instance Parsec InstallMethod where
   23     parsec = do
   24         name <- P.munch1 isAlpha
   25         case name of
   26             "copy"    -> pure InstallMethodCopy
   27             "symlink" -> pure InstallMethodSymlink
   28             _         -> P.unexpected $ "InstallMethod: " ++ name
   29 
   30 instance Pretty InstallMethod where
   31     pretty InstallMethodCopy    = PP.text "copy"
   32     pretty InstallMethodSymlink = PP.text "symlink"