Hoogle Search

Within LTS Haskell 24.57 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. class IsSome a b => IsMany a b

    lawful-conversions LawfulConversions

    Lossy or canonicalizing conversion. Captures mappings from multiple alternative inputs into one output. E.g.,

    • ByteString can be decoded into Text with UTF-8 leniently, replacing the invalid chars with a default char.
    • String has a wider range of supported chars than Text, so some chars get replaced too.

    Laws

    from is an inverse of to

    \b -> b == from (to @a b)
    

    Testing

    For testing whether your instances conform to these laws use isManyProperties.

  2. isManyIso :: (IsMany a b, Profunctor p, Functor f) => p b (f b) -> p a (f a)

    lawful-conversions LawfulConversions

    Van-Laarhoven-style Isomorphism, compatible with libraries like "lens" and "optics".

  3. isManyProperties :: (IsMany a b, Eq a, Eq b, Show a, Show b, Arbitrary b) => Proxy a -> Proxy b -> [(String, Property)]

    lawful-conversions LawfulConversions

    Properties testing whether an instance satisfies the laws of IsMany. The instance is identified via the proxy types that you provide. E.g., here's how you can integrate it into an Hspec test-suite:

    spec = do
    describe "IsMany laws" do
    traverse_
    (uncurry prop)
    (isManyProperties @String @Text Proxy Proxy)
    

  4. type ManyParticleAccelerationFunction = ManyParticleSystemState -> [Vec]

    learn-physics Physics.Learn

    An acceleration function gives a list of accelerations (one for each particle) as a function of the system's state.

  5. type ManyParticleSystemState = (TheTime, [St])

    learn-physics Physics.Learn

    The state of a system of many particles is given by the current time and a list of one-particle states.

  6. manyParticleRungeKuttaStep :: ManyParticleAccelerationFunction -> TimeStep -> ManyParticleSystemState -> ManyParticleSystemState

    learn-physics Physics.Learn

    Single Runge-Kutta step for many-particle system

  7. manyParticleStateDeriv :: ManyParticleAccelerationFunction -> DifferentialEquation ManyParticleSystemState

    learn-physics Physics.Learn

    Time derivative of state for many particles with constant mass.

  8. type ManyParticleAccelerationFunction = ManyParticleSystemState -> [Vec]

    learn-physics Physics.Learn.Mechanics

    An acceleration function gives a list of accelerations (one for each particle) as a function of the system's state.

  9. type ManyParticleSystemState = (TheTime, [St])

    learn-physics Physics.Learn.Mechanics

    The state of a system of many particles is given by the current time and a list of one-particle states.

  10. manyParticleRungeKuttaStep :: ManyParticleAccelerationFunction -> TimeStep -> ManyParticleSystemState -> ManyParticleSystemState

    learn-physics Physics.Learn.Mechanics

    Single Runge-Kutta step for many-particle system

Page 232 of many | Previous | Next