Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

build and run on GHC7 and windows

  • Loading branch information...
commit 1b1b82927dc35eb86fd29742b8873a383dace102 1 parent f4e4c88
JP Moresmau JPMoresmau authored
12 roguestar-engine/roguestar-engine.cabal
View
@@ -5,14 +5,14 @@ build-type: Simple
license: OtherLicense
license-file: LICENSE
maintainer: Christopher Lane Hinson <lane@downstairspeople.org>
-build-depends: hslogger >=1.1.0 && <1.2,
+build-depends: hslogger >=1.1.0 ,
priority-sync >=0.2.1.0 && <0.3, PSQueue >=1.1 && <1.2,
- bytestring >=0.9.1.5 && <0.10, parallel >=2.2.0.1 && <2.3,
- stm >=2.1.1.2 && <2.2, data-memocombinators >=0.4.0 && <0.5,
+ bytestring >=0.9.1.5, parallel >=2.2.0.1 ,
+ stm >=2.1.1.2, data-memocombinators >=0.4.0 && <0.5,
MonadRandom >=0.1.4 && <0.2, MaybeT >=0.1.2 && <0.2,
- mtl >=1.1.0.2 && <1.2, random >=1.0.0.2 && <1.1,
+ mtl >=1.1.0.2, random >=1.0.0.2 && <1.1,
old-time >=1.0.0.3 && <1.1, array >=0.3.0.0 && <0.3.1,
- containers >=0.3.0.0 && <0.3.1, base >=4 && <5
+ containers >=0.3.0.0, base >=4 && <5
homepage: http://roguestar.downstairspeople.org/
synopsis: Sci-fi roguelike game. Backend.
description: Requires roguestar and roguestar-glut.
@@ -36,4 +36,4 @@ other-modules: TravelData VisibilityData Stats FactionData Behavior
NodeData CharacterAdvancement
ghc-prof-options: -prof -auto-all
ghc-shared-options: -prof -auto-all
-ghc-options: -threaded -fno-warn-type-defaults
+ghc-options: -threaded -fno-warn-type-defaults -rtsopts=all
4 roguestar-engine/src/DB.hs
View
@@ -192,9 +192,9 @@ mapRO f xs = liftM (`using` parList rwhnf) $ mapM (dbSimulate . f) xs
sortByRO :: (DBReadable db,Ord b) => (forall m. DBReadable m => a -> m b) -> [a] -> db [a]
sortByRO f xs =
- liftM (List.map fst . sortBy (comparing snd)) $ flip mapRO xs $ \x ->
+ liftM (List.map fst . sortBy (comparing snd)) $ mapRO (\x ->
do y <- f x
- return (x,y)
+ return (x,y)) xs
-- | Run action synthesized from a read-only action (prepare-execute pattern).
atomic :: (x -> DB ()) -> (forall m. DBReadable m => m x) -> DB x
4 roguestar-engine/src/Protocol.hs
View
@@ -352,11 +352,11 @@ dbDispatchQuery ["object-details",uid] = ro $
do maybe_plane_ref <- dbGetCurrentPlane
(visibles :: [Reference ()]) <- maybe
(return [])
- (flip dbGetVisibleObjectsForFaction Player $ \ref ->
+ (dbGetVisibleObjectsForFaction (\ref ->
do let f = (== uid) . B.pack . show . toUID
let m_wielder = coerceReference ref
m_wield <- maybe (return Nothing) dbGetWielded m_wielder
- return $ maybe False f m_wield || f ref)
+ return $ maybe False f m_wield || f ref) Player)
maybe_plane_ref
let creature_refs = mapMaybe (coerceReferenceTyped _creature) visibles
wielded <- liftM catMaybes $ mapM dbGetWielded creature_refs
10 roguestar-gl/roguestar-gl.cabal
View
@@ -39,16 +39,16 @@ Library
rsagl==0.5,
rsagl-math==0.5,
rsagl-frp==0.5,
- containers>=0.3.0.0 && < 0.4,
+ containers>=0.3.0.0,
arrows>=0.4.1.2 && < 0.5,
- mtl>=1.1.0.2 && < 1.2,
+ mtl>=1.1.0.2,
MonadRandom>=0.1.4 && < 1.2,
OpenGL>=2.4.0.1 && < 2.5,
- filepath>=1.1.0.3 && < 1.2,
+ filepath>=1.1.0.3,
random>=1.0.0.2 && < 1.1,
bytestring>=0.9.1.5 && < 0.10,
- stm>=2.1.1.2 && < 2.2,
+ stm>=2.1.1.2,
priority-sync>=0.2.1.0 && < 0.2.2
- ghc-options: -fno-warn-type-defaults -fexcess-precision
+ ghc-options: -fno-warn-type-defaults -fexcess-precision -rtsopts=all
ghc-prof-options: -prof -auto-all
2  roguestar-glut/roguestar-glut.cabal
View
@@ -21,6 +21,6 @@ Executable roguestar-glut
roguestar-gl==0.5,
GLUT>=2.2.2.0 && < 2.3,
rsagl==0.5
- ghc-options: -threaded -fno-warn-type-defaults -fexcess-precision
+ ghc-options: -threaded -fno-warn-type-defaults -fexcess-precision -rtsopts=all
ghc-prof-options: -prof -auto-all
13 roguestar/src/Main.hs
View
@@ -16,6 +16,7 @@ import qualified Data.ByteString as B
import Data.ByteString.Char8 ()
import GHC.Exts (IsString(..))
import System.Directory
+import System.Info
data Args = Args {
arg_echo_protocol :: Bool,
@@ -97,7 +98,7 @@ main =
["-RTS"] ++
arg_engine args ++
["version","over","begin"]
- let roguestar_engine_bin = arg_prefix args `combine` "roguestar-engine"
+ let roguestar_engine_bin = arg_prefix args `combine` (makeExe "roguestar-engine")
roguestar_gl_bin <- findRoguestarGL args
when (arg_verbose args) $
putStrLn $ "starting process: " ++
@@ -146,14 +147,20 @@ main =
findRoguestarGL :: Args -> IO FilePath
findRoguestarGL args =
- do let roguestar_glut = arg_prefix args `combine` "roguestar-glut"
- let roguestar_gtk = arg_prefix args `combine` "roguestar-gtk"
+ do let roguestar_glut = arg_prefix args `combine` (makeExe "roguestar-glut")
+ let roguestar_gtk = arg_prefix args `combine` (makeExe "roguestar-gtk")
does_roguestar_glut_exist <- doesFileExist roguestar_glut
does_roguestar_gtk_exist <- doesFileExist roguestar_gtk
return $ case () of
() | does_roguestar_gtk_exist -> roguestar_gtk
() | does_roguestar_glut_exist -> roguestar_glut
+
+makeExe s= if elem os ["mingw32","cygwin32","win32"]
+ then s ++ ".exe"
+ else s
+
+
data Destination = DHandle Handle | DChan (Chan B.ByteString) | DChanTime (Chan B.ByteString)
send :: Destination -> B.ByteString -> IO ()
6 rsagl-frp/rsagl-frp.cabal
View
@@ -40,7 +40,7 @@ Library
old-time>= 1.0.0.3 && < 1.1,
array>= 0.3.0.0 && < 0.4,
arrows>= 0.4.1.2 && < 0.5,
- containers>= 0.3.0.0 && < 0.4,
- mtl>= 1.1.0.2 && < 1.2,
- stm>= 2.1.1.2 && < 2.2
+ containers>= 0.3.0.0,
+ mtl>= 1.1.0.2,
+ stm>= 2.1.1.2
1  rsagl-math/RSAGL/Math/Curve.hs
View
@@ -47,6 +47,7 @@ import RSAGL.Math.Angle
import RSAGL.Math.Affine
import Data.List
import Data.Maybe
+import Control.DeepSeq
import Control.Parallel.Strategies
import Control.Applicative
import RSAGL.Math.AbstractVector
1  rsagl-math/RSAGL/Math/Vector.lhs
View
@@ -40,6 +40,7 @@ module RSAGL.Math.Vector
orthos)
where
+import Control.DeepSeq
import Control.Parallel.Strategies
import RSAGL.Math.Angle
import System.Random
7 rsagl-math/rsagl-math.cabal
View
@@ -42,11 +42,12 @@ Library
build-depends: base>=4 && <5,
random>= 1.0.0.2 && < 1.1,
array>= 0.3.0.0 && < 0.4,
- containers>= 0.3.0.0 && < 0.4,
+ containers>= 0.3.0.0,
OpenGL>= 2.4.0.1 && < 2.5,
OpenGLRaw>= 1.1.0.1 && < 1.2,
parsec>=3.1.0 && < 3.2,
- parallel>=2.2.0.1 && < 2.3,
+ parallel>=2.2.0.1,
Vec>=0.9.8 && < 0.10,
- Vec-OpenGLRaw>=0.2.0.0 && < 0.3
+ Vec-OpenGLRaw>=0.2.0.0 && < 0.3,
+ deepseq>=1.1
1  rsagl/RSAGL/Auxiliary/ApplicativeWrapper.hs
View
@@ -11,6 +11,7 @@ module RSAGL.Auxiliary.ApplicativeWrapper
import Control.Applicative
import Data.Maybe
+import Control.DeepSeq
import Control.Parallel.Strategies
import RSAGL.Math.AbstractVector
1  rsagl/RSAGL/Color/Alpha.hs
View
@@ -6,6 +6,7 @@ module RSAGL.Color.Alpha
import RSAGL.Math.Types
import RSAGL.Color.Auxiliary
import RSAGL.Math.AbstractVector
+import Control.DeepSeq
import Control.Parallel.Strategies
import Control.Applicative
import RSAGL.Color.ColorSpace
1  rsagl/RSAGL/Color/RGB.hs
View
@@ -17,6 +17,7 @@ import RSAGL.Color.ColorSpace
import RSAGL.Color.Auxiliary
import RSAGL.Math.Vector
import RSAGL.Math.AbstractVector
+import Control.DeepSeq
import Control.Parallel.Strategies
-- | A color in the red-green-blue color space.
1  rsagl/RSAGL/Modeling/Material.hs
View
@@ -17,6 +17,7 @@ import Control.Applicative
import RSAGL.Color
import RSAGL.Math.Curve
import RSAGL.Auxiliary.ApplicativeWrapper
+import Control.DeepSeq
import Control.Parallel.Strategies
import Graphics.Rendering.OpenGL.GL hiding (RGB,RGBA,Alpha)
import RSAGL.Math.Types
1  rsagl/RSAGL/Modeling/Model.lhs
View
@@ -71,6 +71,7 @@ import Data.List as List
import Data.Maybe
import qualified Control.Monad.State as State
import Data.Monoid
+import Control.DeepSeq
import Control.Parallel.Strategies
import Graphics.Rendering.OpenGL.GL hiding (translate,rotate,scale,specular)
import RSAGL.Modeling.OpenGLPrimitives
1  rsagl/RSAGL/Modeling/Tesselation.hs
View
@@ -16,6 +16,7 @@ import RSAGL.Auxiliary.Auxiliary
import RSAGL.Math.Affine
import RSAGL.Math.BoundingBox
import Data.List
+import Control.DeepSeq
import Control.Parallel.Strategies hiding (r0)
import Control.Arrow
import Graphics.Rendering.OpenGL.GL.BeginEnd
11 rsagl/rsagl.cabal
View
@@ -56,14 +56,15 @@ Library
random>= 1.0.0.2 && < 1.1,
array>= 0.3.0.0 && < 0.4,
arrows>= 0.4.1.2 && < 0.5,
- containers>= 0.3.0.0 && < 0.4,
- parallel>= 2.2.0.1 && < 2.3,
- mtl>= 1.1.0.2 && < 1.2,
+ containers>= 0.3.0.0,
+ parallel>= 2.2.0.1,
+ mtl>= 1.1.0.2 ,
OpenGL>= 2.4.0.1 && < 2.5,
OpenGLRaw>= 1.1.0.1 && < 1.2,
parsec>=3.1.0 && < 3.2,
Vec>=0.9.8 && < 0.10,
Vec-OpenGLRaw>=0.2.0.0 && < 0.3,
- stm>= 2.1.1.2 && < 2.2,
- data-memocombinators>= 0.4.0 && < 0.5
+ stm>= 2.1.1.2,
+ data-memocombinators>= 0.4.0 && < 0.5,
+ deepseq>=1.1
Please sign in to comment.
Something went wrong with that request. Please try again.