Skip to content

Commit

Permalink
chore: code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Anut-py committed May 18, 2024
1 parent 85b18fc commit ff4ae16
Show file tree
Hide file tree
Showing 42 changed files with 9 additions and 54 deletions.
2 changes: 0 additions & 2 deletions examples/basic-audio/src/Main.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{-# OPTIONS -Wall #-}

module Main where

import Control.Monad (unless, void)
Expand Down
1 change: 0 additions & 1 deletion examples/basic-automation-events/src/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE PatternSynonyms #-}

module Main where
Expand Down
1 change: 0 additions & 1 deletion examples/basic-callbacks/src/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where

Expand Down
1 change: 0 additions & 1 deletion examples/basic-images/src/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE PatternSynonyms #-}
module Main where

Expand Down
1 change: 0 additions & 1 deletion examples/basic-models/src/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE PatternSynonyms #-}

module Main where
Expand Down
1 change: 0 additions & 1 deletion examples/basic-rlgl/src/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE PatternSynonyms #-}

module Main where
Expand Down
1 change: 0 additions & 1 deletion examples/basic-shaders/src/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE PatternSynonyms #-}

module Main where
Expand Down
1 change: 0 additions & 1 deletion examples/basic-window/src/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where

Expand Down
1 change: 0 additions & 1 deletion examples/bunnymark/src/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE TemplateHaskell #-}

Expand Down
1 change: 0 additions & 1 deletion examples/camera-ray-collision/src/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE PatternSynonyms #-}

module Main where
Expand Down
1 change: 0 additions & 1 deletion examples/custom-font-text/src/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE PatternSynonyms #-}

module Main where
Expand Down
1 change: 0 additions & 1 deletion examples/first-person-camera/src/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE PatternSynonyms #-}

module Main where
Expand Down
1 change: 0 additions & 1 deletion examples/postprocessing-effects/src/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE PatternSynonyms #-}

module Main where
Expand Down
1 change: 0 additions & 1 deletion examples/raygui-suite/src/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE TemplateHaskell #-}

module Main where
Expand Down
11 changes: 8 additions & 3 deletions h-raylib.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ common example-options
other-extensions:
BangPatterns
TemplateHaskell

ghc-options: -Wall

if flag(platform-web)
ghc-options:
Expand Down Expand Up @@ -246,9 +248,12 @@ library
DeriveAnyClass
FlexibleInstances
ForeignFunctionInterface
PatternSynonyms
ScopedTypeVariables
TemplateHaskell
TemplateHaskellQuotes

ghc-options: -Wall

if (flag(platform-windows) || (flag(detect-platform) && os(windows)))
if flag(mingw-cross)
Expand Down Expand Up @@ -312,7 +317,7 @@ library
c-sources: lib/web.c

else
cc-options: -DPLATFORM_DESKTOP
cc-options: -DPLATFORM_DESKTOP -Wno-int-to-void-pointer-cast
c-sources:
lib/rgui_bindings.c
lib/rl_bindings.c
Expand All @@ -325,8 +330,8 @@ library
raylib/src/external/glfw/include raygui/src raygui/styles/amber
raygui/styles/ashes raygui/styles/bluish raygui/styles/candy
raygui/styles/cherry raygui/styles/cyber raygui/styles/dark
raygui/styles/default raygui/styles/enefete raygui/styles/jungle
raygui/styles/lavanda raygui/styles/sunny raygui/styles/terminal
raygui/styles/enefete raygui/styles/jungle raygui/styles/lavanda
raygui/styles/sunny raygui/styles/terminal

c-sources:
raylib/src/raudio.c
Expand Down
1 change: 0 additions & 1 deletion src/Raylib/Core.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}

Expand Down
1 change: 0 additions & 1 deletion src/Raylib/Core/Audio.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}

Expand Down
1 change: 0 additions & 1 deletion src/Raylib/Core/Camera.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE TemplateHaskell #-}

-- | Bindings to @rcamera@ (raylib.h)
Expand Down
1 change: 0 additions & 1 deletion src/Raylib/Core/Models.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE TemplateHaskell #-}

-- | Bindings to @rmodels@
Expand Down
1 change: 0 additions & 1 deletion src/Raylib/Core/Shapes.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE PatternSynonyms #-}

Expand Down
1 change: 0 additions & 1 deletion src/Raylib/Core/Text.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE TemplateHaskell #-}

-- | Bindings to @rtext@
Expand Down
1 change: 0 additions & 1 deletion src/Raylib/Core/Textures.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE TemplateHaskell #-}

-- | Bindings to @rtextures@
Expand Down
1 change: 0 additions & 1 deletion src/Raylib/Internal.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE CPP #-}
{-# OPTIONS -Wall #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}

Expand Down
1 change: 0 additions & 1 deletion src/Raylib/Internal/Foreign.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}

