Skip to content

Remove primes from foreign modules exports #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Web/HTML/HTMLImageElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports.create = function () {
};
};

exports["create'"] = function (width) {
exports.createWithDimensions = function (width) {
return function (height) {
return function () {
return new Image(width, height);
Expand Down
42 changes: 40 additions & 2 deletions src/Web/HTML/HTMLImageElement.purs
Original file line number Diff line number Diff line change
@@ -1,4 +1,39 @@
module Web.HTML.HTMLImageElement where
module Web.HTML.HTMLImageElement
( HTMLImageElement
, fromHTMLElement
, fromElement
, fromNode
, fromChildNode
, fromNonDocumentTypeChildNode
, fromParentNode
, fromEventTarget
, toHTMLElement
, toElement
, toNode
, toChildNode
, toNonDocumentTypeChildNode
, toParentNode
, toEventTarget
, create
, create'
, alt
, setAlt
, src
, setSrc
, crossOrigin
, setCrossOrigin
, useMap
, setUseMap
, isMap
, setIsMap
, width
, setWidth
, height
, setHeight
, naturalWidth
, naturalHeight
, complete
) where

import Data.Maybe (Maybe)
import Effect (Effect)
Expand Down Expand Up @@ -55,7 +90,10 @@ toEventTarget = unsafeCoerce


foreign import create :: Unit -> Effect HTMLImageElement
foreign import create' :: Int -> Int -> Effect HTMLImageElement
foreign import createWithDimensions :: Int -> Int -> Effect HTMLImageElement

create' :: Int -> Int -> Effect HTMLImageElement
create' = createWithDimensions

foreign import alt :: HTMLImageElement -> Effect String
foreign import setAlt :: String -> HTMLImageElement -> Effect Unit
Expand Down
4 changes: 2 additions & 2 deletions src/Web/HTML/HTMLInputElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ exports.setWidth = function (width) {

// ----------------------------------------------------------------------------

exports["stepUp'"] = function (n) {
exports.stepUpBy = function (n) {
return function (input) {
return function () {
input.stepUp(n);
Expand All @@ -578,7 +578,7 @@ exports["stepUp'"] = function (n) {

// ----------------------------------------------------------------------------

exports["stepDown'"] = function (n) {
exports.stepDownBy = function (n) {
return function (input) {
return function () {
input.stepDown(n);
Expand Down
10 changes: 8 additions & 2 deletions src/Web/HTML/HTMLInputElement.purs
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,18 @@ foreign import setWidth :: Int -> HTMLInputElement -> Effect Unit
stepUp :: HTMLInputElement -> Effect Unit
stepUp = stepUp' 1

foreign import stepUp' :: Int -> HTMLInputElement -> Effect Unit
foreign import stepUpBy :: Int -> HTMLInputElement -> Effect Unit

stepUp' :: Int -> HTMLInputElement -> Effect Unit
stepUp' = stepUpBy

stepDown :: HTMLInputElement -> Effect Unit
stepDown = stepDown' 1

foreign import stepDown' :: Int -> HTMLInputElement -> Effect Unit
foreign import stepDownBy :: Int -> HTMLInputElement -> Effect Unit

stepDown' :: Int -> HTMLInputElement -> Effect Unit
stepDown' = stepDownBy

foreign import willValidate :: HTMLInputElement -> Effect Boolean

Expand Down
2 changes: 1 addition & 1 deletion src/Web/HTML/HTMLTableElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ exports.rows = function (table) {

// ----------------------------------------------------------------------------

exports["insertRow'"] = function (index) {
exports.insertRowAt = function (index) {
return function (table) {
return function () {
return table.insertRow(index);
Expand Down
5 changes: 4 additions & 1 deletion src/Web/HTML/HTMLTableElement.purs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ foreign import rows :: HTMLTableElement -> Effect HTMLCollection
insertRow :: HTMLTableElement -> Effect HTMLElement
insertRow = insertRow' (-1)

foreign import insertRow' :: Int -> HTMLTableElement -> Effect HTMLElement
foreign import insertRowAt :: Int -> HTMLTableElement -> Effect HTMLElement

insertRow' :: Int -> HTMLTableElement -> Effect HTMLElement
insertRow' = insertRowAt

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

Expand Down
2 changes: 1 addition & 1 deletion src/Web/HTML/HTMLTableRowElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ exports.cells = function (row) {

// ----------------------------------------------------------------------------

exports["insertCell'"] = function (index) {
exports.insertCellAt = function (index) {
return function (row) {
return function () {
return row.insertCell(index);
Expand Down
29 changes: 27 additions & 2 deletions src/Web/HTML/HTMLTableRowElement.purs
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
module Web.HTML.HTMLTableRowElement where
module Web.HTML.HTMLTableRowElement
( HTMLTableRowElement
, fromHTMLElement
, fromElement
, fromNode
, fromChildNode
, fromNonDocumentTypeChildNode
, fromParentNode
, fromEventTarget
, toHTMLElement
, toElement
, toNode
, toChildNode
, toNonDocumentTypeChildNode
, toParentNode
, toEventTarget
, rowIndex
, sectionRowIndex
, cells
, insertCell
, insertCell'
, deleteCell
) where

import Data.Maybe (Maybe)
import Effect (Effect)
Expand Down Expand Up @@ -63,6 +85,9 @@ foreign import cells :: HTMLTableRowElement -> Effect HTMLCollection
insertCell :: HTMLTableRowElement -> Effect HTMLElement
insertCell = insertCell' (-1)

foreign import insertCell' :: Int -> HTMLTableRowElement -> Effect HTMLElement
foreign import insertCellAt :: Int -> HTMLTableRowElement -> Effect HTMLElement

insertCell' :: Int -> HTMLTableRowElement -> Effect HTMLElement
insertCell' = insertCellAt

foreign import deleteCell :: Int -> HTMLTableRowElement -> Effect Unit
2 changes: 1 addition & 1 deletion src/Web/HTML/HTMLTableSectionElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports.rows = function (section) {

// ----------------------------------------------------------------------------

exports["insertRow'"] = function (index) {
exports.insertRowAt = function (index) {
return function (section) {
return function () {
return section.insertRow(index);
Expand Down
27 changes: 25 additions & 2 deletions src/Web/HTML/HTMLTableSectionElement.purs
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
module Web.HTML.HTMLTableSectionElement where
module Web.HTML.HTMLTableSectionElement
( HTMLTableSectionElement
, fromHTMLElement
, fromElement
, fromNode
, fromChildNode
, fromNonDocumentTypeChildNode
, fromParentNode
, fromEventTarget
, toHTMLElement
, toElement
, toNode
, toChildNode
, toNonDocumentTypeChildNode
, toParentNode
, toEventTarget
, rows
, insertRow
, insertRow'
, deleteRow
) where

import Prelude

Expand Down Expand Up @@ -60,6 +80,9 @@ foreign import rows :: HTMLTableSectionElement -> Effect HTMLCollection
insertRow :: HTMLTableSectionElement -> Effect HTMLElement
insertRow = insertRow' (-1)

foreign import insertRow' :: Int -> HTMLTableSectionElement -> Effect HTMLElement
foreign import insertRowAt :: Int -> HTMLTableSectionElement -> Effect HTMLElement

insertRow' :: Int -> HTMLTableSectionElement -> Effect HTMLElement
insertRow' = insertRowAt

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