Skip to content

Commit

Permalink
Squash empty lines
Browse files Browse the repository at this point in the history
  • Loading branch information
phadej committed Mar 7, 2025
1 parent cb41c23 commit 9651ba0
Show file tree
Hide file tree
Showing 14 changed files with 0 additions and 21 deletions.
1 change: 0 additions & 1 deletion hs-bindgen-bootstrap/src/hs-bindgen-bootstrap.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ main = do
putStr contents
writeFile "hs-bindgen-libclang/cbits/clang_wrappers_ffi.h" contents


-------------------------------------------------------------------------------
-- declarations
-------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ data CXCommentKind =
-- > \endverbatim
| CXComment_VerbatimBlockCommand


-- | A line of text that is contained within a
-- 'CXComment_VerbatimBlockCommand' node.
| CXComment_VerbatimBlockLine
Expand Down
1 change: 0 additions & 1 deletion hs-bindgen/src/HsBindgen/Backend/PP/Names.hs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ data HsImport =
| UnqualifiedHsImport HsImportModule
deriving (Eq, Ord, Show)


-- | Resolved name
data ResolvedName = ResolvedName {
resolvedNameString :: String
Expand Down
2 changes: 0 additions & 2 deletions hs-bindgen/src/HsBindgen/Backend/PP/Render.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import Text.SimplePrettyPrint
import C.Char (CharValue(..))
import DeBruijn (EmptyCtx, Env (..), lookupEnv, Add (..))


{-------------------------------------------------------------------------------
Rendering
-------------------------------------------------------------------------------}
Expand Down Expand Up @@ -191,7 +190,6 @@ prettyType env prec = \case
prettyPrimType :: HsPrimType -> CtxDoc
prettyPrimType = prettyType EmptyEnv 0 . TGlobal . PrimType


{-------------------------------------------------------------------------------
PatEpxr pretty-printing
-------------------------------------------------------------------------------}
Expand Down
1 change: 0 additions & 1 deletion hs-bindgen/src/HsBindgen/Backend/PP/Translation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ translateModule HsModuleOpts{..} hsModuleDecls =
hsModuleName = hsModuleOptsName
in HsModule{..}


{-------------------------------------------------------------------------------
Auxiliary: Pragma resolution
-------------------------------------------------------------------------------}
Expand Down
1 change: 0 additions & 1 deletion hs-bindgen/src/HsBindgen/C/AST/Literal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ data CharLiteral =
deriving stock ( Eq, Show, Generic )
deriving anyclass PrettyVal


data StringLiteral =
StringLiteral
{ stringLiteralText :: Text
Expand Down
4 changes: 0 additions & 4 deletions hs-bindgen/src/HsBindgen/C/Reparse/Decl.hs
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,6 @@ parameterTypes ps =
Nothing -> Left i
Just ty -> Right $ mkPtr ptrs ty


reparseDeclarator :: forall abs. KnownDeclaratorType abs => TcMacro.TypeEnv -> Reparse (Declarator abs)
reparseDeclarator macroTys = do
ptr <- many reparsePointer
Expand Down Expand Up @@ -538,7 +537,6 @@ reparseArrayDeclarator macroTys decl = do
}
<?> "array declarator"


reparseFunctionDeclarator
:: TcMacro.TypeEnv
-> DirectDeclarator abs
Expand Down Expand Up @@ -688,7 +686,6 @@ reparseTypeSpecifier macroTys =
}
] <?> "type"


reparseStorageClassSpecifier :: Reparse StorageClassSpecifier
reparseStorageClassSpecifier =
choice
Expand All @@ -702,7 +699,6 @@ reparseStorageClassSpecifier =
]
<?> "storage class"


reparseFunctionSpecifier :: Reparse FunctionSpecifier
reparseFunctionSpecifier = choice
[ keyword "inline" $> FS_inline
Expand Down
1 change: 0 additions & 1 deletion hs-bindgen/src/HsBindgen/C/Reparse/Literal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ readInBase b ds =
Reference: <https://en.cppreference.com/w/cpp/language/floating_literal>
-------------------------------------------------------------------------------}