Expand Down
1 change: 0 additions & 1 deletion src/Raylib/Internal/Web/Processable.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE CPP #-}
{-# OPTIONS -Wall #-}
{-# LANGUAGE ConstrainedClassMethods #-}

-- | Internal code to convert Haskell types to raw bytes
Expand Down
2 changes: 0 additions & 2 deletions src/Raylib/Types.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{-# OPTIONS -Wall #-}

-- |
--
-- Each @Types@ module has up to 4 sections: one for enumerations, one for
Expand Down
1 change: 0 additions & 1 deletion src/Raylib/Types/Core.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE PatternSynonyms #-}

Expand Down
2 changes: 0 additions & 2 deletions src/Raylib/Types/Core/Audio.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{-# LANGUAGE DeriveAnyClass #-}

{-# OPTIONS -Wall #-}

-- | Bindings for types used in @raudio@
module Raylib.Types.Core.Audio
( -- * Enumerations
Expand Down
2 changes: 0 additions & 2 deletions src/Raylib/Types/Core/Camera.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{-# LANGUAGE DeriveAnyClass #-}

{-# OPTIONS -Wall #-}

-- | Bindings for camera-related types
module Raylib.Types.Core.Camera
( -- * Enumerations
Expand Down
2 changes: 0 additions & 2 deletions src/Raylib/Types/Core/Models.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE PatternSynonyms #-}

{-# OPTIONS -Wall #-}

-- | Bindings for types used mainly in @rmodels@
module Raylib.Types.Core.Models
( -- * Enumerations
Expand Down
2 changes: 0 additions & 2 deletions src/Raylib/Types/Core/Text.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{-# OPTIONS -Wall #-}

-- | Bindings for types used in @rtext@
module Raylib.Types.Core.Text
( -- * Enumerations
Expand Down
2 changes: 0 additions & 2 deletions src/Raylib/Types/Core/Textures.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{-# LANGUAGE DeriveAnyClass #-}

{-# OPTIONS -Wall #-}

-- | Bindings for types used mainly in @rtextures@
module Raylib.Types.Core.Textures
( -- * Enumerations
Expand Down
1 change: 0 additions & 1 deletion src/Raylib/Types/Util/GUI.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE DeriveAnyClass #-}

-- | Bindings for types used in @raygui@
Expand Down
2 changes: 0 additions & 2 deletions src/Raylib/Types/Util/RLGL.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{-# LANGUAGE DeriveAnyClass #-}

{-# OPTIONS -Wall #-}

-- | Bindings for types used in @rlgl@
module Raylib.Types.Util.RLGL
( -- * Enumerations
Expand Down
1 change: 0 additions & 1 deletion src/Raylib/Util.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskellQuotes #-}

Expand Down
3 changes: 1 addition & 2 deletions src/Raylib/Util/Camera.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE PatternSynonyms #-}

-- | Bindings to @rcamera@ (rcamera.h)
Expand All @@ -22,7 +21,7 @@ module Raylib.Util.Camera
)
where

import Raylib.Types (Camera, Camera3D (..), CameraProjection (CameraOrthographic, CameraPerspective), Matrix, Vector3, vector3'y, pattern Vector3)
import Raylib.Types (Camera, Camera3D (..), CameraProjection (CameraOrthographic, CameraPerspective), Matrix, Vector3, vector3'y)
import Raylib.Util.Math (Vector (..), clamp, deg2Rad, matrixLookAt, matrixOrtho, matrixPerspective, vector3Angle, vector3CrossProduct, vector3RotateByAxisAngle)

-- | The camera's forward vector (normalized)
Expand Down
2 changes: 0 additions & 2 deletions src/Raylib/Util/Colors.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{-# OPTIONS -Wall #-}

-- | Simple color palette defined in raylib.h
module Raylib.Util.Colors
( lightGray,
Expand Down
1 change: 0 additions & 1 deletion src/Raylib/Util/GUI.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE PatternSynonyms #-}

Expand Down
1 change: 0 additions & 1 deletion src/Raylib/Util/GUI/Styles.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE TemplateHaskell #-}

-- | Predefined styles that come with raygui. Calling one of these functions
Expand Down
1 change: 0 additions & 1 deletion src/Raylib/Util/Lenses.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE PatternSynonyms #-}
{-# OPTIONS -Wall #-}
{-# LANGUAGE TemplateHaskell #-}

-- | Lenses for raylib types
Expand Down
1 change: 0 additions & 1 deletion src/Raylib/Util/Math.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
Expand Down
1 change: 0 additions & 1 deletion src/Raylib/Util/RLGL.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -Wall #-}
{-# LANGUAGE TemplateHaskell #-}

-- | Bindings to @rlgl@
Expand Down

0 comments on commit ff4ae16

Please sign in to comment.