monad-memo-0.4.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
LanguageHaskell98

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 #

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

Minimal complete definition

nothing, isNothing, just, fromJust

Methods

nothing :: a #

isNothing :: a -> Bool #

just :: v -> a #

fromJust :: a -> v #