This repository was archived by the owner on Oct 4, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ import Prelude
39
39
import Data.Either (Either (..))
40
40
import Data.Foreign (F , Foreign , unsafeReadTagged )
41
41
import Data.Foreign.Class (class IsForeign )
42
+ import Data.Newtype (class Newtype )
42
43
import Unsafe.Coerce as U
43
44
44
45
-- | Basic type for all DOM events.
@@ -47,8 +48,9 @@ foreign import data Event :: *
47
48
-- | The type of strings used for event types.
48
49
newtype EventType = EventType String
49
50
50
- derive instance eqEventType :: Eq EventType
51
- derive instance ordEventType :: Ord EventType
51
+ derive instance newtypeEventType :: Newtype EventType _
52
+ derive newtype instance eqEventType :: Eq EventType
53
+ derive newtype instance ordEventType :: Ord EventType
52
54
53
55
-- | A DOM item that can emit events.
54
56
foreign import data EventTarget :: *
Original file line number Diff line number Diff line change 1
1
-- http://www.w3.org/TR/dom
2
2
module DOM.Node.Types where
3
3
4
+ import Prelude
5
+ import Data.Newtype (class Newtype )
4
6
import DOM.Event.Types (EventTarget )
5
7
import Unsafe.Coerce (unsafeCoerce )
6
8
@@ -32,6 +34,10 @@ foreign import data Element :: *
32
34
33
35
newtype ElementId = ElementId String
34
36
37
+ derive instance newtypeElementId :: Newtype ElementId _
38
+ derive newtype instance eqElementId :: Eq ElementId
39
+ derive newtype instance oOrdElementId :: Ord ElementId
40
+
35
41
elementToParentNode :: Element -> ParentNode
36
42
elementToParentNode = unsafeCoerce
37
43
You can’t perform that action at this time.
0 commit comments