@@ -36,14 +36,14 @@ import Data.String.CodeUnits (charAt, fromCharArray)
3636import Data.String.NonEmpty (NonEmptyString )
3737import Data.String.NonEmpty as NES
3838import Data.String.NonEmpty.CodeUnits as NESCU
39- import Data.Symbol (class IsSymbol , SProxy (..) )
39+ import Data.Symbol (class IsSymbol )
4040import Data.Tuple (Tuple (..))
4141import Partial.Unsafe (unsafePartial )
4242import Prim.Row as Row
4343import Prim.RowList as RL
4444import Record as Record
4545import Test.QuickCheck.Gen (Gen , arrayOf , chooseInt , elements , listOf , oneOf , perturbGen , repeatable , sized , uniform )
46- import Type.Data.RowList ( RLProxy (..))
46+ import Type.Proxy ( Proxy (..))
4747
4848-- | The `Arbitrary` class represents those types whose values can be
4949-- | _randomly-generated_.
@@ -244,8 +244,9 @@ genericCoarbitrary :: forall a rep. Generic a rep => Coarbitrary rep => a -> Gen
244244genericCoarbitrary x g = to <$> coarbitrary (from x) (from <$> g)
245245
246246-- | A helper typeclass to implement `Arbitrary` for records.
247+ class ArbitraryRowList :: RL.RowList Type -> Row Type -> Constraint
247248class ArbitraryRowList list row | list -> row where
248- arbitraryRecord :: RLProxy list -> Gen (Record row )
249+ arbitraryRecord :: forall rlproxy . rlproxy list -> Gen (Record row )
249250
250251instance arbitraryRowListNil :: ArbitraryRowList RL.Nil () where
251252 arbitraryRecord _ = pure {}
@@ -260,11 +261,11 @@ instance arbitraryRowListCons ::
260261 ) => ArbitraryRowList (RL.Cons key a listRest ) rowFull where
261262 arbitraryRecord _ = do
262263 value <- arbitrary
263- previous <- arbitraryRecord (RLProxy :: RLProxy listRest )
264- pure $ Record .insert (SProxy :: SProxy key ) value previous
264+ previous <- arbitraryRecord (Proxy :: Proxy listRest )
265+ pure $ Record .insert (Proxy :: Proxy key ) value previous
265266
266267instance arbitraryRecordInstance ::
267268 ( RL.RowToList row list
268269 , ArbitraryRowList list row
269270 ) => Arbitrary (Record row ) where
270- arbitrary = arbitraryRecord (RLProxy :: RLProxy list )
271+ arbitrary = arbitraryRecord (Proxy :: Proxy list )
0 commit comments