Skip to content

Commit 5a19c76

Browse files
authored
Merge pull request #24 from kl0tl/no-foreign-primes
Remove primes from foreign modules exports
2 parents c90d0a6 + 4b00217 commit 5a19c76

10 files changed

+110
-15
lines changed

src/Web/HTML/HTMLImageElement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exports.create = function () {
77
};
88
};
99

10-
exports["create'"] = function (width) {
10+
exports.createWithDimensions = function (width) {
1111
return function (height) {
1212
return function () {
1313
return new Image(width, height);

src/Web/HTML/HTMLImageElement.purs

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,39 @@
1-
module Web.HTML.HTMLImageElement where
1+
module Web.HTML.HTMLImageElement
2+
( HTMLImageElement
3+
, fromHTMLElement
4+
, fromElement
5+
, fromNode
6+
, fromChildNode
7+
, fromNonDocumentTypeChildNode
8+
, fromParentNode
9+
, fromEventTarget
10+
, toHTMLElement
11+
, toElement
12+
, toNode
13+
, toChildNode
14+
, toNonDocumentTypeChildNode
15+
, toParentNode
16+
, toEventTarget
17+
, create
18+
, create'
19+
, alt
20+
, setAlt
21+
, src
22+
, setSrc
23+
, crossOrigin
24+
, setCrossOrigin
25+
, useMap
26+
, setUseMap
27+
, isMap
28+
, setIsMap
29+
, width
30+
, setWidth
31+
, height
32+
, setHeight
33+
, naturalWidth
34+
, naturalHeight
35+
, complete
36+
) where
237

338
import Data.Maybe (Maybe)
439
import Effect (Effect)
@@ -55,7 +90,10 @@ toEventTarget = unsafeCoerce
5590

5691

5792
foreign import create :: Unit -> Effect HTMLImageElement
58-
foreign import create' :: Int -> Int -> Effect HTMLImageElement
93+
foreign import createWithDimensions :: Int -> Int -> Effect HTMLImageElement
94+
95+
create' :: Int -> Int -> Effect HTMLImageElement
96+
create' = createWithDimensions
5997

6098
foreign import alt :: HTMLImageElement -> Effect String
6199
foreign import setAlt :: String -> HTMLImageElement -> Effect Unit

src/Web/HTML/HTMLInputElement.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ exports.setWidth = function (width) {
568568

569569
// ----------------------------------------------------------------------------
570570

571-
exports["stepUp'"] = function (n) {
571+
exports.stepUpBy = function (n) {
572572
return function (input) {
573573
return function () {
574574
input.stepUp(n);
@@ -578,7 +578,7 @@ exports["stepUp'"] = function (n) {
578578

579579
// ----------------------------------------------------------------------------
580580

581-
exports["stepDown'"] = function (n) {
581+
exports.stepDownBy = function (n) {
582582
return function (input) {
583583
return function () {
584584
input.stepDown(n);

src/Web/HTML/HTMLInputElement.purs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,12 +290,18 @@ foreign import setWidth :: Int -> HTMLInputElement -> Effect Unit
290290
stepUp :: HTMLInputElement -> Effect Unit
291291
stepUp = stepUp' 1
292292

293-
foreign import stepUp' :: Int -> HTMLInputElement -> Effect Unit
293+
foreign import stepUpBy :: Int -> HTMLInputElement -> Effect Unit
294+
295+
stepUp' :: Int -> HTMLInputElement -> Effect Unit
296+
stepUp' = stepUpBy
294297

295298
stepDown :: HTMLInputElement -> Effect Unit
296299
stepDown = stepDown' 1
297300

298-
foreign import stepDown' :: Int -> HTMLInputElement -> Effect Unit
301+
foreign import stepDownBy :: Int -> HTMLInputElement -> Effect Unit
302+
303+
stepDown' :: Int -> HTMLInputElement -> Effect Unit
304+
stepDown' = stepDownBy
299305

300306
foreign import willValidate :: HTMLInputElement -> Effect Boolean
301307

src/Web/HTML/HTMLTableElement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ exports.rows = function (table) {
120120

121121
// ----------------------------------------------------------------------------
122122

123-
exports["insertRow'"] = function (index) {
123+
exports.insertRowAt = function (index) {
124124
return function (table) {
125125
return function () {
126126
return table.insertRow(index);

src/Web/HTML/HTMLTableElement.purs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ foreign import rows :: HTMLTableElement -> Effect HTMLCollection
138138
insertRow :: HTMLTableElement -> Effect HTMLElement
139139
insertRow = insertRow' (-1)
140140

141-
foreign import insertRow' :: Int -> HTMLTableElement -> Effect HTMLElement
141+
foreign import insertRowAt :: Int -> HTMLTableElement -> Effect HTMLElement
142+
143+
insertRow' :: Int -> HTMLTableElement -> Effect HTMLElement
144+
insertRow' = insertRowAt
142145

143146
foreign import deleteRow :: Int -> HTMLTableElement -> Effect Unit
144147

src/Web/HTML/HTMLTableRowElement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ exports.cells = function (row) {
3232

3333
// ----------------------------------------------------------------------------
3434

35-
exports["insertCell'"] = function (index) {
35+
exports.insertCellAt = function (index) {
3636
return function (row) {
3737
return function () {
3838
return row.insertCell(index);

src/Web/HTML/HTMLTableRowElement.purs

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
1-
module Web.HTML.HTMLTableRowElement where
1+
module Web.HTML.HTMLTableRowElement
2+
( HTMLTableRowElement
3+
, fromHTMLElement
4+
, fromElement
5+
, fromNode
6+
, fromChildNode
7+
, fromNonDocumentTypeChildNode
8+
, fromParentNode
9+
, fromEventTarget
10+
, toHTMLElement
11+
, toElement
12+
, toNode
13+
, toChildNode
14+
, toNonDocumentTypeChildNode
15+
, toParentNode
16+
, toEventTarget
17+
, rowIndex
18+
, sectionRowIndex
19+
, cells
20+
, insertCell
21+
, insertCell'
22+
, deleteCell
23+
) where
224

325
import Data.Maybe (Maybe)
426
import Effect (Effect)
@@ -63,6 +85,9 @@ foreign import cells :: HTMLTableRowElement -> Effect HTMLCollection
6385
insertCell :: HTMLTableRowElement -> Effect HTMLElement
6486
insertCell = insertCell' (-1)
6587

66-
foreign import insertCell' :: Int -> HTMLTableRowElement -> Effect HTMLElement
88+
foreign import insertCellAt :: Int -> HTMLTableRowElement -> Effect HTMLElement
89+
90+
insertCell' :: Int -> HTMLTableRowElement -> Effect HTMLElement
91+
insertCell' = insertCellAt
6792

6893
foreign import deleteCell :: Int -> HTMLTableRowElement -> Effect Unit

src/Web/HTML/HTMLTableSectionElement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ exports.rows = function (section) {
88

99
// ----------------------------------------------------------------------------
1010

11-
exports["insertRow'"] = function (index) {
11+
exports.insertRowAt = function (index) {
1212
return function (section) {
1313
return function () {
1414
return section.insertRow(index);

src/Web/HTML/HTMLTableSectionElement.purs

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
1-
module Web.HTML.HTMLTableSectionElement where
1+
module Web.HTML.HTMLTableSectionElement
2+
( HTMLTableSectionElement
3+
, fromHTMLElement
4+
, fromElement
5+
, fromNode
6+
, fromChildNode
7+
, fromNonDocumentTypeChildNode
8+
, fromParentNode
9+
, fromEventTarget
10+
, toHTMLElement
11+
, toElement
12+
, toNode
13+
, toChildNode
14+
, toNonDocumentTypeChildNode
15+
, toParentNode
16+
, toEventTarget
17+
, rows
18+
, insertRow
19+
, insertRow'
20+
, deleteRow
21+
) where
222

323
import Prelude
424

@@ -60,6 +80,9 @@ foreign import rows :: HTMLTableSectionElement -> Effect HTMLCollection
6080
insertRow :: HTMLTableSectionElement -> Effect HTMLElement
6181
insertRow = insertRow' (-1)
6282

63-
foreign import insertRow' :: Int -> HTMLTableSectionElement -> Effect HTMLElement
83+
foreign import insertRowAt :: Int -> HTMLTableSectionElement -> Effect HTMLElement
84+
85+
insertRow' :: Int -> HTMLTableSectionElement -> Effect HTMLElement
86+
insertRow' = insertRowAt
6487

6588
foreign import deleteRow :: Int -> HTMLTableSectionElement -> Effect Unit

0 commit comments

Comments
 (0)