    -- Copyright (c) 2020-2023, Shayne Fletcher. All rights reserved.
    -- SPDX-License-Identifier: BSD-3-Clause.

    #include "ghclib_api.h"
    module Language.Haskell.GhclibParserEx.GHC.Hs.Decls
      ( isNewType,
        isForD,
        isDerivD,
        isClsDefSig,
      )
    where

    #if defined(GHC_8_8)
    import HsSyn
    #else
    import GHC.Hs
    #endif
    #if defined (GHC_8_10) || defined (GHC_8_8)
    import SrcLoc
    #else
    import GHC.Types.SrcLoc
    #endif

    isNewType :: NewOrData -> Bool
    isNewType :: NewOrData -> Bool
    isNewType NewOrData
    NewType = Bool
    True
    isNewType NewOrData
    DataType = Bool
    False

    isForD, isDerivD :: LHsDecl GhcPs -> Bool
    isForD :: LHsDecl GhcPs -> Bool
    isForD (L SrcSpanAnnA
    _ ForD {}) = Bool
    True; isForD LHsDecl GhcPs
    _ = Bool
    False
    isDerivD :: LHsDecl GhcPs -> Bool
    isDerivD (L SrcSpanAnnA
    _ DerivD {}) = Bool
    True; isDerivD LHsDecl GhcPs
    _ = Bool
    False

    isClsDefSig :: Sig GhcPs -> Bool
    isClsDefSig :: Sig GhcPs -> Bool
    isClsDefSig (ClassOpSig XClassOpSig GhcPs
    _ Bool
    True [LIdP GhcPs]
    _ LHsSigType GhcPs
    _) = Bool
    True; isClsDefSig Sig GhcPs
    _ = Bool
    False