Data.Constraint.Unsafe

constraints-0.3.2: Constraint manipulation

Copyright | (C) 2011-2012 Edward Kmett
License | BSD-style (see the file LICENSE)
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | experimental
Portability | non-portable
Safe Haskell | None
Language | Haskell2010

Data.Constraint.Unsafe

Contents

- Sugar

Description

Synopsis

- unsafeCoerceConstraint :: a :- b
- unsafeDerive :: Newtype n o => (o -> n) -> t o :- t n
- unsafeUnderive :: Newtype n o => (o -> n) -> t n :- t o
- unsafeApplicative :: forall m a. Monad m => (Applicative m => m a) -> m a
- unsafeAlternative :: forall m a. MonadPlus m => (Alternative m => m a) -> m a

# Documentation

unsafeCoerceConstraint :: a :- b

Coerce a dictionary unsafely from one type to another

unsafeDerive :: Newtype n o => (o -> n) -> t o :- t n

Coerce a dictionary unsafely from one type to a newtype of that type

unsafeUnderive :: Newtype n o => (o -> n) -> t n :- t o

Coerce a dictionary unsafely from a newtype of a type to the base type

# Sugar

unsafeApplicative :: forall m a. Monad m => (Applicative m => m a) -> m a

Construct an Applicative instance from a Monad

unsafeAlternative :: forall m a. MonadPlus m => (Alternative m => m a) -> m a

Construct an Alternative instance from a MonadPlus