raw-feldspar-0.3: Resource-Aware Feldspar

Safe Haskell None Haskell2010

Feldspar

Synopsis

# Documentation

guard :: Alternative f => Bool -> f () #

Conditional failure of Alternative computations. Defined by

guard True  = pure ()
guard False = empty


#### Examples

Expand

Common uses of guard include conditionally signaling an error in an error monad and conditionally rejecting the current choice in an Alternative-based parser.

As an example of signaling an error in the error monad Maybe, consider a safe division function safeDiv x y that returns Nothing when the denominator y is zero and Just (x div y) otherwise. For example:

>>> safeDiv 4 0
Nothing
>>> safeDiv 4 2
Just 2


A definition of safeDiv using guards, but not guard:

safeDiv :: Int -> Int -> Maybe Int
safeDiv x y | y /= 0    = Just (x div y)
| otherwise = Nothing


A definition of safeDiv using guard and Monad do-notation:

safeDiv :: Int -> Int -> Maybe Int
safeDiv x y = do
guard (y /= 0)
return (x div y)


join :: Monad m => m (m a) -> m a #

The join function is the conventional monad join operator. It is used to remove one level of monadic structure, projecting its bound argument into the outer level.

#### Examples

Expand

A common use of join is to run an IO computation returned from an STM transaction, since STM transactions can't perform IO directly. Recall that

atomically :: STM a -> IO a


is used to run STM transactions atomically. So, by specializing the types of atomically and join to

atomically :: STM (IO b) -> IO (IO b)
join       :: IO (IO b)  -> IO b


we can compose them as

join . atomically :: STM (IO b) -> IO b


to run an STM transaction and the IO action it returns.

class Applicative m => Monad (m :: Type -> Type) where #

The Monad class defines the basic operations over a monad, a concept from a branch of mathematics known as category theory. From the perspective of a Haskell programmer, however, it is best to think of a monad as an abstract datatype of actions. Haskell's do expressions provide a convenient syntax for writing monadic expressions.

Instances of Monad should satisfy the following laws:

• return a >>= k  =  k a
• m >>= return  =  m
• m >>= (\x -> k x >>= h)  =  (m >>= k) >>= h

Furthermore, the Monad and Applicative operations should relate as follows:

• pure = return
• (<*>) = ap

The above laws imply:

• fmap f xs  =  xs >>= return . f
• (>>) = (*>)

and that pure and (<*>) satisfy the applicative functor laws.

The instances of Monad for lists, Maybe and IO defined in the Prelude satisfy these laws.

Minimal complete definition

(>>=)

Methods

(>>=) :: m a -> (a -> m b) -> m b infixl 1 #

Sequentially compose two actions, passing any value produced by the first as an argument to the second.

(>>) :: m a -> m b -> m b infixl 1 #

Sequentially compose two actions, discarding any value produced by the first, like sequencing operators (such as the semicolon) in imperative languages.

return :: a -> m a #

Inject a value into the monadic type.

fail :: String -> m a #

Fail with a message. This operation is not part of the mathematical definition of a monad, but is invoked on pattern-match failure in a do expression.

As part of the MonadFail proposal (MFP), this function is moved to its own class MonadFail (see Control.Monad.Fail for more details). The definition here will be removed in a future release.

Instances
 Monad [] Since: base-2.1 Instance detailsDefined in GHC.Base Methods(>>=) :: [a] -> (a -> [b]) -> [b] #(>>) :: [a] -> [b] -> [b] #return :: a -> [a] #fail :: String -> [a] # Since: base-2.1 Instance detailsDefined in GHC.Base Methods(>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b #(>>) :: Maybe a -> Maybe b -> Maybe b #return :: a -> Maybe a #fail :: String -> Maybe a # Since: base-2.1 Instance detailsDefined in GHC.Base Methods(>>=) :: IO a -> (a -> IO b) -> IO b #(>>) :: IO a -> IO b -> IO b #return :: a -> IO a #fail :: String -> IO a # Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methods(>>=) :: Par1 a -> (a -> Par1 b) -> Par1 b #(>>) :: Par1 a -> Par1 b -> Par1 b #return :: a -> Par1 a #fail :: String -> Par1 a # Instance detailsDefined in Language.Haskell.TH.Syntax Methods(>>=) :: Q a -> (a -> Q b) -> Q b #(>>) :: Q a -> Q b -> Q b #return :: a -> Q a #fail :: String -> Q a # Since: base-4.9.0.0 Instance detailsDefined in Data.Complex Methods(>>=) :: Complex a -> (a -> Complex b) -> Complex b #(>>) :: Complex a -> Complex b -> Complex b #return :: a -> Complex a #fail :: String -> Complex a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methods(>>=) :: Min a -> (a -> Min b) -> Min b #(>>) :: Min a -> Min b -> Min b #return :: a -> Min a #fail :: String -> Min a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methods(>>=) :: Max a -> (a -> Max b) -> Max b #(>>) :: Max a -> Max b -> Max b #return :: a -> Max a #fail :: String -> Max a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methods(>>=) :: First a -> (a -> First b) -> First b #(>>) :: First a -> First b -> First b #return :: a -> First a #fail :: String -> First a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methods(>>=) :: Last a -> (a -> Last b) -> Last b #(>>) :: Last a -> Last b -> Last b #return :: a -> Last a #fail :: String -> Last a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methods(>>=) :: Option a -> (a -> Option b) -> Option b #(>>) :: Option a -> Option b -> Option b #return :: a -> Option a #fail :: String -> Option a # Since: base-4.8.0.0 Instance detailsDefined in Data.Functor.Identity Methods(>>=) :: Identity a -> (a -> Identity b) -> Identity b #(>>) :: Identity a -> Identity b -> Identity b #return :: a -> Identity a #fail :: String -> Identity a # Since: base-4.8.0.0 Instance detailsDefined in Data.Monoid Methods(>>=) :: First a -> (a -> First b) -> First b #(>>) :: First a -> First b -> First b #return :: a -> First a #fail :: String -> First a # Since: base-4.8.0.0 Instance detailsDefined in Data.Monoid Methods(>>=) :: Last a -> (a -> Last b) -> Last b #(>>) :: Last a -> Last b -> Last b #return :: a -> Last a #fail :: String -> Last a # Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methods(>>=) :: Dual a -> (a -> Dual b) -> Dual b #(>>) :: Dual a -> Dual b -> Dual b #return :: a -> Dual a #fail :: String -> Dual a # Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methods(>>=) :: Sum a -> (a -> Sum b) -> Sum b #(>>) :: Sum a -> Sum b -> Sum b #return :: a -> Sum a #fail :: String -> Sum a # Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methods(>>=) :: Product a -> (a -> Product b) -> Product b #(>>) :: Product a -> Product b -> Product b #return :: a -> Product a #fail :: String -> Product a # Since: base-2.1 Instance detailsDefined in Text.ParserCombinators.ReadP Methods(>>=) :: ReadP a -> (a -> ReadP b) -> ReadP b #(>>) :: ReadP a -> ReadP b -> ReadP b #return :: a -> ReadP a #fail :: String -> ReadP a # Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methods(>>=) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b #(>>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #return :: a -> NonEmpty a #fail :: String -> NonEmpty a # Instance detailsDefined in Data.Tree Methods(>>=) :: Tree a -> (a -> Tree b) -> Tree b #(>>) :: Tree a -> Tree b -> Tree b #return :: a -> Tree a #fail :: String -> Tree a # Instance detailsDefined in Data.Sequence.Internal Methods(>>=) :: Seq a -> (a -> Seq b) -> Seq b #(>>) :: Seq a -> Seq b -> Seq b #return :: a -> Seq a #fail :: String -> Seq a # Instance detailsDefined in Data.Primitive.SmallArray Methods(>>=) :: SmallArray a -> (a -> SmallArray b) -> SmallArray b #(>>) :: SmallArray a -> SmallArray b -> SmallArray b #return :: a -> SmallArray a # Instance detailsDefined in Data.Primitive.Array Methods(>>=) :: Array a -> (a -> Array b) -> Array b #(>>) :: Array a -> Array b -> Array b #return :: a -> Array a #fail :: String -> Array a # Instance detailsDefined in Data.Vector Methods(>>=) :: Vector a -> (a -> Vector b) -> Vector b #(>>) :: Vector a -> Vector b -> Vector b #return :: a -> Vector a #fail :: String -> Vector a # Instance detailsDefined in Data.Vector.Fusion.Util Methods(>>=) :: Id a -> (a -> Id b) -> Id b #(>>) :: Id a -> Id b -> Id b #return :: a -> Id a #fail :: String -> Id a # Instance detailsDefined in Data.Vector.Fusion.Util Methods(>>=) :: Box a -> (a -> Box b) -> Box b #(>>) :: Box a -> Box b -> Box b #return :: a -> Box a #fail :: String -> Box a # Since: base-2.1 Instance detailsDefined in Text.ParserCombinators.ReadP Methods(>>=) :: P a -> (a -> P b) -> P b #(>>) :: P a -> P b -> P b #return :: a -> P a #fail :: String -> P a # Source # Instance detailsDefined in Feldspar.Representation Methods(>>=) :: Comp a -> (a -> Comp b) -> Comp b #(>>) :: Comp a -> Comp b -> Comp b #return :: a -> Comp a #fail :: String -> Comp a # Source # Instance detailsDefined in Feldspar.Run.Representation Methods(>>=) :: Run a -> (a -> Run b) -> Run b #(>>) :: Run a -> Run b -> Run b #return :: a -> Run a #fail :: String -> Run a # Source # Instance detailsDefined in Feldspar.Run.Marshal Methods(>>=) :: Parser a -> (a -> Parser b) -> Parser b #(>>) :: Parser a -> Parser b -> Parser b #return :: a -> Parser a #fail :: String -> Parser a # Source # Instance detailsDefined in Feldspar.Data.Validated Methods(>>=) :: Validated a -> (a -> Validated b) -> Validated b #(>>) :: Validated a -> Validated b -> Validated b #return :: a -> Validated a #fail :: String -> Validated a # () :=> (Monad ((->) a :: Type -> Type)) Instance detailsDefined in Data.Constraint Methodsins :: () :- Monad ((->) a) # () :=> (Monad []) Instance detailsDefined in Data.Constraint Methodsins :: () :- Monad [] # () :=> (Monad IO) Instance detailsDefined in Data.Constraint Methodsins :: () :- Monad IO # () :=> (Monad (Either a)) Instance detailsDefined in Data.Constraint Methodsins :: () :- Monad (Either a) # () :=> (Monad Identity) Instance detailsDefined in Data.Constraint Methodsins :: () :- Monad Identity # Monad (Either e) Since: base-4.4.0.0 Instance detailsDefined in Data.Either Methods(>>=) :: Either e a -> (a -> Either e b) -> Either e b #(>>) :: Either e a -> Either e b -> Either e b #return :: a -> Either e a #fail :: String -> Either e a # Monad (U1 :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methods(>>=) :: U1 a -> (a -> U1 b) -> U1 b #(>>) :: U1 a -> U1 b -> U1 b #return :: a -> U1 a #fail :: String -> U1 a # Monoid a => Monad ((,) a) Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methods(>>=) :: (a, a0) -> (a0 -> (a, b)) -> (a, b) #(>>) :: (a, a0) -> (a, b) -> (a, b) #return :: a0 -> (a, a0) #fail :: String -> (a, a0) # Monad m => Monad (WrappedMonad m) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Methods(>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b #(>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #return :: a -> WrappedMonad m a #fail :: String -> WrappedMonad m a # ArrowApply a => Monad (ArrowMonad a) Since: base-2.1 Instance detailsDefined in Control.Arrow Methods(>>=) :: ArrowMonad a a0 -> (a0 -> ArrowMonad a b) -> ArrowMonad a b #(>>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b #return :: a0 -> ArrowMonad a a0 #fail :: String -> ArrowMonad a a0 # Monad (Proxy :: Type -> Type) Since: base-4.7.0.0 Instance detailsDefined in Data.Proxy Methods(>>=) :: Proxy a -> (a -> Proxy b) -> Proxy b #(>>) :: Proxy a -> Proxy b -> Proxy b #return :: a -> Proxy a #fail :: String -> Proxy a # Monad m => Monad (ExceptionT m) Instance detailsDefined in Control.Monad.Exception Methods(>>=) :: ExceptionT m a -> (a -> ExceptionT m b) -> ExceptionT m b #(>>) :: ExceptionT m a -> ExceptionT m b -> ExceptionT m b #return :: a -> ExceptionT m a #fail :: String -> ExceptionT m a # Monad t => Monad (CGenT t) Instance detailsDefined in Language.C.Monad Methods(>>=) :: CGenT t a -> (a -> CGenT t b) -> CGenT t b #(>>) :: CGenT t a -> CGenT t b -> CGenT t b #return :: a -> CGenT t a #fail :: String -> CGenT t a # Monad m => Monad (ListT m) Instance detailsDefined in Control.Monad.Trans.List Methods(>>=) :: ListT m a -> (a -> ListT m b) -> ListT m b #(>>) :: ListT m a -> ListT m b -> ListT m b #return :: a -> ListT m a #fail :: String -> ListT m a # Monad m => Monad (MaybeT m) Instance detailsDefined in Control.Monad.Trans.Maybe Methods(>>=) :: MaybeT m a -> (a -> MaybeT m b) -> MaybeT m b #(>>) :: MaybeT m a -> MaybeT m b -> MaybeT m b #return :: a -> MaybeT m a #fail :: String -> MaybeT m a # Monad m => Monad (OptionT m) Source # Instance detailsDefined in Feldspar.Data.Option Methods(>>=) :: OptionT m a -> (a -> OptionT m b) -> OptionT m b #(>>) :: OptionT m a -> OptionT m b -> OptionT m b #return :: a -> OptionT m a #fail :: String -> OptionT m a # Class (Applicative f) (Monad f) Instance detailsDefined in Data.Constraint Methods (Monad m) :=> (Functor (WrappedMonad m)) Instance detailsDefined in Data.Constraint Methods (Monad m) :=> (Applicative (WrappedMonad m)) Instance detailsDefined in Data.Constraint Methods Monad f => Monad (Rec1 f) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methods(>>=) :: Rec1 f a -> (a -> Rec1 f b) -> Rec1 f b #(>>) :: Rec1 f a -> Rec1 f b -> Rec1 f b #return :: a -> Rec1 f a #fail :: String -> Rec1 f a # Monad f => Monad (Ap f) Since: base-4.12.0.0 Instance detailsDefined in Data.Monoid Methods(>>=) :: Ap f a -> (a -> Ap f b) -> Ap f b #(>>) :: Ap f a -> Ap f b -> Ap f b #return :: a -> Ap f a #fail :: String -> Ap f a # Monad f => Monad (Alt f) Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methods(>>=) :: Alt f a -> (a -> Alt f b) -> Alt f b #(>>) :: Alt f a -> Alt f b -> Alt f b #return :: a -> Alt f a #fail :: String -> Alt f a # (Applicative f, Monad f) => Monad (WhenMissing f x) Equivalent to ReaderT k (ReaderT x (MaybeT f)).Since: containers-0.5.9 Instance detailsDefined in Data.IntMap.Internal Methods(>>=) :: WhenMissing f x a -> (a -> WhenMissing f x b) -> WhenMissing f x b #(>>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b #return :: a -> WhenMissing f x a #fail :: String -> WhenMissing f x a # Monad m => Monad (StateT s m) Instance detailsDefined in Control.Monad.Trans.State.Lazy Methods(>>=) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b #(>>) :: StateT s m a -> StateT s m b -> StateT s m b #return :: a -> StateT s m a #fail :: String -> StateT s m a # Monad m => Monad (IdentityT m) Instance detailsDefined in Control.Monad.Trans.Identity Methods(>>=) :: IdentityT m a -> (a -> IdentityT m b) -> IdentityT m b #(>>) :: IdentityT m a -> IdentityT m b -> IdentityT m b #return :: a -> IdentityT m a #fail :: String -> IdentityT m a # (Monad m, Error e) => Monad (ErrorT e m) Instance detailsDefined in Control.Monad.Trans.Error Methods(>>=) :: ErrorT e m a -> (a -> ErrorT e m b) -> ErrorT e m b #(>>) :: ErrorT e m a -> ErrorT e m b -> ErrorT e m b #return :: a -> ErrorT e m a #fail :: String -> ErrorT e m a # Monad m => Monad (ExceptT e m) Instance detailsDefined in Control.Monad.Trans.Except Methods(>>=) :: ExceptT e m a -> (a -> ExceptT e m b) -> ExceptT e m b #(>>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b #return :: a -> ExceptT e m a #fail :: String -> ExceptT e m a # Monad m => Monad (StateT s m) Instance detailsDefined in Control.Monad.Trans.State.Strict Methods(>>=) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b #(>>) :: StateT s m a -> StateT s m b -> StateT s m b #return :: a -> StateT s m a #fail :: String -> StateT s m a # (Monoid w, Monad m) => Monad (WriterT w m) Instance detailsDefined in Control.Monad.Trans.Writer.Lazy Methods(>>=) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b #(>>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #return :: a -> WriterT w m a #fail :: String -> WriterT w m a # (Monoid w, Monad m) => Monad (WriterT w m) Instance detailsDefined in Control.Monad.Trans.Writer.Strict Methods(>>=) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b #(>>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #return :: a -> WriterT w m a #fail :: String -> WriterT w m a # Monad (Remon dom m) Instance detailsDefined in Language.Syntactic.Functional Methods(>>=) :: Remon dom m a -> (a -> Remon dom m b) -> Remon dom m b #(>>) :: Remon dom m a -> Remon dom m b -> Remon dom m b #return :: a -> Remon dom m a #fail :: String -> Remon dom m a # Class (Monad f, Alternative f) (MonadPlus f) Instance detailsDefined in Data.Constraint Methodscls :: MonadPlus f :- (Monad f, Alternative f) # Monad ((->) r :: Type -> Type) Since: base-2.1 Instance detailsDefined in GHC.Base Methods(>>=) :: (r -> a) -> (a -> r -> b) -> r -> b #(>>) :: (r -> a) -> (r -> b) -> r -> b #return :: a -> r -> a #fail :: String -> r -> a # (Monad f, Monad g) => Monad (f :*: g) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methods(>>=) :: (f :*: g) a -> (a -> (f :*: g) b) -> (f :*: g) b #(>>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b #return :: a -> (f :*: g) a #fail :: String -> (f :*: g) a # (Monad f, Monad g) => Monad (Product f g) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Product Methods(>>=) :: Product f g a -> (a -> Product f g b) -> Product f g b #(>>) :: Product f g a -> Product f g b -> Product f g b #return :: a -> Product f g a #fail :: String -> Product f g a # (Monad f, Applicative f) => Monad (WhenMatched f x y) Equivalent to ReaderT Key (ReaderT x (ReaderT y (MaybeT f)))Since: containers-0.5.9 Instance detailsDefined in Data.IntMap.Internal Methods(>>=) :: WhenMatched f x y a -> (a -> WhenMatched f x y b) -> WhenMatched f x y b #(>>) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y b #return :: a -> WhenMatched f x y a #fail :: String -> WhenMatched f x y a # (Applicative f, Monad f) => Monad (WhenMissing f k x) Equivalent to  ReaderT k (ReaderT x (MaybeT f)) .Since: containers-0.5.9 Instance detailsDefined in Data.Map.Internal Methods(>>=) :: WhenMissing f k x a -> (a -> WhenMissing f k x b) -> WhenMissing f k x b #(>>) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x b #return :: a -> WhenMissing f k x a #fail :: String -> WhenMissing f k x a # Monad m => Monad (ReaderT r m) Instance detailsDefined in Control.Monad.Trans.Reader Methods(>>=) :: ReaderT r m a -> (a -> ReaderT r m b) -> ReaderT r m b #(>>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b #return :: a -> ReaderT r m a #fail :: String -> ReaderT r m a # Monad (ContT r m) Instance detailsDefined in Control.Monad.Trans.Cont Methods(>>=) :: ContT r m a -> (a -> ContT r m b) -> ContT r m b #(>>) :: ContT r m a -> ContT r m b -> ContT r m b #return :: a -> ContT r m a #fail :: String -> ContT r m a # Monad f => Monad (M1 i c f) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methods(>>=) :: M1 i c f a -> (a -> M1 i c f b) -> M1 i c f b #(>>) :: M1 i c f a -> M1 i c f b -> M1 i c f b #return :: a -> M1 i c f a #fail :: String -> M1 i c f a # (Monad f, Applicative f) => Monad (WhenMatched f k x y) Equivalent to  ReaderT k (ReaderT x (ReaderT y (MaybeT f))) Since: containers-0.5.9 Instance detailsDefined in Data.Map.Internal Methods(>>=) :: WhenMatched f k x y a -> (a -> WhenMatched f k x y b) -> WhenMatched f k x y b #(>>) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y b #return :: a -> WhenMatched f k x y a #fail :: String -> WhenMatched f k x y a # Monad m => Monad (ProgramT instr fs m) Instance detailsDefined in Control.Monad.Operational.Higher Methods(>>=) :: ProgramT instr fs m a -> (a -> ProgramT instr fs m b) -> ProgramT instr fs m b #(>>) :: ProgramT instr fs m a -> ProgramT instr fs m b -> ProgramT instr fs m b #return :: a -> ProgramT instr fs m a #fail :: String -> ProgramT instr fs m a # (Monoid w, Monad m) => Monad (RWST r w s m) Instance detailsDefined in Control.Monad.Trans.RWS.Lazy Methods(>>=) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b #(>>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #return :: a -> RWST r w s m a #fail :: String -> RWST r w s m a # (Monoid w, Monad m) => Monad (RWST r w s m) Instance detailsDefined in Control.Monad.Trans.RWS.Strict Methods(>>=) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b #(>>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #return :: a -> RWST r w s m a #fail :: String -> RWST r w s m a #

