monad-memo-0.5.1: Memoization monad transformer
Copyright(c) Eduard Sergeev 2013
LicenseBSD-style (see the file LICENSE)
Maintainereduard.sergeev@gmail.com
Stabilityexperimental
Portabilitynon-portable (multi-param classes, functional dependencies)
Safe HaskellSafe
LanguageHaskell2010

Data.MaybeLike

Description

Defines MaybeLike typeclass - a generic way to look at some types as if they were Maybe

It is currently used to add maybe-ness to unboxed primitive types in cases when it isn't possuble to just use `Maybe a` (e.g. unboxed arrays)

Synopsis

Documentation

class MaybeLike a v | a -> v where Source #

An abstract interface to a type which may not have a value

Methods

nothing :: a Source #

isNothing :: a -> Bool Source #

just :: v -> a Source #

fromJust :: a -> v Source #

Instances

Instances details
MaybeLike Char Char Source # 
Instance details

Defined in Data.MaybeLike.Instances

Methods

nothing :: Char Source #

isNothing :: Char -> Bool Source #

just :: Char -> Char Source #

fromJust :: Char -> Char Source #

MaybeLike Double Double Source # 
Instance details

Defined in Data.MaybeLike.Instances

Methods

nothing :: Double Source #

isNothing :: Double -> Bool Source #

just :: Double -> Double Source #

fromJust :: Double -> Double Source #

MaybeLike Float Float Source # 
Instance details

Defined in Data.MaybeLike.Instances

Methods

nothing :: Float Source #

isNothing :: Float -> Bool Source #

just :: Float -> Float Source #

fromJust :: Float -> Float Source #

MaybeLike Int Int Source # 
Instance details

Defined in Data.MaybeLike.Instances

Methods

nothing :: Int Source #

isNothing :: Int -> Bool Source #

just :: Int -> Int Source #

fromJust :: Int -> Int Source #

MaybeLike Int8 Int8 Source # 
Instance details

Defined in Data.MaybeLike.Instances

Methods

nothing :: Int8 Source #

isNothing :: Int8 -> Bool Source #

just :: Int8 -> Int8 Source #

fromJust :: Int8 -> Int8 Source #

MaybeLike Int16 Int16 Source # 
Instance details

Defined in Data.MaybeLike.Instances

Methods

nothing :: Int16 Source #

isNothing :: Int16 -> Bool Source #

just :: Int16 -> Int16 Source #

fromJust :: Int16 -> Int16 Source #

MaybeLike Int32 Int32 Source # 
Instance details

Defined in Data.MaybeLike.Instances

Methods

nothing :: Int32 Source #

isNothing :: Int32 -> Bool Source #

just :: Int32 -> Int32 Source #

fromJust :: Int32 -> Int32 Source #

MaybeLike Int64 Int64 Source # 
Instance details

Defined in Data.MaybeLike.Instances

Methods

nothing :: Int64 Source #

isNothing :: Int64 -> Bool Source #

just :: Int64 -> Int64 Source #

fromJust :: Int64 -> Int64 Source #

MaybeLike Word Word Source # 
Instance details

Defined in Data.MaybeLike.Instances

Methods

nothing :: Word Source #

isNothing :: Word -> Bool Source #

just :: Word -> Word Source #

fromJust :: Word -> Word Source #

MaybeLike Word8 Word8 Source # 
Instance details

Defined in Data.MaybeLike.Instances

Methods

nothing :: Word8 Source #

isNothing :: Word8 -> Bool Source #

just :: Word8 -> Word8 Source #

fromJust :: Word8 -> Word8 Source #

MaybeLike Word16 Word16 Source # 
Instance details

Defined in Data.MaybeLike.Instances

Methods

nothing :: Word16 Source #

isNothing :: Word16 -> Bool Source #

just :: Word16 -> Word16 Source #

fromJust :: Word16 -> Word16 Source #

MaybeLike Word32 Word32 Source # 
Instance details

Defined in Data.MaybeLike.Instances

Methods

nothing :: Word32 Source #

isNothing :: Word32 -> Bool Source #

just :: Word32 -> Word32 Source #

fromJust :: Word32 -> Word32 Source #

MaybeLike Word64 Word64 Source # 
Instance details

Defined in Data.MaybeLike.Instances

Methods

nothing :: Word64 Source #

isNothing :: Word64 -> Bool Source #

just :: Word64 -> Word64 Source #

fromJust :: Word64 -> Word64 Source #

MaybeLike (Maybe a) a Source # 
Instance details

Defined in Data.MaybeLike.Instances

Methods

nothing :: Maybe a Source #

isNothing :: Maybe a -> Bool Source #

just :: a -> Maybe a Source #

fromJust :: Maybe a -> a Source #