reparseLiteralFloating :: TokenParser (Float, Double, PrimFloatType)
reparseLiteralFloating = do

Expand Down
2 changes: 0 additions & 2 deletions hs-bindgen/src/HsBindgen/C/Reparse/Macro.hs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ reparseMacro = do
functionLike loc name = Macro loc name <$> formalArgs <*> mExprTuple
objectLike loc name = Macro loc name [] <$> mExprTuple


formalArgs :: Reparse [CName]
formalArgs = parens $ formalArg `sepBy` comma

Expand Down Expand Up @@ -217,7 +216,6 @@ mExpr = buildExpressionParser ops term <?> "expression"
ap2 :: MFun (S (S Z)) -> MExpr -> MExpr -> MExpr
ap2 op arg1 arg2 = MApp op ( arg1 ::: arg2 ::: VNil )


sepBy2 :: ParsecT s u m a -> ParsecT s u m sep -> ParsecT s u m (a, a, [a])
{-# INLINEABLE sepBy2 #-}
sepBy2 p sep = do
Expand Down
3 changes: 0 additions & 3 deletions hs-bindgen/src/HsBindgen/C/Tc/Macro.hs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ data TyVar
deriving stock Generic
deriving anyclass PrettyVal


tyVarName :: TyVar -> Name
tyVarName = \case
SkolemTv sk -> skolemTyVarName sk
Expand Down Expand Up @@ -1425,11 +1424,9 @@ pattern Empty = Data EmptyTyCon VNil
pattern Ptr :: Type Ty -> Type Ty
pattern Ptr ty = Data PtrTyCon (ty ::: VNil)


pattern Tuple :: () => ( nbArgs ~ S (S n) ) => Word -> Vec nbArgs (Type Ty) -> Type Ty
pattern Tuple l as = Data ( TupleTyCon l ) as


pattern PlusRes :: Type Ty -> Type Ty
pattern PlusRes a = FamApp PlusResTyCon ( a ::: VNil )
pattern MinusRes :: Type Ty -> Type Ty
Expand Down
1 change: 0 additions & 1 deletion hs-bindgen/src/HsBindgen/Hs/AST.hs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ instance Eq ATyCon where
ATyCon tc1 == ATyCon tc2 =
isJust $ equals2 tc1 tc2


data AClass where
AClass :: C.TyCon args C.Ct -> AClass
instance Show AClass where
Expand Down
1 change: 0 additions & 1 deletion hs-bindgen/src/HsBindgen/SHs/Translation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ mfunGlobal = \case
C.MLogicalOr -> Logical_or
C.MTuple @n -> Tuple_constructor $ 2 + Fin.reflectToNum @n Proxy


hsPrimIntTy :: C.IntegralType -> HsPrimType
hsPrimIntTy = \case
C.Bool -> HsPrimCBool
Expand Down
1 change: 0 additions & 1 deletion hs-bindgen/tests/Orphans.hs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ instance ToExpr (CMacro.ClassTyCon arity) where
CMacro.BitwiseTyCon -> Expr.App "BitwiseTyCon" []
CMacro.ShiftTyCon -> Expr.App "ShiftTyCon" []


instance ToExpr (CMacro.TyCon args resKi) where
toExpr = \case
CMacro.GenerativeTyCon tc -> Expr.App "GenerativeTyCon" [toExpr tc]
Expand Down
1 change: 0 additions & 1 deletion hs-bindgen/tests/Rust.hs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ callProcessCwd pwd cmd args = do
ExitSuccess -> return ()
ExitFailure _r -> fail "callProcessCwd"


getRustBindgen' :: IO FilePath
getRustBindgen' = do
tmpDir <- getCanonicalTemporaryDirectory
Expand Down

0 comments on commit 9651ba0

Please sign in to comment.