Commit 7b7beb47 authored by Tim Steenvoorden's avatar Tim Steenvoorden
Browse files

shuffling around some files

parent ed84a2b4
...@@ -3,8 +3,7 @@ definition module Algebra.Enum ...@@ -3,8 +3,7 @@ definition module Algebra.Enum
from Data.Nat import :: Nat from Data.Nat import :: Nat
// import Algebra.Enum._Internal // import Algebra.Enum._Internal
// import Clean._SystemEnum // import Clean._Enum
import _SystemEnum
/// # Class /// # Class
......
definition module Algebra.Ring definition module Algebra.Ring
//TODO remove for core
from Data.Nat import :: Nat from Data.Nat import :: Nat
from Algebra.Order import class Eq, class Ord from Algebra.Order import class Eq, class Ord
from Algebra.Group import class Semigroup, class Monoid, class Group from Algebra.Group import class Semigroup, class Monoid, class Group
/// This module defines classes for mathematical structures with __two__ binary operator (`+` and `*`) and derived operations. /// This module defines classes for mathematical structures with __two__ binary operator (`+` and `*`) and derived operations.
......
...@@ -9,6 +9,7 @@ import Data.Real ...@@ -9,6 +9,7 @@ import Data.Real
import Data.Tuple import Data.Tuple
import Data.Array import Data.Array
// import Data.Array.Unboxed // import Data.Array.Unboxed
// import Data.Array.Strict
import Data.String import Data.String
import Control.Function import Control.Function
...@@ -19,6 +20,6 @@ import Algebra.Group ...@@ -19,6 +20,6 @@ import Algebra.Group
import Algebra.Ring import Algebra.Ring
import Algebra.Lattice import Algebra.Lattice
import System.Console // import System.Console
// import System.File // import System.File
// import System.Process // import System.Process
implementation module Clean.Core implementation module Clean.Core
Start = 0 import Clean.Core
a :: {#Char}
a = {'a','b'}
b :: {#Char}
b = {'a','b'}
c :: {#Int}
c = {1, 2}
d :: {#Int}
d = {1, 2}
Start = a == b
definition module Clean._Array
import _SystemArray
implementation module Clean._Array
definition module _SystemEnum definition module Clean._Enum
from Algebra.Enum import class Enum(enumFrom, enumFromTo, enumFromThen, enumFromThenTo) from Algebra.Enum import class Enum(enumFrom, enumFromTo, enumFromThen, enumFromThenTo)
......
implementation module Clean._Enum
definition module Clean._SystemEnum
from Algebra.Enum import class Enum(enumFrom, enumFromTo, enumFromThen, enumFromThenTo)
/*
This module must be imported if dotdot expressions are used
[from .. ] -> _from from
[from .. to] -> _from_to from to
[from, then .. ] -> _from_then from then
[from, then .. to] -> _from_then_to from then to
*/
//FIXME doesn't print right...
_from x :== enumFrom x
_from_to x y :== enumFromTo x y
_from_then x y :== enumFromThen x y
_from_then_to x y z :== enumFromThenTo x y z
implementation module Clean._SystemEnum
definition module Data.Array definition module Data.Array
from Algebra.Order import class Eq, class Ord
from Algebra.Group import class Semigroup, class Monoid
import Clean._Array
/// # Definition
// :: {}
//BUILTIN
/// # Instances
instance Eq {a} | Eq a
instance Ord {a} | Ord a
// instance Semigroup {a}
// instance Monoid {a}
implementation module Data.Array implementation module Data.Array
import Control.Function
import Algebra.Order
import Algebra.Group
import Clean._Array
/// # Instances
instance Eq {a} | Eq a where
(==) xs ys = undefined
instance Ord {a} | Ord a where
(<) xs ys = undefined
// instance Semigroup {a}
// instance Monoid {a}
...@@ -3,7 +3,10 @@ implementation module Data.String ...@@ -3,7 +3,10 @@ implementation module Data.String
import Algebra.Order import Algebra.Order
import Algebra.Group import Algebra.Group
import Data.Int//FIXME needed for `inc`
import Clean.Prim import Clean.Prim
import Clean._Array
/// # Definition /// # Definition
...@@ -19,7 +22,7 @@ unpack cs = [c \\ c <-: cs] ...@@ -19,7 +22,7 @@ unpack cs = [c \\ c <-: cs]
instance Eq String where instance Eq String where
(==) a b = prim_eqString a b (==) a b = prim_eqString a b
instance Ord String where instance Ord String where
(<) a b = prim_ltString a b (<) a b = prim_ltString a b
...@@ -30,4 +33,3 @@ instance Semigroup String where ...@@ -30,4 +33,3 @@ instance Semigroup String where
instance Monoid String where instance Monoid String where
neutral = prim_emptyString neutral = prim_emptyString
implementation module _SystemEnum
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment