Skip to content

Commit c75e60c

Browse files
committed
Updates for 0.11
1 parent c5c5bbc commit c75e60c

File tree

4 files changed

+41
-52
lines changed

4 files changed

+41
-52
lines changed

bower.json

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,26 @@
2626
"package.json"
2727
],
2828
"dependencies": {
29-
"purescript-prelude": "^2.1.0",
30-
"purescript-monoid": "^2.2.0",
31-
"purescript-control": "^2.0.0",
32-
"purescript-invariant": "^2.0.0",
33-
"purescript-maybe": "^2.0.1",
34-
"purescript-functions": "^2.0.0",
35-
"purescript-arraybuffer-types": "^0.2.0",
36-
"purescript-typedarray": "^1.2.0",
37-
"purescript-vector": "^1.2.0",
38-
"purescript-matrix": "^1.2.0",
39-
"purescript-extensions": "^1.2.1",
40-
"purescript-integers": "^2.1.0",
41-
"purescript-foldable-traversable": "^2.0.0",
42-
"purescript-eff": "^2.0.0",
43-
"purescript-either": "^2.1.0",
44-
"purescript-tuples": "^3.1.0",
45-
"purescript-unfoldable": "^2.0.0",
46-
"purescript-canvas": "^2.0.0"
29+
"purescript-prelude": "^3.0.0",
30+
"purescript-monoid": "^3.0.0",
31+
"purescript-control": "^3.0.0",
32+
"purescript-invariant": "^3.0.0",
33+
"purescript-maybe": "^3.0.0",
34+
"purescript-functions": "^3.0.0",
35+
"purescript-arraybuffer-types": "^2.0.0",
36+
"purescript-typedarray": "^2.0.0",
37+
"purescript-vector": "^2.0.0",
38+
"purescript-matrix": "^2.0.0",
39+
"purescript-extensions": "^2.0.0",
40+
"purescript-integers": "^3.0.0",
41+
"purescript-foldable-traversable": "^3.0.0",
42+
"purescript-eff": "^3.0.0",
43+
"purescript-either": "^3.0.0",
44+
"purescript-tuples": "^4.0.0",
45+
"purescript-unfoldable": "^3.0.0",
46+
"purescript-canvas": "^3.0.0"
4747
},
4848
"resolutions": {
49-
"purescript-invariant": "^2.0.0",
50-
"purescript-monoid": "^2.0.0",
51-
"purescript-functions": "^2.0.0",
52-
"purescript-maybe": "^2.0.1",
53-
"purescript-control": "^2.0.0",
54-
"purescript-prelude": "^2.1.0",
55-
"purescript-either": "^2.1.0",
56-
"purescript-foldable-traversable": "^2.0.0",
57-
"purescript-eff": "^2.0.0",
58-
"purescript-bifunctors": "^2.0.0",
59-
"purescript-canvas": "^2.0.0",
60-
"purescript-exceptions": "^2.0.0"
49+
"purescript-arraybuffer-types": "^2.0.0"
6150
}
6251
}

src/Control/Monad/Eff/WebGL.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
module Control.Monad.Eff.WebGL where
1616

17-
import Control.Monad.Eff (Eff)
17+
import Control.Monad.Eff (kind Effect, Eff)
1818

19-
foreign import data WebGl :: !
19+
foreign import data WebGl :: Effect
2020

2121
type EffWebGL eff a = Eff (webgl :: WebGl | eff) a
2222

src/Graphics/WebGL.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ bindAttribLocation :: forall eff. WebGLProg -> Int -> String -> Eff (webgl :: We
227227
bindAttribLocation (WebGLProg p) i s = bindAttribLocation_ p i s
228228

229229
type Buffer a = {
230-
webGLBuffer :: WebGLBuffer,
230+
webGLBuffer :: WebGLBuffer a,
231231
bufferType :: Int,
232232
bufferSize :: Int
233233
}

src/Graphics/WebGLRaw.purs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Graphics.WebGLRaw where
44
import Prelude
55
import Control.Monad.Eff (Eff)
66
import Control.Monad.Eff.WebGL (WebGl)
7-
import Data.ArrayBuffer.Types (Int32Array, Float32Array)
7+
import Data.ArrayBuffer.Types (Int32Array, Float32Array, kind ArrayViewType, ArrayView)
88

99

1010
type GLenum = Int
@@ -22,21 +22,21 @@ type GLuint = Int
2222
type GLfloat = Number
2323
type GLclampf = Number
2424
type FloatArray = Float32Array
25+
type WebGLBuffer a = ArrayView a
2526

2627
-- *TypeDecls
27-
foreign import data WebGLContextAttributes :: *
28-
foreign import data WebGLProgram :: *
29-
foreign import data WebGLShader :: *
30-
foreign import data WebGLBuffer :: *
31-
foreign import data WebGLFramebuffer :: *
32-
foreign import data WebGLRenderbuffer :: *
33-
foreign import data WebGLTexture :: *
34-
foreign import data WebGLActiveInfo :: *
35-
foreign import data WebGLUniformLocation :: *
36-
foreign import data ArrayBufferView :: *
37-
foreign import data ImageData :: *
38-
foreign import data HTMLImageElement :: *
39-
foreign import data HTMLVideoElement :: *
28+
foreign import data WebGLContextAttributes :: Type
29+
foreign import data WebGLProgram :: Type
30+
foreign import data WebGLShader :: Type
31+
foreign import data WebGLFramebuffer :: Type
32+
foreign import data WebGLRenderbuffer :: Type
33+
foreign import data WebGLTexture :: Type
34+
foreign import data WebGLActiveInfo :: Type
35+
foreign import data WebGLUniformLocation :: Type
36+
foreign import data ArrayBufferView :: Type
37+
foreign import data ImageData :: Type
38+
foreign import data HTMLImageElement :: Type
39+
foreign import data HTMLVideoElement :: Type
4040

4141
-- *Constants
4242
_DEPTH_BUFFER_BIT :: Int
@@ -962,8 +962,8 @@ foreign import bindAttribLocation_:: forall eff. WebGLProgram->
962962
String
963963
-> (Eff (webgl :: WebGl | eff) Unit)
964964

965-
foreign import bindBuffer_:: forall eff. GLenum->
966-
WebGLBuffer
965+
foreign import bindBuffer_:: forall a eff. GLenum->
966+
WebGLBuffer a
967967
-> (Eff (webgl :: WebGl | eff) Unit)
968968

969969
foreign import bindFramebuffer_:: forall eff. GLenum->
@@ -1058,7 +1058,7 @@ foreign import copyTexSubImage2D_:: forall eff. GLenum->
10581058
GLsizei
10591059
-> (Eff (webgl :: WebGl | eff) Unit)
10601060

1061-
foreign import createBuffer_:: forall eff. (Eff (webgl :: WebGl | eff) WebGLBuffer)
1061+
foreign import createBuffer_:: forall a eff. Eff (webgl :: WebGl | eff) (WebGLBuffer a)
10621062

10631063
foreign import createFramebuffer_:: forall eff. (Eff (webgl :: WebGl | eff) WebGLFramebuffer)
10641064

@@ -1074,7 +1074,7 @@ foreign import createTexture_:: forall eff. (Eff (webgl :: WebGl | eff) WebGLTex
10741074
foreign import cullFace_:: forall eff. GLenum
10751075
-> (Eff (webgl :: WebGl | eff) Unit)
10761076

1077-
foreign import deleteBuffer_:: forall eff. WebGLBuffer
1077+
foreign import deleteBuffer_:: forall a eff. WebGLBuffer a
10781078
-> (Eff (webgl :: WebGl | eff) Unit)
10791079

10801080
foreign import deleteFramebuffer_:: forall eff. WebGLFramebuffer
@@ -1226,7 +1226,7 @@ foreign import hint_:: forall eff. GLenum->
12261226
GLenum
12271227
-> (Eff (webgl :: WebGl | eff) Unit)
12281228

1229-
foreign import isBuffer_:: forall eff. WebGLBuffer
1229+
foreign import isBuffer_:: forall a eff. WebGLBuffer a
12301230
-> (Eff (webgl :: WebGl | eff) GLboolean)
12311231

12321232
foreign import isEnabled_:: forall eff. GLenum

0 commit comments

Comments
 (0)