Skip to content

Commit 9682a25

Browse files
committed
generic instance for AV
1 parent b26e575 commit 9682a25

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Data/ArrayBuffer/Typed/Unsafe.purs

+3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ import Data.ArrayBuffer.Typed (class TypedArray, toString)
44
import Data.ArrayBuffer.Typed as TA
55
import Data.ArrayBuffer.Types (ArrayView)
66
import Data.Maybe (Maybe(..))
7+
import Data.Generic.Rep (class Generic)
78
import Effect.Unsafe (unsafePerformEffect)
89
import Prelude (class Eq, class Monoid, class Ord, class Semigroup, class Show, bind, discard, pure, void, ($), (+), (<>))
910

1011
newtype AV a t = AV (ArrayView a)
1112

13+
derive instance genericAV :: Generic (AV a t) _
14+
1215
instance ordArrayView :: (TypedArray a t, Ord t) => Ord (AV a t) where
1316
compare (AV a) (AV b) = unsafePerformEffect $ TA.compare a b
1417

0 commit comments

Comments
 (0)