class Functor (f :: Type -> Type) where #

The Functor class is used for types that can be mapped over. Instances of Functor should satisfy the following laws:

fmap id  ==  id
fmap (f . g)  ==  fmap f . fmap g

The instances of Functor for lists, Maybe and IO satisfy these laws.

Methods

fmap :: (a -> b) -> f a -> f b #

Instances
 Functor [] Since: base-2.1 Instance detailsDefined in GHC.Base Methodsfmap :: (a -> b) -> [a] -> [b] #(<$) :: a -> [b] -> [a] # Since: base-2.1 Instance detailsDefined in GHC.Base Methodsfmap :: (a -> b) -> Maybe a -> Maybe b #(<$) :: a -> Maybe b -> Maybe a # Since: base-2.1 Instance detailsDefined in GHC.Base Methodsfmap :: (a -> b) -> IO a -> IO b #(<$) :: a -> IO b -> IO a # Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> Par1 a -> Par1 b #(<$) :: a -> Par1 b -> Par1 a # Instance detailsDefined in Language.Haskell.TH.Syntax Methodsfmap :: (a -> b) -> Q a -> Q b #(<$) :: a -> Q b -> Q a # Since: base-4.9.0.0 Instance detailsDefined in Data.Complex Methodsfmap :: (a -> b) -> Complex a -> Complex b #(<$) :: a -> Complex b -> Complex a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodsfmap :: (a -> b) -> Min a -> Min b #(<$) :: a -> Min b -> Min a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodsfmap :: (a -> b) -> Max a -> Max b #(<$) :: a -> Max b -> Max a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodsfmap :: (a -> b) -> First a -> First b #(<$) :: a -> First b -> First a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodsfmap :: (a -> b) -> Last a -> Last b #(<$) :: a -> Last b -> Last a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodsfmap :: (a -> b) -> Option a -> Option b #(<$) :: a -> Option b -> Option a # Since: base-2.1 Instance detailsDefined in Control.Applicative Methodsfmap :: (a -> b) -> ZipList a -> ZipList b #(<$) :: a -> ZipList b -> ZipList a # Since: base-4.8.0.0 Instance detailsDefined in Data.Functor.Identity Methodsfmap :: (a -> b) -> Identity a -> Identity b #(<$) :: a -> Identity b -> Identity a # Since: base-4.8.0.0 Instance detailsDefined in Data.Monoid Methodsfmap :: (a -> b) -> First a -> First b #(<$) :: a -> First b -> First a # Since: base-4.8.0.0 Instance detailsDefined in Data.Monoid Methodsfmap :: (a -> b) -> Last a -> Last b #(<$) :: a -> Last b -> Last a # Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methodsfmap :: (a -> b) -> Dual a -> Dual b #(<$) :: a -> Dual b -> Dual a # Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methodsfmap :: (a -> b) -> Sum a -> Sum b #(<$) :: a -> Sum b -> Sum a # Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methodsfmap :: (a -> b) -> Product a -> Product b #(<$) :: a -> Product b -> Product a # Since: base-2.1 Instance detailsDefined in Text.ParserCombinators.ReadP Methodsfmap :: (a -> b) -> ReadP a -> ReadP b #(<$) :: a -> ReadP b -> ReadP a # Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methodsfmap :: (a -> b) -> NonEmpty a -> NonEmpty b #(<$) :: a -> NonEmpty b -> NonEmpty a # Instance detailsDefined in Data.IntMap.Internal Methodsfmap :: (a -> b) -> IntMap a -> IntMap b #(<$) :: a -> IntMap b -> IntMap a # Instance detailsDefined in Data.Tree Methodsfmap :: (a -> b) -> Tree a -> Tree b #(<$) :: a -> Tree b -> Tree a # Instance detailsDefined in Data.Sequence.Internal Methodsfmap :: (a -> b) -> Seq a -> Seq b #(<$) :: a -> Seq b -> Seq a # Instance detailsDefined in Data.Sequence.Internal Methodsfmap :: (a -> b) -> FingerTree a -> FingerTree b #(<$) :: a -> FingerTree b -> FingerTree a # Instance detailsDefined in Data.Sequence.Internal Methodsfmap :: (a -> b) -> Digit a -> Digit b #(<$) :: a -> Digit b -> Digit a # Instance detailsDefined in Data.Sequence.Internal Methodsfmap :: (a -> b) -> Node a -> Node b #(<$) :: a -> Node b -> Node a # Instance detailsDefined in Data.Sequence.Internal Methodsfmap :: (a -> b) -> Elem a -> Elem b #(<$) :: a -> Elem b -> Elem a # Instance detailsDefined in Data.Sequence.Internal Methodsfmap :: (a -> b) -> ViewL a -> ViewL b #(<$) :: a -> ViewL b -> ViewL a # Instance detailsDefined in Data.Sequence.Internal Methodsfmap :: (a -> b) -> ViewR a -> ViewR b #(<$) :: a -> ViewR b -> ViewR a # Instance detailsDefined in Language.Haskell.Exts.Parser Methodsfmap :: (a -> b) -> NonGreedy a -> NonGreedy b #(<$) :: a -> NonGreedy b -> NonGreedy a # Instance detailsDefined in Language.Haskell.Exts.Parser Methodsfmap :: (a -> b) -> ListOf a -> ListOf b #(<$) :: a -> ListOf b -> ListOf a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> ModuleName a -> ModuleName b #(<$) :: a -> ModuleName b -> ModuleName a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> SpecialCon a -> SpecialCon b #(<$) :: a -> SpecialCon b -> SpecialCon a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> QName a -> QName b #(<$) :: a -> QName b -> QName a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Name a -> Name b #(<$) :: a -> Name b -> Name a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> IPName a -> IPName b #(<$) :: a -> IPName b -> IPName a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> QOp a -> QOp b #(<$) :: a -> QOp b -> QOp a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Op a -> Op b #(<$) :: a -> Op b -> Op a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> CName a -> CName b #(<$) :: a -> CName b -> CName a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Module a -> Module b #(<$) :: a -> Module b -> Module a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> ModuleHead a -> ModuleHead b #(<$) :: a -> ModuleHead b -> ModuleHead a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> ExportSpecList a -> ExportSpecList b #(<$) :: a -> ExportSpecList b -> ExportSpecList a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> ExportSpec a -> ExportSpec b #(<$) :: a -> ExportSpec b -> ExportSpec a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> EWildcard a -> EWildcard b #(<$) :: a -> EWildcard b -> EWildcard a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Namespace a -> Namespace b #(<$) :: a -> Namespace b -> Namespace a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> ImportDecl a -> ImportDecl b #(<$) :: a -> ImportDecl b -> ImportDecl a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> ImportSpecList a -> ImportSpecList b #(<$) :: a -> ImportSpecList b -> ImportSpecList a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> ImportSpec a -> ImportSpec b #(<$) :: a -> ImportSpec b -> ImportSpec a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Assoc a -> Assoc b #(<$) :: a -> Assoc b -> Assoc a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Decl a -> Decl b #(<$) :: a -> Decl b -> Decl a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> PatternSynDirection a -> PatternSynDirection b #(<$) :: a -> PatternSynDirection b -> PatternSynDirection a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> TypeEqn a -> TypeEqn b #(<$) :: a -> TypeEqn b -> TypeEqn a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Annotation a -> Annotation b #(<$) :: a -> Annotation b -> Annotation a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> BooleanFormula a -> BooleanFormula b #(<$) :: a -> BooleanFormula b -> BooleanFormula a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Role a -> Role b #(<$) :: a -> Role b -> Role a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> DataOrNew a -> DataOrNew b #(<$) :: a -> DataOrNew b -> DataOrNew a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> InjectivityInfo a -> InjectivityInfo b #(<$) :: a -> InjectivityInfo b -> InjectivityInfo a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> ResultSig a -> ResultSig b #(<$) :: a -> ResultSig b -> ResultSig a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> DeclHead a -> DeclHead b #(<$) :: a -> DeclHead b -> DeclHead a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> InstRule a -> InstRule b #(<$) :: a -> InstRule b -> InstRule a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> InstHead a -> InstHead b #(<$) :: a -> InstHead b -> InstHead a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Deriving a -> Deriving b #(<$) :: a -> Deriving b -> Deriving a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> DerivStrategy a -> DerivStrategy b #(<$) :: a -> DerivStrategy b -> DerivStrategy a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Binds a -> Binds b #(<$) :: a -> Binds b -> Binds a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> IPBind a -> IPBind b #(<$) :: a -> IPBind b -> IPBind a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Match a -> Match b #(<$) :: a -> Match b -> Match a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> QualConDecl a -> QualConDecl b #(<$) :: a -> QualConDecl b -> QualConDecl a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> ConDecl a -> ConDecl b #(<$) :: a -> ConDecl b -> ConDecl a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> FieldDecl a -> FieldDecl b #(<$) :: a -> FieldDecl b -> FieldDecl a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> GadtDecl a -> GadtDecl b #(<$) :: a -> GadtDecl b -> GadtDecl a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> ClassDecl a -> ClassDecl b #(<$) :: a -> ClassDecl b -> ClassDecl a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> InstDecl a -> InstDecl b #(<$) :: a -> InstDecl b -> InstDecl a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> BangType a -> BangType b #(<$) :: a -> BangType b -> BangType a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Unpackedness a -> Unpackedness b #(<$) :: a -> Unpackedness b -> Unpackedness a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Rhs a -> Rhs b #(<$) :: a -> Rhs b -> Rhs a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> GuardedRhs a -> GuardedRhs b #(<$) :: a -> GuardedRhs b -> GuardedRhs a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Type a -> Type b #(<$) :: a -> Type b -> Type a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> MaybePromotedName a -> MaybePromotedName b #(<$) :: a -> MaybePromotedName b -> MaybePromotedName a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Promoted a -> Promoted b #(<$) :: a -> Promoted b -> Promoted a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> TyVarBind a -> TyVarBind b #(<$) :: a -> TyVarBind b -> TyVarBind a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> FunDep a -> FunDep b #(<$) :: a -> FunDep b -> FunDep a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Context a -> Context b #(<$) :: a -> Context b -> Context a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Asst a -> Asst b #(<$) :: a -> Asst b -> Asst a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Literal a -> Literal b #(<$) :: a -> Literal b -> Literal a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Sign a -> Sign b #(<$) :: a -> Sign b -> Sign a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Exp a -> Exp b #(<$) :: a -> Exp b -> Exp a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> XName a -> XName b #(<$) :: a -> XName b -> XName a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> XAttr a -> XAttr b #(<$) :: a -> XAttr b -> XAttr a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Bracket a -> Bracket b #(<$) :: a -> Bracket b -> Bracket a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Splice a -> Splice b #(<$) :: a -> Splice b -> Splice a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Safety a -> Safety b #(<$) :: a -> Safety b -> Safety a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> CallConv a -> CallConv b #(<$) :: a -> CallConv b -> CallConv a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> ModulePragma a -> ModulePragma b #(<$) :: a -> ModulePragma b -> ModulePragma a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Overlap a -> Overlap b #(<$) :: a -> Overlap b -> Overlap a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Activation a -> Activation b #(<$) :: a -> Activation b -> Activation a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Rule a -> Rule b #(<$) :: a -> Rule b -> Rule a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> RuleVar a -> RuleVar b #(<$) :: a -> RuleVar b -> RuleVar a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> WarningText a -> WarningText b #(<$) :: a -> WarningText b -> WarningText a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Pat a -> Pat b #(<$) :: a -> Pat b -> Pat a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> PXAttr a -> PXAttr b #(<$) :: a -> PXAttr b -> PXAttr a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> RPatOp a -> RPatOp b #(<$) :: a -> RPatOp b -> RPatOp a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> RPat a -> RPat b #(<$) :: a -> RPat b -> RPat a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> PatField a -> PatField b #(<$) :: a -> PatField b -> PatField a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Stmt a -> Stmt b #(<$) :: a -> Stmt b -> Stmt a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> QualStmt a -> QualStmt b #(<$) :: a -> QualStmt b -> QualStmt a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> FieldUpdate a -> FieldUpdate b #(<$) :: a -> FieldUpdate b -> FieldUpdate a # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodsfmap :: (a -> b) -> Alt a -> Alt b #(<$) :: a -> Alt b -> Alt a # Instance detailsDefined in Language.Embedded.Imperative.CMD Methodsfmap :: (a -> b) -> Border a -> Border b #(<$) :: a -> Border b -> Border a # Instance detailsDefined in Text.PrettyPrint.Annotated.HughesPJ Methodsfmap :: (a -> b) -> Doc a -> Doc b #(<$) :: a -> Doc b -> Doc a # Instance detailsDefined in Text.PrettyPrint.Annotated.HughesPJ Methodsfmap :: (a -> b) -> AnnotDetails a -> AnnotDetails b #(<$) :: a -> AnnotDetails b -> AnnotDetails a # Instance detailsDefined in Text.PrettyPrint.Annotated.HughesPJ Methodsfmap :: (a -> b) -> Span a -> Span b #(<$) :: a -> Span b -> Span a # Instance detailsDefined in Data.Primitive.SmallArray Methodsfmap :: (a -> b) -> SmallArray a -> SmallArray b #(<$) :: a -> SmallArray b -> SmallArray a # Instance detailsDefined in Data.Primitive.Array Methodsfmap :: (a -> b) -> Array a -> Array b #(<$) :: a -> Array b -> Array a # Instance detailsDefined in Data.Loc Methodsfmap :: (a -> b) -> L a -> L b #(<$) :: a -> L b -> L a # Instance detailsDefined in Language.Syntactic.Syntax Methodsfmap :: (a -> b) -> Full a -> Full b #(<$) :: a -> Full b -> Full a # Instance detailsDefined in Data.Vector Methodsfmap :: (a -> b) -> Vector a -> Vector b #(<$) :: a -> Vector b -> Vector a # Instance detailsDefined in Data.Vector.Fusion.Util Methodsfmap :: (a -> b) -> Id a -> Id b #(<$) :: a -> Id b -> Id a # Instance detailsDefined in Data.Vector.Fusion.Util Methodsfmap :: (a -> b) -> Box a -> Box b #(<$) :: a -> Box b -> Box a # Since: base-4.8.0.0 Instance detailsDefined in Text.ParserCombinators.ReadP Methodsfmap :: (a -> b) -> P a -> P b #(<$) :: a -> P b -> P a # Source # Instance detailsDefined in Feldspar.Representation Methodsfmap :: (a -> b) -> Comp a -> Comp b #(<$) :: a -> Comp b -> Comp a # Source # Instance detailsDefined in Feldspar.Run.Representation Methodsfmap :: (a -> b) -> Run a -> Run b #(<$) :: a -> Run b -> Run a # Source # Instance detailsDefined in Feldspar.Run.Marshal Methodsfmap :: (a -> b) -> Parser a -> Parser b #(<$) :: a -> Parser b -> Parser a # Source # Instance detailsDefined in Feldspar.Data.Array Methodsfmap :: (a -> b) -> Nest a -> Nest b #(<$) :: a -> Nest b -> Nest a # Source # Instance detailsDefined in Feldspar.Data.Vector Methodsfmap :: (a -> b) -> Pull2 a -> Pull2 b #(<$) :: a -> Pull2 b -> Pull2 a # Source # Instance detailsDefined in Feldspar.Data.Vector Methodsfmap :: (a -> b) -> Pull a -> Pull b #(<$) :: a -> Pull b -> Pull a # Source # Instance detailsDefined in Feldspar.Data.Validated Methodsfmap :: (a -> b) -> Validated a -> Validated b #(<$) :: a -> Validated b -> Validated a # Class () (Functor f) Instance detailsDefined in Data.Constraint Methodscls :: Functor f :- () # () :=> (Functor ((->) a :: Type -> Type)) Instance detailsDefined in Data.Constraint Methodsins :: () :- Functor ((->) a) # () :=> (Functor []) Instance detailsDefined in Data.Constraint Methodsins :: () :- Functor [] # () :=> (Functor Maybe) Instance detailsDefined in Data.Constraint Methodsins :: () :- Functor Maybe # () :=> (Functor IO) Instance detailsDefined in Data.Constraint Methodsins :: () :- Functor IO # () :=> (Functor (Either a)) Instance detailsDefined in Data.Constraint Methodsins :: () :- Functor (Either a) # () :=> (Functor ((,) a)) Instance detailsDefined in Data.Constraint Methodsins :: () :- Functor ((,) a) # Instance detailsDefined in Data.Constraint Methods () :=> (Functor (Const a :: Type -> Type)) Instance detailsDefined in Data.Constraint Methodsins :: () :- Functor (Const a) # Since: base-3.0 Instance detailsDefined in Data.Either Methodsfmap :: (a0 -> b) -> Either a a0 -> Either a b #(<$) :: a0 -> Either a b -> Either a a0 # Functor (V1 :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> V1 a -> V1 b #(<$) :: a -> V1 b -> V1 a # Functor (U1 :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> U1 a -> U1 b #(<$) :: a -> U1 b -> U1 a # Functor ((,) a) Since: base-2.1 Instance detailsDefined in GHC.Base Methodsfmap :: (a0 -> b) -> (a, a0) -> (a, b) #(<$) :: a0 -> (a, b) -> (a, a0) # Functor (Array i) Since: base-2.1 Instance detailsDefined in GHC.Arr Methodsfmap :: (a -> b) -> Array i a -> Array i b #(<$) :: a -> Array i b -> Array i a # Functor (Arg a) Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodsfmap :: (a0 -> b) -> Arg a a0 -> Arg a b #(<$) :: a0 -> Arg a b -> Arg a a0 # Monad m => Functor (WrappedMonad m) Since: base-2.1 Instance detailsDefined in Control.Applicative Methodsfmap :: (a -> b) -> WrappedMonad m a -> WrappedMonad m b #(<$) :: a -> WrappedMonad m b -> WrappedMonad m a # Arrow a => Functor (ArrowMonad a) Since: base-4.6.0.0 Instance detailsDefined in Control.Arrow Methodsfmap :: (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b #(<$) :: a0 -> ArrowMonad a b -> ArrowMonad a a0 # Functor (Proxy :: Type -> Type) Since: base-4.7.0.0 Instance detailsDefined in Data.Proxy Methodsfmap :: (a -> b) -> Proxy a -> Proxy b #(<$) :: a -> Proxy b -> Proxy a # Functor (Map k) Instance detailsDefined in Data.Map.Internal Methodsfmap :: (a -> b) -> Map k a -> Map k b #(<$) :: a -> Map k b -> Map k a # Functor m => Functor (ExceptionT m) Instance detailsDefined in Control.Monad.Exception Methodsfmap :: (a -> b) -> ExceptionT m a -> ExceptionT m b #(<$) :: a -> ExceptionT m b -> ExceptionT m a # Functor t => Functor (CGenT t) Instance detailsDefined in Language.C.Monad Methodsfmap :: (a -> b) -> CGenT t a -> CGenT t b #(<$) :: a -> CGenT t b -> CGenT t a # Functor m => Functor (ListT m) Instance detailsDefined in Control.Monad.Trans.List Methodsfmap :: (a -> b) -> ListT m a -> ListT m b #(<$) :: a -> ListT m b -> ListT m a # Functor m => Functor (MaybeT m) Instance detailsDefined in Control.Monad.Trans.Maybe Methodsfmap :: (a -> b) -> MaybeT m a -> MaybeT m b #(<$) :: a -> MaybeT m b -> MaybeT m a # Functor sym => Functor (AST sym) Instance detailsDefined in Language.Syntactic.Syntax Methodsfmap :: (a -> b) -> AST sym a -> AST sym b #(<$) :: a -> AST sym b -> AST sym a # Functor ((:->) a) Instance detailsDefined in Language.Syntactic.Syntax Methodsfmap :: (a0 -> b) -> (a :-> a0) -> a :-> b #(<$) :: a0 -> (a :-> b) -> a :-> a0 # Monad m => Functor (Seq m) Source # Instance detailsDefined in Feldspar.Data.Vector Methodsfmap :: (a -> b) -> Seq m a -> Seq m b #(<$) :: a -> Seq m b -> Seq m a # Functor (Push2 m) Source # Instance detailsDefined in Feldspar.Data.Vector Methodsfmap :: (a -> b) -> Push2 m a -> Push2 m b #(<$) :: a -> Push2 m b -> Push2 m a # Functor (Push m) Source # Instance detailsDefined in Feldspar.Data.Vector Methodsfmap :: (a -> b) -> Push m a -> Push m b #(<$) :: a -> Push m b -> Push m a # Monad m => Functor (OptionT m) Source # Instance detailsDefined in Feldspar.Data.Option Methodsfmap :: (a -> b) -> OptionT m a -> OptionT m b #(<$) :: a -> OptionT m b -> OptionT m a # Class (Functor f) (Applicative f) Instance detailsDefined in Data.Constraint Methods (Monad m) :=> (Functor (WrappedMonad m)) Instance detailsDefined in Data.Constraint Methods Functor f => Functor (Rec1 f) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> Rec1 f a -> Rec1 f b #(<$) :: a -> Rec1 f b -> Rec1 f a # Functor (URec Char :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> URec Char a -> URec Char b #(<$) :: a -> URec Char b -> URec Char a # Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> URec Double a -> URec Double b #(<$) :: a -> URec Double b -> URec Double a # Functor (URec Float :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> URec Float a -> URec Float b #(<$) :: a -> URec Float b -> URec Float a # Functor (URec Int :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> URec Int a -> URec Int b #(<$) :: a -> URec Int b -> URec Int a # Functor (URec Word :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> URec Word a -> URec Word b #(<$) :: a -> URec Word b -> URec Word a # Functor (URec (Ptr ()) :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> URec (Ptr ()) a -> URec (Ptr ()) b #(<$) :: a -> URec (Ptr ()) b -> URec (Ptr ()) a # Arrow a => Functor (WrappedArrow a b) Since: base-2.1 Instance detailsDefined in Control.Applicative Methodsfmap :: (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #(<$) :: a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 # Functor (Const m :: Type -> Type) Since: base-2.1 Instance detailsDefined in Data.Functor.Const Methodsfmap :: (a -> b) -> Const m a -> Const m b #(<$) :: a -> Const m b -> Const m a # Functor f => Functor (Ap f) Since: base-4.12.0.0 Instance detailsDefined in Data.Monoid Methodsfmap :: (a -> b) -> Ap f a -> Ap f b #(<$) :: a -> Ap f b -> Ap f a # Functor f => Functor (Alt f) Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methodsfmap :: (a -> b) -> Alt f a -> Alt f b #(<$) :: a -> Alt f b -> Alt f a # (Applicative f, Monad f) => Functor (WhenMissing f x) Since: containers-0.5.9 Instance detailsDefined in Data.IntMap.Internal Methodsfmap :: (a -> b) -> WhenMissing f x a -> WhenMissing f x b #(<$) :: a -> WhenMissing f x b -> WhenMissing f x a # Functor m => Functor (StateT s m) Instance detailsDefined in Control.Monad.Trans.State.Lazy Methodsfmap :: (a -> b) -> StateT s m a -> StateT s m b #(<$) :: a -> StateT s m b -> StateT s m a # Monad m => Functor (Focusing m s) Instance detailsDefined in Lens.Micro.Mtl.Internal Methodsfmap :: (a -> b) -> Focusing m s a -> Focusing m s b #(<$) :: a -> Focusing m s b -> Focusing m s a # Functor (k (May s)) => Functor (FocusingMay k s) Instance detailsDefined in Lens.Micro.Mtl.Internal Methodsfmap :: (a -> b) -> FocusingMay k s a -> FocusingMay k s b #(<$) :: a -> FocusingMay k s b -> FocusingMay k s a # Functor (Effect m r) Instance detailsDefined in Lens.Micro.Mtl.Internal Methodsfmap :: (a -> b) -> Effect m r a -> Effect m r b #(<$) :: a -> Effect m r b -> Effect m r a # Functor m => Functor (IdentityT m) Instance detailsDefined in Control.Monad.Trans.Identity Methodsfmap :: (a -> b) -> IdentityT m a -> IdentityT m b #(<$) :: a -> IdentityT m b -> IdentityT m a # Functor m => Functor (ErrorT e m) Instance detailsDefined in Control.Monad.Trans.Error Methodsfmap :: (a -> b) -> ErrorT e m a -> ErrorT e m b #(<$) :: a -> ErrorT e m b -> ErrorT e m a # Functor m => Functor (ExceptT e m) Instance detailsDefined in Control.Monad.Trans.Except Methodsfmap :: (a -> b) -> ExceptT e m a -> ExceptT e m b #(<$) :: a -> ExceptT e m b -> ExceptT e m a # Functor m => Functor (StateT s m) Instance detailsDefined in Control.Monad.Trans.State.Strict Methodsfmap :: (a -> b) -> StateT s m a -> StateT s m b #(<$) :: a -> StateT s m b -> StateT s m a # Functor m => Functor (WriterT w m) Instance detailsDefined in Control.Monad.Trans.Writer.Lazy Methodsfmap :: (a -> b) -> WriterT w m a -> WriterT w m b #(<$) :: a -> WriterT w m b -> WriterT w m a # Functor m => Functor (WriterT w m) Instance detailsDefined in Control.Monad.Trans.Writer.Strict Methodsfmap :: (a -> b) -> WriterT w m a -> WriterT w m b #(<$) :: a -> WriterT w m b -> WriterT w m a # Functor (Remon sym m) Instance detailsDefined in Language.Syntactic.Functional Methodsfmap :: (a -> b) -> Remon sym m a -> Remon sym m b #(<$) :: a -> Remon sym m b -> Remon sym m a # (Functor sym1, Functor sym2) => Functor (sym1 :+: sym2) Instance detailsDefined in Language.Syntactic.Syntax Methodsfmap :: (a -> b) -> (sym1 :+: sym2) a -> (sym1 :+: sym2) b #(<$) :: a -> (sym1 :+: sym2) b -> (sym1 :+: sym2) a # Monad m => Functor (Bundle m v) Instance detailsDefined in Data.Vector.Fusion.Bundle.Monadic Methodsfmap :: (a -> b) -> Bundle m v a -> Bundle m v b #(<$) :: a -> Bundle m v b -> Bundle m v a # Functor ((->) r :: Type -> Type) Since: base-2.1 Instance detailsDefined in GHC.Base Methodsfmap :: (a -> b) -> (r -> a) -> r -> b #(<$) :: a -> (r -> b) -> r -> a # Functor (K1 i c :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> K1 i c a -> K1 i c b #(<$) :: a -> K1 i c b -> K1 i c a # (Functor f, Functor g) => Functor (f :+: g) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> (f :+: g) a -> (f :+: g) b #(<$) :: a -> (f :+: g) b -> (f :+: g) a # (Functor f, Functor g) => Functor (f :*: g) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> (f :*: g) a -> (f :*: g) b #(<$) :: a -> (f :*: g) b -> (f :*: g) a # (Functor f, Functor g) => Functor (Product f g) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Product Methodsfmap :: (a -> b) -> Product f g a -> Product f g b #(<$) :: a -> Product f g b -> Product f g a # (Functor f, Functor g) => Functor (Sum f g) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Sum Methodsfmap :: (a -> b) -> Sum f g a -> Sum f g b #(<$) :: a -> Sum f g b -> Sum f g a # Functor f => Functor (WhenMatched f x y) Since: containers-0.5.9 Instance detailsDefined in Data.IntMap.Internal Methodsfmap :: (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b #(<$) :: a -> WhenMatched f x y b -> WhenMatched f x y a # (Applicative f, Monad f) => Functor (WhenMissing f k x) Since: containers-0.5.9 Instance detailsDefined in Data.Map.Internal Methodsfmap :: (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b #(<$) :: a -> WhenMissing f k x b -> WhenMissing f k x a # Functor m => Functor (ReaderT r m) Instance detailsDefined in Control.Monad.Trans.Reader Methodsfmap :: (a -> b) -> ReaderT r m a -> ReaderT r m b #(<$) :: a -> ReaderT r m b -> ReaderT r m a # Monad m => Functor (FocusingWith w m s) Instance detailsDefined in Lens.Micro.Mtl.Internal Methodsfmap :: (a -> b) -> FocusingWith w m s a -> FocusingWith w m s b #(<$) :: a -> FocusingWith w m s b -> FocusingWith w m s a # Functor (k (s, w)) => Functor (FocusingPlus w k s) Instance detailsDefined in Lens.Micro.Mtl.Internal Methodsfmap :: (a -> b) -> FocusingPlus w k s a -> FocusingPlus w k s b #(<$) :: a -> FocusingPlus w k s b -> FocusingPlus w k s a # Functor (k (f s)) => Functor (FocusingOn f k s) Instance detailsDefined in Lens.Micro.Mtl.Internal Methodsfmap :: (a -> b) -> FocusingOn f k s a -> FocusingOn f k s b #(<$) :: a -> FocusingOn f k s b -> FocusingOn f k s a # Functor (k (Err e s)) => Functor (FocusingErr e k s) Instance detailsDefined in Lens.Micro.Mtl.Internal Methodsfmap :: (a -> b) -> FocusingErr e k s a -> FocusingErr e k s b #(<$) :: a -> FocusingErr e k s b -> FocusingErr e k s a # Functor (ContT r m) Instance detailsDefined in Control.Monad.Trans.Cont Methodsfmap :: (a -> b) -> ContT r m a -> ContT r m b #(<$) :: a -> ContT r m b -> ContT r m a # Functor f => Functor (M1 i c f) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> M1 i c f a -> M1 i c f b #(<$) :: a -> M1 i c f b -> M1 i c f a # (Functor f, Functor g) => Functor (f :.: g) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> (f :.: g) a -> (f :.: g) b #(<$) :: a -> (f :.: g) b -> (f :.: g) a # (Functor f, Functor g) => Functor (Compose f g) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Compose Methodsfmap :: (a -> b) -> Compose f g a -> Compose f g b #(<$) :: a -> Compose f g b -> Compose f g a # Functor f => Functor (WhenMatched f k x y) Since: containers-0.5.9 Instance detailsDefined in Data.Map.Internal Methodsfmap :: (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b #(<$) :: a -> WhenMatched f k x y b -> WhenMatched f k x y a # Monad m => Functor (ProgramT instr fs m) Instance detailsDefined in Control.Monad.Operational.Higher Methodsfmap :: (a -> b) -> ProgramT instr fs m a -> ProgramT instr fs m b #(<$) :: a -> ProgramT instr fs m b -> ProgramT instr fs m a # Functor m => Functor (RWST r w s m) Instance detailsDefined in Control.Monad.Trans.RWS.Lazy Methodsfmap :: (a -> b) -> RWST r w s m a -> RWST r w s m b #(<$) :: a -> RWST r w s m b -> RWST r w s m a # Functor (EffectRWS w st m s) Instance detailsDefined in Lens.Micro.Mtl.Internal Methodsfmap :: (a -> b) -> EffectRWS w st m s a -> EffectRWS w st m s b #(<$) :: a -> EffectRWS w st m s b -> EffectRWS w st m s a # Functor m => Functor (RWST r w s m) Instance detailsDefined in Control.Monad.Trans.RWS.Strict Methodsfmap :: (a -> b) -> RWST r w s m a -> RWST r w s m b #(<$) :: a -> RWST r w s m b -> RWST r w s m a # (Functor (h1 fs), Functor (h2 fs)) => Functor ((h1 :+: h2) fs) Instance detailsDefined in Data.ALaCarte Methodsfmap :: (a -> b) -> (h1 :+: h2) fs a -> (h1 :+: h2) fs b #(<$) :: a -> (h1 :+: h2) fs b -> (h1 :+: h2) fs a #

mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b) #

Map each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see mapM_.

sequence :: (Traversable t, Monad m) => t (m a) -> m (t a) #

Evaluate each monadic action in the structure from left to right, and collect the results. For a version that ignores the results see sequence_.

mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a #

Direct MonadPlus equivalent of filter.

#### Examples

Expand

The filter function is just mfilter specialized to the list monad:

filter = ( mfilter :: (a -> Bool) -> [a] -> [a] )


An example using mfilter with the Maybe monad:

>>> mfilter odd (Just 1)
Just 1
>>> mfilter odd (Just 2)
Nothing


(<$!>) :: Monad m => (a -> b) -> m a -> m b infixl 4 # Strict version of <$>.

Since: base-4.8.0.0

unless :: Applicative f => Bool -> f () -> f () #

The reverse of when.

replicateM_ :: Applicative m => Int -> m a -> m () #

Like replicateM, but discards the result.

replicateM :: Applicative m => Int -> m a -> m [a] #

replicateM n act performs the action n times, gathering the results.

foldM_ :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m () #

Like foldM, but discards the result.

zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m () #

zipWithM_ is the extension of zipWithM which ignores the final result.

zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c] #

The zipWithM function generalizes zipWith to arbitrary applicative functors.

mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c]) #

The mapAndUnzipM function maps its first argument over a list, returning the result as a pair of lists. This function is mainly used with complicated data structures or a state-transforming monad.

