License | GPL-3 |
---|---|
Safe Haskell | Safe |
Language | Haskell2010 |
This module exports all basic modules of the Discokitty library. Please note that models and examples should be imported separately.
Synopsis
- class Dim a where
- class HasCups m where
- data Type
- type Lambek = [Type]
- agreeOn :: Int -> Lambek -> Lambek -> Bool
- data Words m = Words {}
- sentence :: HasCups m => [Words m] -> [Words m]
- concatenate :: HasCups m => Words m -> Words m -> [Words m]
- emptyWord :: HasCups m => Words m
- (@@@) :: [Words m] -> Lambek -> [Words m]
Documentation
In the meaning space, states can have a given number of output wires. This function takes an state and should output the number of output wires it has.
class HasCups m where Source #
cup :: Int -> m -> m -> m Source #
Given an integer, performs that number of cups between the two meaning spaces. In a monoidal category, this should be the composition of the tensor product of two states with a certain number of cups.
Neutral element for the cup operation. This could be given by the identity morphism (state).
Instances
Ord u => HasCups (Rel u) Source # | |
(Ord u, Eq u, Semiring m) => HasCups (Vectorspace u m) Source # | |
Defined in Discokitty.Models.Vectorspaces cup :: Int -> Vectorspace u m -> Vectorspace u m -> Vectorspace u m Source # cunit :: Vectorspace u m Source # |
agreeOn :: Int -> Lambek -> Lambek -> Bool Source #
Checks if two Lambek types can be reduced a given number of steps.
A word is given by a meaning and a grammatical type. The Words type is parameterized over the meaning type.