Commit 55ac59b1 authored by Tim Steenvoorden's avatar Tim Steenvoorden
Browse files

move Function and Enum to Data

Functions are builtin types on which Data.Function defines some
operations, same applies to enumerations.
parent 7b7beb47
...@@ -72,7 +72,7 @@ OtherModules ...@@ -72,7 +72,7 @@ OtherModules
ReuseUniqueNodes: True ReuseUniqueNodes: True
Fusion: False Fusion: False
Module Module
Name: Algebra.Order Name: Algebra.Lattice
Dir: {Project}/src Dir: {Project}/src
Compiler Compiler
NeverMemoryProfile: False NeverMemoryProfile: False
...@@ -86,7 +86,7 @@ OtherModules ...@@ -86,7 +86,7 @@ OtherModules
ReuseUniqueNodes: True ReuseUniqueNodes: True
Fusion: False Fusion: False
Module Module
Name: Algebra.Ring Name: Algebra.Order
Dir: {Project}/src Dir: {Project}/src
Compiler Compiler
NeverMemoryProfile: False NeverMemoryProfile: False
...@@ -100,7 +100,7 @@ OtherModules ...@@ -100,7 +100,7 @@ OtherModules
ReuseUniqueNodes: True ReuseUniqueNodes: True
Fusion: False Fusion: False
Module Module
Name: Clean.Array Name: Algebra.Ring
Dir: {Project}/src Dir: {Project}/src
Compiler Compiler
NeverMemoryProfile: False NeverMemoryProfile: False
...@@ -128,7 +128,7 @@ OtherModules ...@@ -128,7 +128,7 @@ OtherModules
ReuseUniqueNodes: True ReuseUniqueNodes: True
Fusion: False Fusion: False
Module Module
Name: Control.Function Name: Clean._Array
Dir: {Project}/src Dir: {Project}/src
Compiler Compiler
NeverMemoryProfile: False NeverMemoryProfile: False
...@@ -198,7 +198,7 @@ OtherModules ...@@ -198,7 +198,7 @@ OtherModules
ReuseUniqueNodes: True ReuseUniqueNodes: True
Fusion: False Fusion: False
Module Module
Name: Data.Int Name: Data.Function
Dir: {Project}/src Dir: {Project}/src
Compiler Compiler
NeverMemoryProfile: False NeverMemoryProfile: False
...@@ -212,7 +212,7 @@ OtherModules ...@@ -212,7 +212,7 @@ OtherModules
ReuseUniqueNodes: True ReuseUniqueNodes: True
Fusion: False Fusion: False
Module Module
Name: Data.Nat Name: Data.Int
Dir: {Project}/src Dir: {Project}/src
Compiler Compiler
NeverMemoryProfile: False NeverMemoryProfile: False
...@@ -226,7 +226,7 @@ OtherModules ...@@ -226,7 +226,7 @@ OtherModules
ReuseUniqueNodes: True ReuseUniqueNodes: True
Fusion: False Fusion: False
Module Module
Name: Data.Real Name: Data.Nat
Dir: {Project}/src Dir: {Project}/src
Compiler Compiler
NeverMemoryProfile: False NeverMemoryProfile: False
...@@ -240,7 +240,7 @@ OtherModules ...@@ -240,7 +240,7 @@ OtherModules
ReuseUniqueNodes: True ReuseUniqueNodes: True
Fusion: False Fusion: False
Module Module
Name: Data.String Name: Data.Real
Dir: {Project}/src Dir: {Project}/src
Compiler Compiler
NeverMemoryProfile: False NeverMemoryProfile: False
...@@ -254,7 +254,7 @@ OtherModules ...@@ -254,7 +254,7 @@ OtherModules
ReuseUniqueNodes: True ReuseUniqueNodes: True
Fusion: False Fusion: False
Module Module
Name: Data.Tuple Name: Data.String
Dir: {Project}/src Dir: {Project}/src
Compiler Compiler
NeverMemoryProfile: False NeverMemoryProfile: False
...@@ -268,7 +268,7 @@ OtherModules ...@@ -268,7 +268,7 @@ OtherModules
ReuseUniqueNodes: True ReuseUniqueNodes: True
Fusion: False Fusion: False
Module Module
Name: System.Console Name: Data.Tuple
Dir: {Project}/src Dir: {Project}/src
Compiler Compiler
NeverMemoryProfile: False NeverMemoryProfile: False
......
implementation module Algebra.Enum
definition module Algebra.Enum._Internal
from Algebra.Order import class Enum(..)
/*
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
*/
_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 Algebra.Enum._Internal
...@@ -6,16 +6,16 @@ import Data.Nat ...@@ -6,16 +6,16 @@ import Data.Nat
import Data.Int import Data.Int
import Data.Real import Data.Real
import Data.Function
import Data.Tuple import Data.Tuple
import Data.Enum
import Data.Array import Data.Array
// import Data.Array.Unboxed // import Data.Array.Unboxed
// import Data.Array.Strict // import Data.Array.Strict
import Data.String import Data.String
import Control.Function
import Algebra.Order import Algebra.Order
import Algebra.Enum
import Algebra.Group import Algebra.Group
import Algebra.Ring import Algebra.Ring
import Algebra.Lattice import Algebra.Lattice
......
definition module Clean._Enum definition module Clean._Enum
from Algebra.Enum import class Enum(enumFrom, enumFromTo, enumFromThen, enumFromThenTo) from Data.Enum import class Enum(enumFrom, enumFromTo, enumFromThen, enumFromThenTo)
/* /*
This module must be imported if dotdot expressions are used This module must be imported if dotdot expressions are used
......
...@@ -2,7 +2,7 @@ implementation module Control.Applicative ...@@ -2,7 +2,7 @@ implementation module Control.Applicative
import Data.Maybe import Data.Maybe
import Control.Function import Data.Function
import Control.Functor import Control.Functor
import Control.Foldable import Control.Foldable
......
implementation module Control.Foldable implementation module Control.Foldable
import Control.Function import Data.Function
import Data.Bool import Data.Bool
import Data.Nat import Data.Nat
import Data.Maybe import Data.Maybe
......
implementation module Control.Functor implementation module Control.Functor
import Control.Function import Data.Function
/// # Class /// # Class
......
implementation module Control.Monad implementation module Control.Monad
import Control.Function import Data.Function
import Control.Functor import Control.Functor
import Control.Applicative import Control.Applicative
......
implementation module Control.Sliceable implementation module Control.Sliceable
import Algebra.Order import Algebra.Order
import Control.Function import Data.Function
import Control.Foldable import Control.Foldable
import Data.Bool import Data.Bool
......
implementation module Control.Traversable implementation module Control.Traversable
import Control.Function import Data.Function
import Control.Functor import Control.Functor
import Control.Applicative import Control.Applicative
import Control.Foldable import Control.Foldable
......
implementation module Data.Array implementation module Data.Array
import Control.Function import Data.Function
import Algebra.Order import Algebra.Order
import Algebra.Group import Algebra.Group
......
...@@ -3,7 +3,7 @@ implementation module Data.Char ...@@ -3,7 +3,7 @@ implementation module Data.Char
import Data.Bool import Data.Bool
import Data.Int import Data.Int
import Control.Function import Data.Function
import Algebra.Order import Algebra.Order
......
implementation module Data.Either implementation module Data.Either
import Control.Function import Data.Function
import Control.Functor import Control.Functor
import Control.Applicative import Control.Applicative
......
definition module Algebra.Enum definition module Data.Enum
from Data.Nat import :: Nat from Data.Nat import :: Nat
// import Algebra.Enum._Internal // import Data.Enum._Internal
// import Clean._Enum // import Clean._Enum
/// # Class /// # Class
......
implementation module Data.Enum
definition module Control.Function definition module Data.Function
import Clean.Prim import Clean.Prim
...@@ -53,4 +53,3 @@ uncurry f (a, b) :== f a b ...@@ -53,4 +53,3 @@ uncurry f (a, b) :== f a b
abort s :== prim_abort s abort s :== prim_abort s
undefined :: .a undefined :: .a
implementation module Control.Function implementation module Data.Function
undefined :: .a undefined :: .a
undefined = abort "Run-time error! Program evaluated undefined value!" undefined = abort "Run-time error! Program evaluated undefined value!"
definition module Data.Int definition module Data.Int
from Algebra.Order import class Eq, class Ord from Algebra.Order import class Eq, class Ord
from Algebra.Enum import class Enum from Data.Enum import class Enum
from Algebra.Group import class Semigroup, class Monoid, class Group from Algebra.Group import class Semigroup, class Monoid, class Group
from Algebra.Ring import class Semiring, class Ring, class Domain from Algebra.Ring import class Semiring, class Ring, class Domain
from Algebra.Lattice import class MeetSemilattice, class JoinSemilattice, class UpperBounded, class LowerBounded from Algebra.Lattice import class MeetSemilattice, class JoinSemilattice, class UpperBounded, class LowerBounded
......
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