type-settheory-0.1.2: Type-level sets and functions expressed as types
Source code
Contents
Index
Type.Set.Example
Synopsis
newtype
SMap
set a =
SMap
(
Map
(
V
set) a)
singleton
:: (
Fact
(set
:⊆:
OrdType
),
Fact
(set
:⊆:
TypeableType
),
Fact
(set
:⊆:
EqType
)) => (k
:∈:
set) -> k -> a ->
SMap
set a
insert
:: (
Fact
(set
:⊆:
OrdType
),
Fact
(set
:⊆:
TypeableType
),
Fact
(set
:⊆:
EqType
)) => (k
:∈:
set) -> k -> a ->
SMap
set a ->
SMap
set a
lookup
:: (
Fact
(set
:⊆:
OrdType
),
Fact
(set
:⊆:
TypeableType
),
Fact
(set
:⊆:
EqType
)) => (k
:∈:
set) -> k ->
SMap
set a ->
Maybe
a
type
ExampleSet
= (
TypeableType
:∩:
IntegralType
)
:∪:
Singleton
String
stringInExampleSet
::
String
:∈:
ExampleSet
intInExampleSet
::
Int
:∈:
ExampleSet
test
::
SMap
ExampleSet
Integer
Documentation
newtype
SMap
set a
Source
A Map whose keys are taken from any type which is a member of
set
Constructors
SMap
(
Map
(
V
set) a)
singleton
:: (
Fact
(set
:⊆:
OrdType
),
Fact
(set
:⊆:
TypeableType
),
Fact
(set
:⊆:
EqType
)) => (k
:∈:
set) -> k -> a ->
SMap
set a
Source
insert
:: (
Fact
(set
:⊆:
OrdType
),
Fact
(set
:⊆:
TypeableType
),
Fact
(set
:⊆:
EqType
)) => (k
:∈:
set) -> k -> a ->
SMap
set a ->
SMap
set a
Source
lookup
:: (
Fact
(set
:⊆:
OrdType
),
Fact
(set
:⊆:
TypeableType
),
Fact
(set
:⊆:
EqType
)) => (k
:∈:
set) -> k ->
SMap
set a ->
Maybe
a
Source
type
ExampleSet
= (
TypeableType
:∩:
IntegralType
)
:∪:
Singleton
String
Source
Either Typeable
Integral
s, or
String
s
stringInExampleSet
::
String
:∈:
ExampleSet
Source
intInExampleSet
::
Int
:∈:
ExampleSet
Source
test
::
SMap
ExampleSet
Integer
Source
Produced by
Haddock
version 2.4.2