lub-0.1.3: information operators: least upper bound (lub) and greatest lower bound (glb)

Stabilityexperimental
Maintainerconal@conal.net

Data.Glb

Description

Greatest lower bound

Synopsis

Documentation

class HasGlb a whereSource

Types that support information intersection (glb)

Methods

glb :: a -> a -> aSource

Greatest lower information bound. Intersects information available from each argument.

glbs :: [a] -> aSource

n-ary lub. Defaults to foldr lub undefined

Instances

HasGlb Bool 
HasGlb Char 
HasGlb Double 
HasGlb Float 
HasGlb Int 
HasGlb Integer 
HasGlb () 
HasGlb a => HasGlb [a] 
HasGlb a => HasGlb (Maybe a) 
HasGlb b => HasGlb (a -> b) 
(HasGlb a, HasGlb b) => HasGlb (Either a b) 
(HasGlb a, HasGlb b) => HasGlb (a, b) 

glbBottom :: String -> aSource

Bottom for a glb. In the form of error "glb: bottom (<reason>)", though not really an error.

flatGlb :: Eq a => a -> a -> aSource

glb on flat types with equality. Gives bottom for unequal arguments.