VB deriving Generic
                  
                  
                  
                  
                  
                  data VX (ty :: VType) alg a = VX { height :: Int, time :: Int } deriving Generic
                  
                  
                  
                  
                  
                  ....
                  
                  
                  
                  
                  
                  -- Тесты на Hedgehog + QuickTest:
                  
                  
                  
                  
                  
                  property_can_serialize :: Property
                  
                  
                  property_can_serialize = property $ do
                  
                  
                    vx <- forAll (Gen.arbitrary :: Gen (VX ty TestAlg TestData))
                  
                  
                    -- ^ вот тут я просто написал `ty`, а оно скомпилилось, почему??
                  
                  
                    assert $ not $ BS.null (Codec.serialise vx)
                  
                  
                
почему не должен?
Обсуждают сегодня