Skip to content

Commit b3cb786

Browse files
committed
Add a JSRef compatibility synonym #421
1 parent 968dff5 commit b3cb786

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

GHCJS/Types.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ module GHCJS.Types ( JSVal
1616
, Ref#
1717
, toPtr
1818
, fromPtr
19+
, JSRef
1920
) where
2021

2122
import Data.JSString.Internal.Type (JSString)
@@ -58,3 +59,9 @@ foreign import javascript unsafe "$r = $1_1;"
5859

5960
foreign import javascript unsafe "$r1 = $1; $r2 = 0;"
6061
js_mkPtr :: JSVal -> Ptr a
62+
63+
-- | This is a deprecated copmatibility wrapper for the old JSRef type.
64+
--
65+
-- See https://github.com/ghcjs/ghcjs/issues/421
66+
type JSRef a = JSVal
67+
{-# DEPRECATED JSRef "Use JSVal instead, or a more specific newtype wrapper of JSVal " #-}

0 commit comments

Comments
 (0)