never executed always true always false
    1 {-# LANGUAGE DeriveGeneric, DeriveDataTypeable, DeriveFunctor, DeriveTraversable, DeriveFoldable #-}
    2 
    3 module Conjure.Language.Expression.Op.SupsetEq where
    4 
    5 import Conjure.Prelude
    6 import Conjure.Language.Expression.Op.Internal.Common
    7 
    8 import qualified Data.Aeson as JSON             -- aeson
    9 import qualified Data.Aeson.KeyMap as KM
   10 
   11 import qualified Data.Vector as V               -- vector
   12 
   13 
   14 data OpSupsetEq x = OpSupsetEq x x
   15     deriving (Eq, Ord, Show, Data, Functor, Traversable, Foldable, Typeable, Generic)
   16 
   17 instance Serialize x => Serialize (OpSupsetEq x)
   18 instance Hashable  x => Hashable  (OpSupsetEq x)
   19 instance ToJSON    x => ToJSON    (OpSupsetEq x) where toJSON = genericToJSON jsonOptions
   20 instance FromJSON  x => FromJSON  (OpSupsetEq x) where parseJSON = genericParseJSON jsonOptions
   21 
   22 instance BinaryOperator (OpSupsetEq x) where
   23     opLexeme _ = L_supsetEq
   24 
   25 instance (TypeOf x, Pretty x) => TypeOf (OpSupsetEq x) where
   26     typeOf p@(OpSupsetEq a b) = sameToSameToBool p a b
   27         [ TypeSet TypeAny
   28         , TypeMSet TypeAny
   29         , TypeFunction TypeAny TypeAny
   30         , TypeRelation [TypeAny]
   31         ]
   32         (const False)
   33 
   34 instance SimplifyOp OpSupsetEq x where
   35     simplifyOp _ = na "simplifyOp{OpSupsetEq}"
   36 
   37 instance Pretty x => Pretty (OpSupsetEq x) where
   38     prettyPrec prec op@(OpSupsetEq a b) = prettyPrecBinOp prec [op] a b
   39 
   40 instance VarSymBreakingDescription x => VarSymBreakingDescription (OpSupsetEq x) where
   41     varSymBreakingDescription (OpSupsetEq a b) = JSON.Object $ KM.fromList
   42         [ ("type", JSON.String "OpSupsetEq")
   43         , ("children", JSON.Array $ V.fromList
   44             [ varSymBreakingDescription a
   45             , varSymBreakingDescription b
   46             ])
   47         ]