forever :: Applicative f => f a -> f b #

Repeat an action indefinitely.

#### Examples

Expand

A common use of forever is to process input from network sockets, Handles, and channels (e.g. MVar and Chan).

For example, here is how we might implement an echo server, using forever both to listen for client connections on a network socket and to echo client input on client connection handles:

echoServer :: Socket -> IO ()
echoServer socket = forever $do client <- accept socket forkFinally (echo client) (\_ -> hClose client) where echo :: Handle -> IO () echo client = forever$
hGetLine client >>= hPutStrLn client


(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c infixr 1 #

Right-to-left composition of Kleisli arrows. (>=>), with the arguments flipped.

Note how this operator resembles function composition (.):

(.)   ::            (b ->   c) -> (a ->   b) -> a ->   c
(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c

(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c infixr 1 #

Left-to-right composition of Kleisli arrows.

filterM :: Applicative m => (a -> m Bool) -> [a] -> m [a] #

This generalizes the list-based filter function.

forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b) #

forM is mapM with its arguments flipped. For a version that ignores the results see forM_.

msum :: (Foldable t, MonadPlus m) => t (m a) -> m a #

The sum of a collection of actions, generalizing concat. As of base 4.8.0.0, msum is just asum, specialized to MonadPlus.

sequence_ :: (Foldable t, Monad m) => t (m a) -> m () #

Evaluate each monadic action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see sequence.

As of base 4.8.0.0, sequence_ is just sequenceA_, specialized to Monad.

forM_ :: (Foldable t, Monad m) => t a -> (a -> m b) -> m () #

forM_ is mapM_ with its arguments flipped. For a version that doesn't ignore the results see forM.

As of base 4.8.0.0, forM_ is just for_, specialized to Monad.

mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m () #

Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM.

As of base 4.8.0.0, mapM_ is just traverse_, specialized to Monad.

void :: Functor f => f a -> f () #

void value discards or ignores the result of evaluation, such as the return value of an IO action.

#### Examples

Expand

Replace the contents of a Maybe Int with unit:

>>> void Nothing
Nothing
>>> void (Just 3)
Just ()


Replace the contents of an Either Int Int with unit, resulting in an Either Int '()':

>>> void (Left 8675309)
Left 8675309
>>> void (Right 8675309)
Right ()


Replace every element of a list with unit:

>>> void [1,2,3]
[(),(),()]


Replace the second element of a pair with unit:

>>> void (1,2)
(1,())


Discard the result of an IO action:

>>> mapM print [1,2]
1
2
[(),()]

## Object-language types

module Data.Int

module Data.Word

data Complex a #

Complex numbers are an algebraic type.

For a complex number z, abs z is a number with the magnitude of z, but oriented in the positive real direction, whereas signum z has the phase of z, but unit magnitude.

The Foldable and Traversable instances traverse the real part first.

Note that Complex's instances inherit the deficiencies from the type parameter's. For example, Complex Float's Ord instance has similar problems to Float's.

Constructors

 !a :+ !a infix 6 forms a complex number from its real and imaginary rectangular components.
Instances
 Since: base-4.9.0.0 Instance detailsDefined in Data.Complex Methods(>>=) :: Complex a -> (a -> Complex b) -> Complex b #(>>) :: Complex a -> Complex b -> Complex b #return :: a -> Complex a #fail :: String -> Complex a # Since: base-4.9.0.0 Instance detailsDefined in Data.Complex Methodsfmap :: (a -> b) -> Complex a -> Complex b #(<\$) :: a -> Complex b -> Complex a # Since: base-4.9.0.0 Instance detailsDefined in Data.Complex Methodspure :: a -> Complex a #(<*>) :: Complex (a -> b) -> Complex a -> Complex b #liftA2 :: (a -> b -> c) -> Complex a -> Complex b -> Complex c #(*>) :: Complex a -> Complex b -> Complex b #(<*) :: Complex a -> Complex b -> Complex a # Since: base-4.9.0.0 Instance detailsDefined in Data.Complex Methodsfold :: Monoid m => Complex m -> m #foldMap :: Monoid m => (a -> m) -> Complex a -> m #foldr :: (a -> b -> b) -> b -> Complex a -> b #foldr' :: (a -> b -> b) -> b -> Complex a -> b #foldl :: (b -> a -> b) -> b -> Complex a -> b #foldl' :: (b -> a -> b) -> b -> Complex a -> b #foldr1 :: (a -> a -> a) -> Complex a -> a #foldl1 :: (a -> a -> a) -> Complex a -> a #toList :: Complex a -> [a] #null :: Complex a -> Bool #length :: Complex a -> Int #elem :: Eq a => a -> Complex a -> Bool #maximum :: Ord a => Complex a -> a #minimum :: Ord a => Complex a -> a #sum :: Num a => Complex a -> a #product :: Num a => Complex a -> a # Since: base-4.9.0.0 Instance detailsDefined in Data.Complex Methodstraverse :: Applicative f => (a -> f b) -> Complex a -> f (Complex b) #sequenceA :: Applicative f => Complex (f a) -> f (Complex a) #mapM :: Monad m => (a -> m b) -> Complex a -> m (Complex b) #sequence :: Monad m => Complex (m a) -> m (Complex a) # Unbox a => Vector Vector (Complex a) Instance detailsDefined in Data.Vector.Unboxed.Base MethodsbasicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Complex a) -> m (Vector (Complex a)) #basicUnsafeThaw :: PrimMonad m => Vector (Complex a) -> m (Mutable Vector (PrimState m) (Complex a)) #basicLength :: Vector (Complex a) -> Int #basicUnsafeSlice :: Int -> Int -> Vector (Complex a) -> Vector (Complex a) #basicUnsafeIndexM :: Monad m => Vector (Complex a) -> Int -> m (Complex a) #basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Complex a) -> Vector (Complex a) -> m () #elemseq :: Vector (Complex a) -> Complex a -> b -> b # Unbox a => MVector MVector (Complex a) Instance detailsDefined in Data.Vector.Unboxed.Base MethodsbasicLength :: MVector s (Complex a) -> Int #basicUnsafeSlice :: Int -> Int -> MVector s (Complex a) -> MVector s (Complex a) #basicOverlaps :: MVector s (Complex a) -> MVector s (Complex a) -> Bool #basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Complex a)) #basicInitialize :: PrimMonad m => MVector (PrimState m) (Complex a) -> m () #basicUnsafeReplicate :: PrimMonad m => Int -> Complex a -> m (MVector (PrimState m) (Complex a)) #basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Complex a) -> Int -> m (Complex a) #basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Complex a) -> Int -> Complex a -> m () #basicClear :: PrimMonad m => MVector (PrimState m) (Complex a) -> m () #basicSet :: PrimMonad m => MVector (PrimState m) (Complex a) -> Complex a -> m () #basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Complex a) -> MVector (PrimState m) (Complex a) -> m () #basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Complex a) -> MVector (PrimState m) (Complex a) -> m () #basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Complex a) -> Int -> m (MVector (PrimState m) (Complex a)) # Eq a => Eq (Complex a) Since: base-2.1 Instance detailsDefined in Data.Complex Methods(==) :: Complex a -> Complex a -> Bool #(/=) :: Complex a -> Complex a -> Bool # RealFloat a => Floating (Complex a) Since: base-2.1 Instance detailsDefined in Data.Complex Methodspi :: Complex a #exp :: Complex a -> Complex a #log :: Complex a -> Complex a #sqrt :: Complex a -> Complex a #(**) :: Complex a -> Complex a -> Complex a #logBase :: Complex a -> Complex a -> Complex a #sin :: Complex a -> Complex a #cos :: Complex a -> Complex a #tan :: Complex a -> Complex a #asin :: Complex a -> Complex a #acos :: Complex a -> Complex a #atan :: Complex a -> Complex a #sinh :: Complex a -> Complex a #cosh :: Complex a -> Complex a #tanh :: Complex a -> Complex a #asinh :: Complex a -> Complex a #acosh :: Complex a -> Complex a #atanh :: Complex a -> Complex a #log1p :: Complex a -> Complex a #expm1 :: Complex a -> Complex a #log1pexp :: Complex a -> Complex a #log1mexp :: Complex a -> Complex a # RealFloat a => Fractional (Complex a) Since: base-2.1 Instance detailsDefined in Data.Complex Methods(/) :: Complex a -> Complex a -> Complex a #recip :: Complex a -> Complex a # Data a => Data (Complex a) Since: base-2.1 Instance detailsDefined in Data.Complex Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Complex a -> c (Complex a) #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Complex a) #toConstr :: Complex a -> Constr #dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Complex a)) #dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Complex a)) #gmapT :: (forall b. Data b => b -> b) -> Complex a -> Complex a #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Complex a -> r #gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Complex a -> r #gmapQ :: (forall d. Data d => d -> u) -> Complex a -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> Complex a -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> Complex a -> m (Complex a) #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Complex a -> m (Complex a) #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Complex a -> m (Complex a) # RealFloat a => Num (Complex a) Since: base-2.1 Instance detailsDefined in Data.Complex Methods(+) :: Complex a -> Complex a -> Complex a #(-) :: Complex a -> Complex a -> Complex a #(*) :: Complex a -> Complex a -> Complex a #negate :: Complex a -> Complex a #abs :: Complex a -> Complex a #signum :: Complex a -> Complex a # Read a => Read (Complex a) Since: base-2.1 Instance detailsDefined in Data.Complex MethodsreadsPrec :: Int -> ReadS (Complex a) # Show a => Show (Complex a) Since: base-2.1 Instance detailsDefined in Data.Complex MethodsshowsPrec :: Int -> Complex a -> ShowS #show :: Complex a -> String #showList :: [Complex a] -> ShowS # Instance detailsDefined in Data.Complex Associated Typestype Rep (Complex a) :: Type -> Type # Methodsfrom :: Complex a -> Rep (Complex a) x #to :: Rep (Complex a) x -> Complex a # Storable a => Storable (Complex a) Since: base-4.8.0.0 Instance detailsDefined in Data.Complex MethodssizeOf :: Complex a -> Int #alignment :: Complex a -> Int #peekElemOff :: Ptr (Complex a) -> Int -> IO (Complex a) #pokeElemOff :: Ptr (Complex a) -> Int -> Complex a -> IO () #peekByteOff :: Ptr b -> Int -> IO (Complex a) #pokeByteOff :: Ptr b -> Int -> Complex a -> IO () #peek :: Ptr (Complex a) -> IO (Complex a) #poke :: Ptr (Complex a) -> Complex a -> IO () # (Default a, RealFloat a) => Default (Complex a) Instance detailsDefined in Data.Default.Class Methodsdef :: Complex a # Unbox a => Unbox (Complex a) Instance detailsDefined in Data.Vector.Unboxed.Base Source # Instance detailsDefined in Data.Inhabited Methods Source # Instance detailsDefined in Data.Inhabited Methods Source # Instance detailsDefined in Feldspar.Primitive.Representation Methods Source # Instance detailsDefined in Feldspar.Primitive.Representation Methods Source # Instance detailsDefined in Feldspar.Representation Methods Source # Instance detailsDefined in Feldspar.Representation Methods Source # Instance detailsDefined in Feldspar.Run.Marshal Associated Typestype HaskellRep (Data (Complex Double)) :: Type Source # Methodsfwrite :: Handle -> Data (Complex Double) -> Run () Source # Source # Instance detailsDefined in Feldspar.Run.Marshal Associated Typestype HaskellRep (Data (Complex Float)) :: Type Source # Methodsfwrite :: Handle -> Data (Complex Float) -> Run () Source # Source # Instance detailsDefined in Feldspar.Run.Marshal Methods Source # Instance detailsDefined in Feldspar.Run.Marshal Methods Instance detailsDefined in Data.Complex Associated Typestype Rep1 Complex :: k -> Type # Methodsfrom1 :: Complex a -> Rep1 Complex a #to1 :: Rep1 Complex a -> Complex a # (Eq a) :=> (Eq (Complex a)) Instance detailsDefined in Data.Constraint Methodsins :: Eq a :- Eq (Complex a) # (Read a) :=> (Read (Complex a)) Instance detailsDefined in Data.Constraint Methodsins :: Read a :- Read (Complex a) # (RealFloat a) :=> (Num (Complex a)) Instance detailsDefined in Data.Constraint Methods (RealFloat a) :=> (Fractional (Complex a)) Instance detailsDefined in Data.Constraint Methods (RealFloat a) :=> (Floating (Complex a)) Instance detailsDefined in Data.Constraint Methods (Show a) :=> (Show (Complex a)) Instance detailsDefined in Data.Constraint Methodsins :: Show a :- Show (Complex a) # Each (Complex a) (Complex b) a b Instance detailsDefined in Lens.Micro.Internal Methodseach :: Traversal (Complex a) (Complex b) a b # newtype MVector s (Complex a) Instance detailsDefined in Data.Vector.Unboxed.Base newtype MVector s (Complex a) = MV_Complex (MVector s (a, a)) type Rep (Complex a) Since: base-4.9.0.0 Instance detailsDefined in Data.Complex type Rep (Complex a) = D1 (MetaData "Complex" "Data.Complex" "base" False) (C1 (MetaCons ":+" (InfixI NotAssociative 6) False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 a) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 a))) newtype Vector (Complex a) Instance detailsDefined in Data.Vector.Unboxed.Base newtype Vector (Complex a) = V_Complex (Vector (a, a)) type HaskellRep (Data (Complex Double)) Source # Instance detailsDefined in Feldspar.Run.Marshal type HaskellRep (Data (Complex Double)) = Complex Double type HaskellRep (Data (Complex Float)) Source # Instance detailsDefined in Feldspar.Run.Marshal type HaskellRep (Data (Complex Float)) = Complex Float type Rep1 Complex Since: base-4.9.0.0 Instance detailsDefined in Data.Complex type Rep1 Complex = D1 (MetaData "Complex" "Data.Complex" "base" False) (C1 (MetaCons ":+" (InfixI NotAssociative 6) False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) Par1 :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) Par1))

class (Eq a, Show a, Typeable a) => PrimType' a Source #

Primitive supported types

Minimal complete definition

primTypeRep

Instances
 Source # Instance detailsDefined in Feldspar.Primitive.Backend.C MethodscompType :: (PrimType' a, MonadC m) => proxy1 PrimType' -> proxy2 a -> m Type #compLit :: (PrimType' a, MonadC m) => proxy PrimType' -> a -> m Exp # Source # Instance detailsDefined in Feldspar.Primitive.Representation Methods Source # Instance detailsDefined in Feldspar.Primitive.Representation Methods Source # Instance detailsDefined in Feldspar.Primitive.Representation Methods Source # Instance detailsDefined in Feldspar.Primitive.Representation Methods Source # Instance detailsDefined in Feldspar.Primitive.Representation Methods Source # Instance detailsDefined in Feldspar.Primitive.Representation Methods Source # Instance detailsDefined in Feldspar.Primitive.Representation Methods Source # Instance detailsDefined in Feldspar.Primitive.Representation Methods Source # Instance detailsDefined in Feldspar.Primitive.Representation Methods Source # Instance detailsDefined in Feldspar.Primitive.Representation Methods Source # Instance detailsDefined in Feldspar.Primitive.Representation Methods Source # Instance detailsDefined in Feldspar.Primitive.Representation Methods Source # Instance detailsDefined in Feldspar.Primitive.Representation Methods InterpBi (AssertCMD :: (Type -> Type, (Type -> Type, (Type -> Constraint, Type))) -> Type -> Type) IO (Param1 PrimType') Source # Instance detailsDefined in Feldspar.Representation MethodsinterpBi :: AssertCMD (IO, (IO, Param1 PrimType')) a -> IO a # Source # Instance detailsDefined in Feldspar.Representation Associated Typestype Domain (Struct PrimType' Data a) :: Type -> Type #type Internal (Struct PrimType' Data a) :: Type # Methods type Internal (Struct PrimType' Data a) Source # Instance detailsDefined in Feldspar.Representation type Internal (Struct PrimType' Data a) = a type Domain (Struct PrimType' Data a) Source # Instance detailsDefined in Feldspar.Representation type Domain (Struct PrimType' Data a) = FeldDomain

class (PrimType' a, Type a) => PrimType a Source #

Alias for the conjunction of PrimType' and Type

Instances
 Source # Instance detailsDefined in Feldspar.Representation MethodscompType :: (PrimType a, MonadC m) => proxy1 PrimType -> proxy2 a -> m Type #compLit :: (PrimType a, MonadC m) => proxy PrimType -> a -> m Exp # (PrimType' a, Type a) => PrimType a Source # Instance detailsDefined in Feldspar.Representation

class (Eq a, Show a, Typeable a, Inhabited a) => Type a Source #

Supported types

Minimal complete definition

typeRep

Instances
 Source # Instance detailsDefined in Feldspar.Representation Methods Source # Instance detailsDefined in Feldspar.Representation Methods Source # Instance detailsDefined in Feldspar.Representation Methods Source # Instance detailsDefined in Feldspar.Representation Methods Source # Instance detailsDefined in Feldspar.Representation Methods Source # Instance detailsDefined in Feldspar.Representation Methods Source # Instance detailsDefined in Feldspar.Representation Methods Source # Instance detailsDefined in Feldspar.Representation Methods Source # Instance detailsDefined in Feldspar.Representation Methods Source # Instance detailsDefined in Feldspar.Representation Methods Source # Instance detailsDefined in Feldspar.Representation Methods Source # Instance detailsDefined in Feldspar.Representation Methods Source # Instance detailsDefined in Feldspar.Representation Methods (Type a, Type b) => Type (a, b) Source # Instance detailsDefined in Feldspar.Representation MethodstypeRep :: TypeRep (a, b) Source #

data Ref a Source #

Mutable variable

Instances
 Eq (Ref a) Source # Instance detailsDefined in Feldspar.Representation Methods(==) :: Ref a -> Ref a -> Bool #(/=) :: Ref a -> Ref a -> Bool #

type DRef a = Ref (Data a) Source #

Reference specialized to Data elements

data Arr a Source #

Mutable array

Instances
 Eq (Arr a) Source # == checks if two Arr use the same physical array. The length and offset are ignored. Instance detailsDefined in Feldspar.Representation Methods(==) :: Arr a -> Arr a -> Bool #(/=) :: Arr a -> Arr a -> Bool # Slicable (Arr a) Source # Instance detailsDefined in Feldspar.Frontend Methodsslice :: Data Index -> Data Length -> Arr a -> Arr a Source # Finite (Arr a) Source # Instance detailsDefined in Feldspar.Frontend Methods (MarshalHaskell (Internal a), MarshalFeld a, Syntax a) => MarshalFeld (Arr a) Source # Instance detailsDefined in Feldspar.Run.Marshal Associated Typestype HaskellRep (Arr a) :: Type Source # Methodsfwrite :: Handle -> Arr a -> Run () Source #fread :: Handle -> Run (Arr a) Source # (Syntax a, BulkTransferable a, ContainerType a ~ Arr a) => Transferable (Arr a) Source # Instance detailsDefined in Feldspar.Data.Vector Associated Typestype SizeSpec (Arr a) :: Type Source # MethodscalcChanSize :: proxy (Arr a) -> SizeSpec (Arr a) -> ChanSize Data PrimType' Length Source #newChan :: SizeSpec (Arr a) -> Run (Chan Uncloseable (Arr a)) Source #readChan :: Chan t (Arr a) -> Run (Arr a) Source #untypedReadChan :: Chan t c -> Run (Arr a) Source #writeChan :: Chan t (Arr a) -> Arr a -> Run (Data Bool) Source #untypedWriteChan :: Chan t c -> Arr a -> Run (Data Bool) Source # type HaskellRep (Arr a) Source # Instance detailsDefined in Feldspar.Run.Marshal type HaskellRep (Arr a) = [Internal a] type SizeSpec (Arr a) Source # Instance detailsDefined in Feldspar.Data.Vector type SizeSpec (Arr a) = VecChanSizeSpec (SizeSpec a)

type DArr a = Arr (Data a) Source #

Array specialized to Data elements

data IArr a Source #

Immutable array

Instances
 MonadComp m => Manifestable2 m (Manifest2 a) a Source # manifest2 and manifestFresh2 are no-ops. manifestStore2 does a proper arrCopy. Instance detailsDefined in Feldspar.Data.Vector Methodsmanifest2 :: Arr a -> Manifest2 a -> m (Manifest2 a) Source #manifestFresh2 :: Manifest2 a -> m (Manifest2 a) Source #manifestStore2 :: Arr a -> Manifest2 a -> m () Source # MonadComp m => Manifestable m (Manifest a) a Source # manifest and manifestFresh are no-ops. manifestStore does a proper arrCopy. Instance detailsDefined in Feldspar.Data.Vector Methodsmanifest :: Arr a -> Manifest a -> m (Manifest a) Source #manifestFresh :: Manifest a -> m (Manifest a) Source #manifestStore :: Arr a -> Manifest a -> m () Source # (Syntax a, MonadComp m) => Seqy m (Manifest a) a Source # Instance detailsDefined in Feldspar.Data.Vector MethodstoSeq :: Manifest a -> Seq m a Source # (Syntax a, MonadComp m) => Pushy2 m (Manifest2 a) a Source # Instance detailsDefined in Feldspar.Data.Vector MethodstoPush2 :: Manifest2 a -> Push2 m a Source # (Syntax a, MonadComp m) => Pushy2 m (Manifest a) a Source # Convert to a Push2 with a single row Instance detailsDefined in Feldspar.Data.Vector MethodstoPush2 :: Manifest a -> Push2 m a Source # (Syntax a, MonadComp m) => Pushy m (Manifest a) a Source # Instance detailsDefined in Feldspar.Data.Vector MethodstoPush :: Manifest a -> Push m a Source # Slicable (IArr a) Source # Instance detailsDefined in Feldspar.Frontend Methodsslice :: Data Index -> Data Length -> IArr a -> IArr a Source # Finite (IArr a) Source # Instance detailsDefined in Feldspar.Frontend Methods Syntax a => Indexed (IArr a) Source # Instance detailsDefined in Feldspar.Frontend Associated Typestype IndexedElem (IArr a) :: Type Source # Methods(!) :: IArr a -> Data Index -> IndexedElem (IArr a) Source # (MarshalHaskell (Internal a), MarshalFeld a, Syntax a) => MarshalFeld (IArr a) Source # Instance detailsDefined in Feldspar.Run.Marshal Associated Typestype HaskellRep (IArr a) :: Type Source # Methodsfwrite :: Handle -> IArr a -> Run () Source #fread :: Handle -> Run (IArr a) Source # (Syntax a, BulkTransferable a, ContainerType a ~ Arr a) => Transferable (IArr a) Source # Instance detailsDefined in Feldspar.Data.Vector Associated Typestype SizeSpec (IArr a) :: Type Source # MethodscalcChanSize :: proxy (IArr a) -> SizeSpec (IArr a) -> ChanSize Data PrimType' Length Source #newChan :: SizeSpec (IArr a) -> Run (Chan Uncloseable (IArr a)) Source #readChan :: Chan t (IArr a) -> Run (IArr a) Source #untypedReadChan :: Chan t c -> Run (IArr a) Source #writeChan :: Chan t (IArr a) -> IArr a -> Run (Data Bool) Source #untypedWriteChan :: Chan t c -> IArr a -> Run (Data Bool) Source # Source # Treated as a row vector Instance detailsDefined in Feldspar.Data.Vector Methods Syntax a => Storable (Manifest2 a) Source # Instance detailsDefined in Feldspar.Data.Storable Associated Typestype StoreRep (Manifest2 a) :: Type Source #type StoreSize (Manifest2 a) :: Type Source # MethodsnewStoreRep :: MonadComp m => proxy (Manifest2 a) -> StoreSize (Manifest2 a) -> m (StoreRep (Manifest2 a)) Source #initStoreRep :: MonadComp m => Manifest2 a -> m (StoreRep (Manifest2 a)) Source #readStoreRep :: MonadComp m => StoreRep (Manifest2 a) -> m (Manifest2 a) Source #unsafeFreezeStoreRep :: MonadComp m => StoreRep (Manifest2 a) -> m (Manifest2 a) Source #writeStoreRep :: MonadComp m => StoreRep (Manifest2 a) -> Manifest2 a -> m () Source # Syntax a => Storable (Manifest a) Source # Instance detailsDefined in Feldspar.Data.Storable Associated Typestype StoreRep (Manifest a) :: Type Source #type StoreSize (Manifest a) :: Type Source # MethodsnewStoreRep :: MonadComp m => proxy (Manifest a) -> StoreSize (Manifest a) -> m (StoreRep (Manifest a)) Source #initStoreRep :: MonadComp m => Manifest a -> m (StoreRep (Manifest a)) Source #readStoreRep :: MonadComp m => StoreRep (Manifest a) -> m (Manifest a) Source #unsafeFreezeStoreRep :: MonadComp m => StoreRep (Manifest a) -> m (Manifest a) Source #writeStoreRep :: MonadComp m => StoreRep (Manifest a) -> Manifest a -> m () Source # Source # Instance detailsDefined in Feldspar.Data.Vector Methods ViewManifest (Manifest a) a Source # Instance detailsDefined in Feldspar.Data.Vector Methods Syntax a => Pully2 (Manifest a) a Source # Convert to a Pull2 with a single row Instance detailsDefined in Feldspar.Data.Vector MethodstoPull2 :: Manifest a -> Pull2 a Source # type IndexedElem (IArr a) Source # Instance detailsDefined in Feldspar.Frontend type IndexedElem (IArr a) = a type HaskellRep (IArr a) Source # Instance detailsDefined in Feldspar.Run.Marshal type HaskellRep (IArr a) = [Internal a] type SizeSpec (IArr a) Source # Instance detailsDefined in Feldspar.Data.Vector type SizeSpec (IArr a) = VecChanSizeSpec (SizeSpec a) type StoreRep (Manifest2 a) Source # Instance detailsDefined in Feldspar.Data.Storable type StoreRep (Manifest2 a) = (DRef Length, DRef Length, Arr a) type StoreRep (Manifest a) Source # Instance detailsDefined in Feldspar.Data.Storable type StoreRep (Manifest a) = (DRef Length, Arr a) type StoreSize (Manifest2 a) Source # Instance detailsDefined in Feldspar.Data.Storable type StoreSize (Manifest2 a) = (Data Length, Data Length) type StoreSize (Manifest a) Source # Instance detailsDefined in Feldspar.Data.Storable type StoreSize (Manifest a) = Data Length

type DIArr a = IArr (Data a) Source #

Immutable array specialized to Data elements

class Inhabited a Source #

Inhabited types

Minimal complete definition

example

Instances
 Source # Instance detailsDefined in Data.Inhabited Methods Source # Instance detailsDefined in Data.Inhabited Methods Source # Instance detailsDefined in Data.Inhabited Methods Source # Instance detailsDefined in Data.Inhabited Methods Source # Instance detailsDefined in Data.Inhabited Methods Source # Instance detailsDefined in Data.Inhabited Methods Source # Instance detailsDefined in Data.Inhabited Methods Source # Instance detailsDefined in Data.Inhabited Methods Source # Instance detailsDefined in Data.Inhabited Methods Source # Instance detailsDefined in Data.Inhabited Methods Source # Instance detailsDefined in Data.Inhabited Methods Source # Instance detailsDefined in Data.Inhabited Methods Source # Instance detailsDefined in Data.Inhabited Methods (Inhabited a, Inhabited b) => Inhabited (a, b) Source # Instance detailsDefined in Data.Inhabited Methodsexample :: (a, b) Source # (Inhabited a, Inhabited b, Inhabited c) => Inhabited (a, b, c) Source # Instance detailsDefined in Data.Inhabited Methodsexample :: (a, b, c) Source # (Inhabited a, Inhabited b, Inhabited c, Inhabited d) => Inhabited (a, b, c, d) Source # Instance detailsDefined in Data.Inhabited Methodsexample :: (a, b, c, d) Source # (Inhabited a, Inhabited b, Inhabited c, Inhabited d, Inhabited e) => Inhabited (a, b, c, d, e) Source # Instance detailsDefined in Data.Inhabited Methodsexample :: (a, b, c, d, e) Source # (Inhabited a, Inhabited b, Inhabited c, Inhabited d, Inhabited e, Inhabited f) => Inhabited (a, b, c, d, e, f) Source # Instance detailsDefined in Data.Inhabited Methodsexample :: (a, b, c, d, e, f) Source # (Inhabited a, Inhabited b, Inhabited c, Inhabited d, Inhabited e, Inhabited f, Inhabited g) => Inhabited (a, b, c, d, e, f, g) Source # Instance detailsDefined in Data.Inhabited Methodsexample :: (a, b, c, d, e, f, g) Source # (Inhabited a, Inhabited b, Inhabited c, Inhabited d, Inhabited e, Inhabited f, Inhabited g, Inhabited h) => Inhabited (a, b, c, d, e, f, g, h) Source # Instance detailsDefined in Data.Inhabited Methodsexample :: (a, b, c, d, e, f, g, h) Source # (Inhabited a, Inhabited b, Inhabited c, Inhabited d, Inhabited e, Inhabited f, Inhabited g, Inhabited h, Inhabited i) => Inhabited (a, b, c, d, e, f, g, h, i) Source # Instance detailsDefined in Data.Inhabited Methodsexample :: (a, b, c, d, e, f, g, h, i) Source # (Inhabited a, Inhabited b, Inhabited c, Inhabited d, Inhabited e, Inhabited f, Inhabited g, Inhabited h, Inhabited i, Inhabited j) => Inhabited (a, b, c, d, e, f, g, h, i, j) Source # Instance detailsDefined in Data.Inhabited Methodsexample :: (a, b, c, d, e, f, g, h, i, j) Source # (Inhabited a, Inhabited b, Inhabited c, Inhabited d, Inhabited e, Inhabited f, Inhabited g, Inhabited h, Inhabited i, Inhabited j, Inhabited k) => Inhabited (a, b, c, d, e, f, g, h, i, j, k) Source # Instance detailsDefined in Data.Inhabited Methodsexample :: (a, b, c, d, e, f, g, h, i, j, k) Source # (Inhabited a, Inhabited b, Inhabited c, Inhabited d, Inhabited e, Inhabited f, Inhabited g, Inhabited h, Inhabited i, Inhabited j, Inhabited k, Inhabited l) => Inhabited (a, b, c, d, e, f, g, h, i, j, k, l) Source # Instance detailsDefined in Data.Inhabited Methodsexample :: (a, b, c, d, e, f, g, h, i, j, k, l) Source # (Inhabited a, Inhabited b, Inhabited c, Inhabited d, Inhabited e, Inhabited f, Inhabited g, Inhabited h, Inhabited i, Inhabited j, Inhabited k, Inhabited l, Inhabited m) => Inhabited (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # Instance detailsDefined in Data.Inhabited Methodsexample :: (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # (Inhabited a, Inhabited b, Inhabited c, Inhabited d, Inhabited e, Inhabited f, Inhabited g, Inhabited h, Inhabited i, Inhabited j, Inhabited k, Inhabited l, Inhabited m, Inhabited n) => Inhabited (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # Instance detailsDefined in Data.Inhabited Methodsexample :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # (Inhabited a, Inhabited b, Inhabited c, Inhabited d, Inhabited e, Inhabited f, Inhabited g, Inhabited h, Inhabited i, Inhabited j, Inhabited k, Inhabited l, Inhabited m, Inhabited n, Inhabited o) => Inhabited (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source # Instance detailsDefined in Data.Inhabited Methodsexample :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

class Syntactic a #

It is usually assumed that (desugar (sugar a)) has the same meaning as a.

Minimal complete definition

Instances
 Source # Instance detailsDefined in Feldspar.Frontend Associated Typestype Domain () :: Type -> Type #type Internal () :: Type # Methodsdesugar :: () -> ASTF (Domain ()) (Internal ()) #sugar :: ASTF (Domain ()) (Internal ()) -> () # Source # Instance detailsDefined in Feldspar.Primitive.Representation Associated Typestype Domain (Prim a) :: Type -> Type #type Internal (Prim a) :: Type # Methodsdesugar :: Prim a -> ASTF (Domain (Prim a)) (Internal (Prim a)) #sugar :: ASTF (Domain (Prim a)) (Internal (Prim a)) -> Prim a # Source # Declaring Data as syntactic sugar Instance detailsDefined in Feldspar.Representation Associated Typestype Domain (Data a) :: Type -> Type #type Internal (Data a) :: Type # Methodsdesugar :: Data a -> ASTF (Domain (Data a)) (Internal (Data a)) #sugar :: ASTF (Domain (Data a)) (Internal (Data a)) -> Data a # Syntax a => Syntactic (Validated a) Source # Instance detailsDefined in Feldspar.Data.Validated Associated Typestype Domain (Validated a) :: Type -> Type #type Internal (Validated a) :: Type # Methodsdesugar :: Validated a -> ASTF (Domain (Validated a)) (Internal (Validated a)) #sugar :: ASTF (Domain (Validated a)) (Internal (Validated a)) -> Validated a # Syntax a => Syntactic (Option a) Source # Instance detailsDefined in Feldspar.Data.Option Associated Typestype Domain (Option a) :: Type -> Type #type Internal (Option a) :: Type # Methodsdesugar :: Option a -> ASTF (Domain (Option a)) (Internal (Option a)) #sugar :: ASTF (Domain (Option a)) (Internal (Option a)) -> Option a # (Syntax a, Syntactic b, Domain b ~ FeldDomain) => Syntactic (a -> b) Source # Instance detailsDefined in Feldspar.Sugar Associated Typestype Domain (a -> b) :: Type -> Type #type Internal (a -> b) :: Type # Methodsdesugar :: (a -> b) -> ASTF (Domain (a -> b)) (Internal (a -> b)) #sugar :: ASTF (Domain (a -> b)) (Internal (a -> b)) -> a -> b # (Syntax a, Syntax b) => Syntactic (a, b) Source # Instance detailsDefined in Feldspar.Sugar Associated Typestype Domain (a, b) :: Type -> Type #type Internal (a, b) :: Type # Methodsdesugar :: (a, b) -> ASTF (Domain (a, b)) (Internal (a, b)) #sugar :: ASTF (Domain (a, b)) (Internal (a, b)) -> (a, b) # Syntactic (ASTF sym a) Instance detailsDefined in Language.Syntactic.Sugar Associated Typestype Domain (ASTF sym a) :: Type -> Type #type Internal (ASTF sym a) :: Type # Methodsdesugar :: ASTF sym a -> ASTF (Domain (ASTF sym a)) (Internal (ASTF sym a)) #sugar :: ASTF (Domain (ASTF sym a)) (Internal (ASTF sym a)) -> ASTF sym a # Syntactic (ASTFull sym a) Instance detailsDefined in Language.Syntactic.Sugar Associated Typestype Domain (ASTFull sym a) :: Type -> Type #type Internal (ASTFull sym a) :: Type # Methodsdesugar :: ASTFull sym a -> ASTF (Domain (ASTFull sym a)) (Internal (ASTFull sym a)) #sugar :: ASTF (Domain (ASTFull sym a)) (Internal (ASTFull sym a)) -> ASTFull sym a # (Syntactic a, Syntactic b, Syntactic c, Type (Internal a), Type (Internal b), Type (Internal c), Tuple :<: sym, Domain a ~ (sym :&: TypeRepFun), Domain a ~ Domain b, Domain a ~ Domain c, sym ~ FeldConstructs) => Syntactic (a, b, c) Source # Instance detailsDefined in Feldspar.Sugar Associated Typestype Domain (a, b, c) :: Type -> Type #type Internal (a, b, c) :: Type # Methodsdesugar :: (a, b, c) -> ASTF (Domain (a, b, c)) (Internal (a, b, c)) #sugar :: ASTF (Domain (a, b, c)) (Internal (a, b, c)) -> (a, b, c) # Source # Instance detailsDefined in Feldspar.Representation Associated Typestype Domain (Struct PrimType' Data a) :: Type -> Type #type Internal (Struct PrimType' Data a) :: Type # Methods (Syntactic a, Syntactic b, Syntactic c, Syntactic d, Type (Internal a), Type (Internal b), Type (Internal c), Type (Internal d), Tuple :<: sym, Domain a ~ (sym :&: TypeRepFun), Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, sym ~ FeldConstructs) => Syntactic (a, b, c, d) Source # Instance detailsDefined in Feldspar.Sugar Associated Typestype Domain (a, b, c, d) :: Type -> Type #type Internal (a, b, c, d) :: Type # Methodsdesugar :: (a, b, c, d) -> ASTF (Domain (a, b, c, d)) (Internal (a, b, c, d)) #sugar :: ASTF (Domain (a, b, c, d)) (Internal (a, b, c, d)) -> (a, b, c, d) # (Syntactic a, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Type (Internal a), Type (Internal b), Type (Internal c), Type (Internal d), Type (Internal e), Tuple :<: sym, Domain a ~ (sym :&: TypeRepFun), Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, sym ~ FeldConstructs) => Syntactic (a, b, c, d, e) Source # Instance detailsDefined in Feldspar.Sugar Associated Typestype Domain (a, b, c, d, e) :: Type -> Type #type Internal (a, b, c, d, e) :: Type # Methodsdesugar :: (a, b, c, d, e) -> ASTF (Domain (a, b, c, d, e)) (Internal (a, b, c, d, e)) #sugar :: ASTF (Domain (a, b, c, d, e)) (Internal (a, b, c, d, e)) -> (a, b, c, d, e) # (Syntactic a, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Type (Internal a), Type (Internal b), Type (Internal c), Type (Internal d), Type (Internal e), Type (Internal f), Tuple :<: sym, Domain a ~ (sym :&: TypeRepFun), Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, sym ~ FeldConstructs) => Syntactic (a, b, c, d, e, f) Source # Instance detailsDefined in Feldspar.Sugar Associated Typestype Domain (a, b, c, d, e, f) :: Type -> Type #type Internal (a, b, c, d, e, f) :: Type # Methodsdesugar :: (a, b, c, d, e, f) -> ASTF (Domain (a, b, c, d, e, f)) (Internal (a, b, c, d, e, f)) #sugar :: ASTF (Domain (a, b, c, d, e, f)) (Internal (a, b, c, d, e, f)) -> (a, b, c, d, e, f) # (Syntactic a, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Type (Internal a), Type (Internal b), Type (Internal c), Type (Internal d), Type (Internal e), Type (Internal f), Type (Internal g), Tuple :<: sym, Domain a ~ (sym :&: TypeRepFun), Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, sym ~ FeldConstructs) => Syntactic (a, b, c, d, e, f, g) Source # Instance detailsDefined in Feldspar.Sugar Associated Typestype Domain (a, b, c, d, e, f, g) :: Type -> Type #type Internal (a, b, c, d, e, f, g) :: Type # Methodsdesugar :: (a, b, c, d, e, f, g) -> ASTF (Domain (a, b, c, d, e, f, g)) (Internal (a, b, c, d, e, f, g)) #sugar :: ASTF (Domain (a, b, c, d, e, f, g)) (Internal (a, b, c, d, e, f, g)) -> (a, b, c, d, e, f, g) # (Syntactic a, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Type (Internal a), Type (Internal b), Type (Internal c), Type (Internal d), Type (Internal e), Type (Internal f), Type (Internal g), Type (Internal h), Tuple :<: sym, Domain a ~ (sym :&: TypeRepFun), Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, sym ~ FeldConstructs) => Syntactic (a, b, c, d, e, f, g, h) Source # Instance detailsDefined in Feldspar.Sugar Associated Typestype Domain (a, b, c, d, e, f, g, h) :: Type -> Type #type Internal (a, b, c, d, e, f, g, h) :: Type # Methodsdesugar :: (a, b, c, d, e, f, g, h) -> ASTF (Domain (a, b, c, d, e, f, g, h)) (Internal (a, b, c, d, e, f, g, h)) #sugar :: ASTF (Domain (a, b, c, d, e, f, g, h)) (Internal (a, b, c, d, e, f, g, h)) -> (a, b, c, d, e, f, g, h) # (Syntactic a, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Type (Internal a), Type (Internal b), Type (Internal c), Type (Internal d), Type (Internal e), Type (Internal f), Type (Internal g), Type (Internal h), Type (Internal i), Tuple :<: sym, Domain a ~ (sym :&: TypeRepFun), Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, sym ~ FeldConstructs) => Syntactic (a, b, c, d, e, f, g, h, i) Source # Instance detailsDefined in Feldspar.Sugar Associated Typestype Domain (a, b, c, d, e, f, g, h, i) :: Type -> Type #type Internal (a, b, c, d, e, f, g, h, i) :: Type # Methodsdesugar :: (a, b, c, d, e, f, g, h, i) -> ASTF (Domain (a, b, c, d, e, f, g, h, i)) (Internal (a, b, c, d, e, f, g, h, i)) #sugar :: ASTF (Domain (a, b, c, d, e, f, g, h, i)) (Internal (a, b, c, d, e, f, g, h, i)) -> (a, b, c, d, e, f, g, h, i) # (Syntactic a, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Syntactic j, Type (Internal a), Type (Internal b), Type (Internal c), Type (Internal d), Type (Internal e), Type (Internal f), Type (Internal g), Type (Internal h), Type (Internal i), Type (Internal j), Tuple :<: sym, Domain a ~ (sym :&: TypeRepFun), Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, Domain a ~ Domain j, sym ~ FeldConstructs) => Syntactic (a, b, c, d, e, f, g, h, i, j) Source # Instance detailsDefined in Feldspar.Sugar Associated Typestype Domain (a, b, c, d, e, f, g, h, i, j) :: Type -> Type #type Internal (a, b, c, d, e, f, g, h, i, j) :: Type # Methodsdesugar :: (a, b, c, d, e, f, g, h, i, j) -> ASTF (Domain (a, b, c, d, e, f, g, h, i, j)) (Internal (a, b, c, d, e, f, g, h, i, j)) #sugar :: ASTF (Domain (a, b, c, d, e, f, g, h, i, j)) (Internal (a, b, c, d, e, f, g, h, i, j)) -> (a, b, c, d, e, f, g, h, i, j) # (Syntactic a, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Syntactic j, Syntactic k, Type (Internal a), Type (Internal b), Type (Internal c), Type (Internal d), Type (Internal e), Type (Internal f), Type (Internal g), Type (Internal h), Type (Internal i), Type (Internal j), Type (Internal k), Tuple :<: sym, Domain a ~ (sym :&: TypeRepFun), Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, Domain a ~ Domain j, Domain a ~ Domain k, sym ~ FeldConstructs) => Syntactic (a, b, c, d, e, f, g, h, i, j, k) Source # Instance detailsDefined in Feldspar.Sugar Associated Typestype Domain (a, b, c, d, e, f, g, h, i, j, k) :: Type -> Type #type Internal (a, b, c, d, e, f, g, h, i, j, k) :: Type # Methodsdesugar :: (a, b, c, d, e, f, g, h, i, j, k) -> ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k)) (Internal (a, b, c, d, e, f, g, h, i, j, k)) #sugar :: ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k)) (Internal (a, b, c, d, e, f, g, h, i, j, k)) -> (a, b, c, d, e, f, g, h, i, j, k) # (Syntactic a, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Syntactic j, Syntactic k, Syntactic l, Type (Internal a), Type (Internal b), Type (Internal c), Type (Internal d), Type (Internal e), Type (Internal f), Type (Internal g), Type (Internal h), Type (Internal i), Type (Internal j), Type (Internal k), Type (Internal l), Tuple :<: sym, Domain a ~ (sym :&: TypeRepFun), Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, Domain a ~ Domain j, Domain a ~ Domain k, Domain a ~ Domain l, sym ~ FeldConstructs) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l) Source # Instance detailsDefined in Feldspar.Sugar Associated Typestype Domain (a, b, c, d, e, f, g, h, i, j, k, l) :: Type -> Type #type Internal (a, b, c, d, e, f, g, h, i, j, k, l) :: Type # Methodsdesugar :: (a, b, c, d, e, f, g, h, i, j, k, l) -> ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k, l)) (Internal (a, b, c, d, e, f, g, h, i, j, k, l)) #sugar :: ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k, l)) (Internal (a, b, c, d, e, f, g, h, i, j, k, l)) -> (a, b, c, d, e, f, g, h, i, j, k, l) # (Syntactic a, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Syntactic j, Syntactic k, Syntactic l, Syntactic m, Type (Internal a), Type (Internal b), Type (Internal c), Type (Internal d), Type (Internal e), Type (Internal f), Type (Internal g), Type (Internal h), Type (Internal i), Type (Internal j), Type (Internal k), Type (Internal l), Type (Internal m), Tuple :<: sym, Domain a ~ (sym :&: TypeRepFun), Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, Domain a ~ Domain j, Domain a ~ Domain k, Domain a ~ Domain l, Domain a ~ Domain m, sym ~ FeldConstructs) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # Instance detailsDefined in Feldspar.Sugar Associated Typestype Domain (a, b, c, d, e, f, g, h, i, j, k, l, m) :: Type -> Type #type Internal (a, b, c, d, e, f, g, h, i, j, k, l, m) :: Type # Methodsdesugar :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k, l, m)) (Internal (a, b, c, d, e, f, g, h, i, j, k, l, m)) #sugar :: ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k, l, m)) (Internal (a, b, c, d, e, f, g, h, i, j, k, l, m)) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) # (Syntactic a, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Syntactic j, Syntactic k, Syntactic l, Syntactic m, Syntactic n, Type (Internal a), Type (Internal b), Type (Internal c), Type (Internal d), Type (Internal e), Type (Internal f), Type (Internal g), Type (Internal h), Type (Internal i), Type (Internal j), Type (Internal k), Type (Internal l), Type (Internal m), Type (Internal n), Tuple :<: sym, Domain a ~ (sym :&: TypeRepFun), Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, Domain a ~ Domain j, Domain a ~ Domain k, Domain a ~ Domain l, Domain a ~ Domain m, Domain a ~ Domain n, sym ~ FeldConstructs) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # Instance detailsDefined in Feldspar.Sugar Associated Typestype Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n) :: Type -> Type #type Internal (a, b, c, d, e, f, g, h, i, j, k, l, m, n) :: Type # Methodsdesugar :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n)) (Internal (a, b, c, d, e, f, g, h, i, j, k, l, m, n)) #sugar :: ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n)) (Internal (a, b, c, d, e, f, g, h, i, j, k, l, m, n)) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # (Syntactic a, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Syntactic j, Syntactic k, Syntactic l, Syntactic m, Syntactic n, Syntactic o, Type (Internal a), Type (Internal b), Type (Internal c), Type (Internal d), Type (Internal e), Type (Internal f), Type (Internal g), Type (Internal h), Type (Internal i), Type (Internal j), Type (Internal k), Type (Internal l), Type (Internal m), Type (Internal n), Type (Internal o), Tuple :<: sym, Domain a ~ (sym :&: TypeRepFun), Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, Domain a ~ Domain j, Domain a ~ Domain k, Domain a ~ Domain l, Domain a ~ Domain m, Domain a ~ Domain n, Domain a ~ Domain o, sym ~ FeldConstructs) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source # Instance detailsDefined in Feldspar.Sugar Associated Typestype Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) :: Type -> Type #type Internal (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) :: Type # Methodsdesugar :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)) (Internal (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)) #sugar :: ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)) (Internal (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

type family Domain a :: Type -> Type #

Instances
 type Domain () Source # Instance detailsDefined in Feldspar.Frontend type Domain () = FeldDomain type Domain (Prim a) Source # Instance detailsDefined in Feldspar.Primitive.Representation type Domain (Prim a) = PrimDomain type Domain (Data a) Source # Instance detailsDefined in Feldspar.Representation type Domain (Data a) = FeldDomain type Domain (Validated a) Source # Instance detailsDefined in Feldspar.Data.Validated type Domain (Validated a) = FeldDomain type Domain (Option a) Source # Instance detailsDefined in Feldspar.Data.Option type Domain (Option a) = FeldDomain type Domain (a -> b) Source # Instance detailsDefined in Feldspar.Sugar type Domain (a -> b) = FeldDomain type Domain (a, b) Source # Instance detailsDefined in Feldspar.Sugar type Domain (a, b) = FeldDomain type Domain (ASTF sym a) Instance detailsDefined in Language.Syntactic.Sugar type Domain (ASTF sym a) = sym type Domain (ASTFull sym a) Instance detailsDefined in Language.Syntactic.Sugar type Domain (ASTFull sym a) = sym type Domain (a, b, c) Source # Instance detailsDefined in Feldspar.Sugar type Domain (a, b, c) = Domain a type Domain (Struct PrimType' Data a) Source # Instance detailsDefined in Feldspar.Representation type Domain (Struct PrimType' Data a) = FeldDomain type Domain (a, b, c, d) Source # Instance detailsDefined in Feldspar.Sugar type Domain (a, b, c, d) = Domain a type Domain (a, b, c, d, e) Source # Instance detailsDefined in Feldspar.Sugar type Domain (a, b, c, d, e) = Domain a type Domain (a, b, c, d, e, f) Source # Instance detailsDefined in Feldspar.Sugar type Domain (a, b, c, d, e, f) = Domain a type Domain (a, b, c, d, e, f, g) Source # Instance detailsDefined in Feldspar.Sugar type Domain (a, b, c, d, e, f, g) = Domain a type Domain (a, b, c, d, e, f, g, h) Source # Instance detailsDefined in Feldspar.Sugar type Domain (a, b, c, d, e, f, g, h) = Domain a type Domain (a, b, c, d, e, f, g, h, i) Source # Instance detailsDefined in Feldspar.Sugar type Domain (a, b, c, d, e, f, g, h, i) = Domain a type Domain (a, b, c, d, e, f, g, h, i, j) Source # Instance detailsDefined in Feldspar.Sugar type Domain (a, b, c, d, e, f, g, h, i, j) = Domain a type Domain (a, b, c, d, e, f, g, h, i, j, k) Source # Instance detailsDefined in Feldspar.Sugar type Domain (a, b, c, d, e, f, g, h, i, j, k) = Domain a type Domain (a, b, c, d, e, f, g, h, i, j, k, l) Source # Instance detailsDefined in Feldspar.Sugar type Domain (a, b, c, d, e, f, g, h, i, j, k, l) = Domain a type Domain (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # Instance detailsDefined in Feldspar.Sugar type Domain (a, b, c, d, e, f, g, h, i, j, k, l, m) = Domain a type Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # Instance detailsDefined in Feldspar.Sugar type Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n) = Domain a type Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source # Instance detailsDefined in Feldspar.Sugar type Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) = Domain a

type family Internal a :: Type #

Instances