monad-memo-0.5.3: 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
MaybeLike Char Char Source # 
Instance details

Defined in Data.MaybeLike.Instances

MaybeLike Double Double Source # 
Instance details

Defined in Data.MaybeLike.Instances

MaybeLike Float Float Source # 
Instance details

Defined in Data.MaybeLike.Instances

MaybeLike Int Int Source # 
Instance details

Defined in Data.MaybeLike.Instances

MaybeLike Int8 Int8 Source # 
Instance details

Defined in Data.MaybeLike.Instances

MaybeLike Int16 Int16 Source # 
Instance details

Defined in Data.MaybeLike.Instances

MaybeLike Int32 Int32 Source # 
Instance details

Defined in Data.MaybeLike.Instances

MaybeLike Int64 Int64 Source # 
Instance details

Defined in Data.MaybeLike.Instances

MaybeLike Word Word Source # 
Instance details

Defined in Data.MaybeLike.Instances

MaybeLike Word8 Word8 Source # 
Instance details

Defined in Data.MaybeLike.Instances

MaybeLike Word16 Word16 Source # 
Instance details

Defined in Data.MaybeLike.Instances

MaybeLike Word32 Word32 Source # 
Instance details

Defined in Data.MaybeLike.Instances

MaybeLike Word64 Word64 Source # 
Instance details

Defined in Data.MaybeLike.Instances

MaybeLike (Maybe a) a Source # 
Instance details

Defined in Data.MaybeLike.Instances