never executed always true always false
    1 {-# LANGUAGE DeriveGeneric, DeriveDataTypeable, DeriveFunctor, DeriveTraversable, DeriveFoldable #-}
    2 
    3 module Conjure.Language.Expression.Op.DotLt 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 OpDotLt x = OpDotLt x x
   15     deriving (Eq, Ord, Show, Data, Functor, Traversable, Foldable, Typeable, Generic)
   16 
   17 instance Serialize x => Serialize (OpDotLt x)
   18 instance Hashable  x => Hashable  (OpDotLt x)
   19 instance ToJSON    x => ToJSON    (OpDotLt x) where toJSON = genericToJSON jsonOptions
   20 instance FromJSON  x => FromJSON  (OpDotLt x) where parseJSON = genericParseJSON jsonOptions
   21 
   22 instance BinaryOperator (OpDotLt x) where
   23     opLexeme _ = L_DotLt
   24 
   25 instance (TypeOf x, Pretty x) => TypeOf (OpDotLt x) where
   26     typeOf p@(OpDotLt a b) = sameToSameToBool p a b [] (const True)
   27 
   28 instance SimplifyOp OpDotLt x where
   29     simplifyOp _ = na "simplifyOp{OpDotLt}"
   30 
   31 instance Pretty x => Pretty (OpDotLt x) where
   32     prettyPrec prec op@(OpDotLt a b) = prettyPrecBinOp prec [op] a b
   33 
   34 instance VarSymBreakingDescription x => VarSymBreakingDescription (OpDotLt x) where
   35     varSymBreakingDescription (OpDotLt a b) = JSON.Object $ KM.fromList
   36         [ ("type", JSON.String "OpDotLt")
   37         , ("children", JSON.Array $ V.fromList
   38             [ varSymBreakingDescription a
   39             , varSymBreakingDescription b
   40             ])
   41         ]