Data.Strict.Classes

strict-0.5: Strict data types and String IO.

Safe Haskell | Safe
Language | Haskell2010

Data.Strict.Classes

Synopsis

- class Strict lazy strict | lazy -> strict, strict -> lazy where
  - toStrict :: lazy -> strict
  - toLazy :: strict -> lazy

# Documentation

class Strict lazy strict | lazy -> strict, strict -> lazy where #

Ad hoc conversion between "strict" and "lazy" versions of a structure.

Unfortunately all externally defined instances are doomed to be orphans: https://gitlab.haskell.org/ghc/ghc/-/issues/11999 See also https://qfpl.io/posts/orphans-and-fundeps/index.html for

Methods

toStrict :: lazy -> strict #

toLazy :: strict -> lazy #

#### Instances

Instances details

Strict ByteString ByteString # |
Instance details Defined in Data.Strict.Classes Methods toStrict :: ByteString -> ByteString # toLazy :: ByteString -> ByteString #
Strict Text Text # |
Instance details Defined in Data.Strict.Classes Methods toStrict :: Text -> Text # toLazy :: Text -> Text #
Strict (Maybe a) (Maybe a) # |
Instance details Defined in Data.Strict.Classes Methods toStrict :: Maybe a -> Maybe a # toLazy :: Maybe a -> Maybe a #
Strict (ST s a) (ST s a) # |
Instance details Defined in Data.Strict.Classes Methods toStrict :: ST s a -> ST s a # toLazy :: ST s a -> ST s a #
Strict (Either a b) (Either a b) # |
Instance details Defined in Data.Strict.Classes Methods toStrict :: Either a b -> Either a b # toLazy :: Either a b -> Either a b #
Strict (These a b) (These a b) # |
Instance details Defined in Data.Strict.Classes Methods toStrict :: These a b -> These a b # toLazy :: These a b -> These a b #
Strict (a, b) (Pair a b) # |
Instance details Defined in Data.Strict.Classes Methods toStrict :: (a, b) -> Pair a b # toLazy :: Pair a b -> (a, b) #
Strict (StateT s m a) (StateT s m a) # |
Instance details Defined in Data.Strict.Classes Methods toStrict :: StateT s m a -> StateT s m a # toLazy :: StateT s m a -> StateT s m a #
Strict (WriterT w m a) (WriterT w m a) # |
Instance details Defined in Data.Strict.Classes Methods toStrict :: WriterT w m a -> WriterT w m a # toLazy :: WriterT w m a -> WriterT w m a #
Strict (RWST r w s m a) (RWST r w s m a) # |
Instance details Defined in Data.Strict.Classes Methods toStrict :: RWST r w s m a -> RWST r w s m a # toLazy :: RWST r w s m a -> RWST r w s m a #