Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tim Steenvoorden
clean-base
Commits
d2c48eb9
Commit
d2c48eb9
authored
Feb 06, 2016
by
Tim Steenvoorden
Browse files
move Bounded to Algebra.Lattice
parent
bd0acdeb
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/Algebra/Lattice.dcl
View file @
d2c48eb9
...
...
@@ -108,12 +108,14 @@ class UpperBounded a | MeetSemilattice a where
/// forall a, join a bottom == bottom
class
Bounded
a
|
UpperBounded
a
&
LowerBounded
a
/* TODO needed?
class Complemented a | Bounded a where
complement :: !a -> a
*/
/// # Calculations
/* TODO add
/* TODO add
?
/// Implementation of Kleene fixed-point theorem <http://en.wikipedia.org/wiki/Kleene_fixed-point_theorem>.
/// Assumes that the function is monotone and does not check if that is correct.
unsafeLfp :: (a -> a) -> a | Eq a & LowerBounded a
...
...
@@ -144,4 +146,3 @@ gfp f = gfpFrom top f
gfpFrom :: a -> (a -> a) -> a | Eq a & BoundedMeetSemiLattice a
gfpFrom init f = unsafeGfpFrom init (\x -> f x /\ x)
*/
src/Algebra/Order.dcl
View file @
d2c48eb9
...
...
@@ -19,17 +19,6 @@ class Ord a | Eq a where
min
::
!
a
!
a
->
a
|
Ord
a
max
::
!
a
!
a
->
a
|
Ord
a
//TODO other module?
/// # Bound
class
LowerBounded
a
where
bottom
::
a
class
UpperBounded
a
where
top
::
a
class
Bounded
a
|
UpperBounded
a
&
LowerBounded
a
/// # Helpers
::
Ordering
=
Lesser
|
Equal
|
Greater
...
...
src/Clean/Core.dcl
View file @
d2c48eb9
...
...
@@ -7,17 +7,18 @@ import Data.Int
import
Data
.
Real
import
Data
.
Tuple
import
Data
.
Enum
import
Data
.
Array
// import Data.Array.Unboxed
import
Data
.
String
import
Control
.
Function
import
Algebra
.
Order
import
Algebra
.
Enum
import
Algebra
.
Group
import
Algebra
.
Ring
import
Algebra
.
Lattice
import
System
.
Console
// import System.File
// import System.Process
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment