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
3939import Data.Either (Either (..))
4040import Data.Foreign (F , Foreign , unsafeReadTagged )
4141import Data.Foreign.Class (class IsForeign )
42+ import Data.Newtype (class Newtype )
4243import Unsafe.Coerce as U
4344
4445-- | Basic type for all DOM events.
@@ -47,8 +48,9 @@ foreign import data Event :: *
4748-- | The type of strings used for event types.
4849newtype EventType = EventType String
4950
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
5254
5355-- | A DOM item that can emit events.
5456foreign import data EventTarget :: *
Original file line number Diff line number Diff line change 11-- http://www.w3.org/TR/dom
22module DOM.Node.Types where
33
4+ import Prelude
5+ import Data.Newtype (class Newtype )
46import DOM.Event.Types (EventTarget )
57import Unsafe.Coerce (unsafeCoerce )
68
@@ -32,6 +34,10 @@ foreign import data Element :: *
3234
3335newtype ElementId = ElementId String
3436
37+ derive instance newtypeElementId :: Newtype ElementId _
38+ derive newtype instance eqElementId :: Eq ElementId
39+ derive newtype instance oOrdElementId :: Ord ElementId
40+
3541elementToParentNode :: Element -> ParentNode
3642elementToParentNode = unsafeCoerce
3743
You can’t perform that action at this time.
0 commit comments