Permalink
Browse files

Take the OpenGLRawgenBase package into use.

  • Loading branch information...
1 parent ff0946c commit 5354fb4bc38794c247fb5c13ebb61342226f45c3 @Laar committed Mar 13, 2013
View
@@ -42,7 +42,8 @@ executable OpenGLRawgen
mtl -any,
opengl-api -any,
parsec -any,
- xml
+ xml,
+ OpenGLRawgenBase
ghc-options: -Wall -O2 -rtsopts
ghc-shared-options:
ghc-prof-options: -Wall -O2 -rtsopts -prof -auto-all -caf-all
@@ -24,7 +24,7 @@ import Data.Maybe
import Data.Traversable(traverse)
import Language.Haskell.Exts.Syntax
-import Text.OpenGL.Spec(Category, showCategory)
+import Language.OpenGLRaw.Base
import Code.Generating.Utils
@@ -58,7 +58,6 @@ import Control.Monad.Writer
import Language.Haskell.Exts.Syntax
-import Text.OpenGL.Spec as S
import Spec
import Main.Monad
@@ -18,9 +18,8 @@ module Modules.Compatibility (
-----------------------------------------------------------------------------
-import Text.OpenGL.Spec(Category(Version))
-
import Language.Haskell.Exts.Syntax
+import Language.OpenGLRaw.Base
import Modules.Builder
import Modules.GroupModule
@@ -27,7 +27,7 @@ import Control.Monad.Reader
import Data.Maybe(mapMaybe)
import Data.List(nub)
-import Text.OpenGL.Spec(Category(..), Extension)
+import Language.OpenGLRaw.Base
import Modules.Builder
import Modules.ModuleNames
@@ -44,7 +44,7 @@ import Data.List(partition)
import Language.Haskell.Exts.Syntax
import Code.Generating.Utils
-import Text.OpenGL.Spec as S
+import Language.OpenGLRaw.Base
import Main.Monad
-----------------------------------------------------------------------------
@@ -110,7 +110,7 @@ categoryModule (Extension ex n d) = return .
ModuleName
$ moduleBase <.> upperFirst (show ex) <.> correctName n
++ (if d then "Compatibility" else "")
-categoryModule (S.Name n) = throwRawError
+categoryModule (Name n) = throwRawError
$ "categoryModule: Category with only a name "
++ upperFirst (show n)
View
@@ -26,7 +26,7 @@ import Data.List(minimumBy)
import Main.Options
import Spec
-import Text.OpenGL.Spec(Category(..))
+import Language.OpenGLRaw.Base
import Modules.Builder
import Modules.Compatibility
@@ -23,8 +23,8 @@ module Modules.Types (
import Language.Haskell.Exts.Syntax
-import Spec(ValueType(..), FType(..))
-import Text.OpenGL.Spec (Category)
+import Spec(ValueType(..))
+import Language.OpenGLRaw.Base
-----------------------------------------------------------------------------
@@ -64,8 +64,5 @@ data ModulePart
-- | An imported name with specific module.
type Imported = (Name, ModuleName)
--- | The original name of something from OpenGL (thus the name as used in the
--- specification).
-type GLName = String
-----------------------------------------------------------------------------
@@ -22,7 +22,7 @@ module Spec.Processing (
import Data.Monoid
import qualified Data.Set as S
-import Text.OpenGL.Spec(Category(Extension), Extension)
+import Language.OpenGLRaw.Base
import Main.Options
View
@@ -60,7 +60,7 @@ import qualified Data.Set as S
import Data.Maybe
import Language.Haskell.Exts.Syntax(Name(Ident))
-import Text.OpenGL.Spec (Category)
+import Language.OpenGLRaw.Base
import Main.Options
@@ -78,13 +78,6 @@ data EnumValue
| ReUse EnumName ValueType
deriving (Eq, Ord, Show)
-data FType
- = TCon String
- | TVar
- | TPtr FType
- | UnitTCon
- deriving (Eq, Ord, Show)
-
-- | The specification of how the function is defined
data FuncValue
= RawFunc
@@ -93,10 +86,6 @@ data FuncValue
(Maybe String) -- ^ The possible alias.
deriving (Eq, Ord, Show)
--- | The original name of something from OpenGL (thus the name as used in the
--- specification).
-type GLName = String
-
-----------------------------------------------------------------------------

0 comments on commit 5354fb4

Please sign in to comment.