Module

Data.Nullable

Package
purescript-nullable
Repository
purescript-contrib/purescript-nullable

This module defines types and functions for working with nullable types using the FFI.

#Nullable Source

data Nullable :: Type -> Type

A nullable type.

This type constructor may be useful when interoperating with JavaScript functions which accept or return null values.

Instances

#null Source

null :: forall a. Nullable a

The null value.

#notNull Source

notNull :: forall a. a -> Nullable a

Wrap a non-null value.

#toMaybe Source

toMaybe :: forall a. Nullable a -> Maybe a

Represent null using Maybe a as Nothing.

#toNullable Source

toNullable :: forall a. Maybe a -> Nullable a

Takes Nothing to null, and Just a to a.

Modules
Data.Nullable