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
ReuseUniqueNodes: True
Fusion: False
Module
Name: Algebra.Order
Name: Algebra.Lattice
Dir: {Project}/src
Compiler
NeverMemoryProfile: False
......@@ -86,7 +86,7 @@ OtherModules
ReuseUniqueNodes: True
Fusion: False
Module
Name: Algebra.Ring
Name: Algebra.Order
Dir: {Project}/src
Compiler
NeverMemoryProfile: False
......@@ -100,7 +100,7 @@ OtherModules
ReuseUniqueNodes: True
Fusion: False
Module
Name: Clean.Array
Name: Algebra.Ring
Dir: {Project}/src
Compiler
NeverMemoryProfile: False
......@@ -128,7 +128,7 @@ OtherModules
ReuseUniqueNodes: True
Fusion: False
Module
Name: Control.Function
Name: Clean._Array
Dir: {Project}/src
Compiler
NeverMemoryProfile: False
......@@ -198,7 +198,7 @@ OtherModules
ReuseUniqueNodes: True
Fusion: False
Module
Name: Data.Int
Name: Data.Function
Dir: {Project}/src
Compiler
NeverMemoryProfile: False
......@@ -212,7 +212,7 @@ OtherModules
ReuseUniqueNodes: True
Fusion: False
Module
Name: Data.Nat
Name: Data.Int
Dir: {Project}/src
Compiler
NeverMemoryProfile: False
......@@ -226,7 +226,7 @@ OtherModules
ReuseUniqueNodes: True
Fusion: False
Module
Name: Data.Real
Name: Data.Nat
Dir: {Project}/src
Compiler
NeverMemoryProfile: False
......@@ -240,7 +240,7 @@ OtherModules
ReuseUniqueNodes: True
Fusion: False
Module
Name: Data.String
Name: Data.Real
Dir: {Project}/src
Compiler
NeverMemoryProfile: False
......@@ -254,7 +254,7 @@ OtherModules
ReuseUniqueNodes: True
Fusion: False
Module
Name: Data.Tuple
Name: Data.String
Dir: {Project}/src
Compiler
NeverMemoryProfile: False
......@@ -268,7 +268,7 @@ OtherModules
ReuseUniqueNodes: True
Fusion: False
Module
Name: System.Console
Name: Data.Tuple
Dir: {Project}/src
Compiler
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
import Data.Int
import Data.Real
import Data.Function
import Data.Tuple
import Data.Enum
import Data.Array
// import Data.Array.Unboxed
// import Data.Array.Strict
import Data.String
import Control.Function
import Algebra.Order
import Algebra.Enum
import Algebra.Group
import Algebra.Ring
import Algebra.Lattice
......
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
......
......@@ -2,7 +2,7 @@ implementation module Control.Applicative
import Data.Maybe
import Control.Function
import Data.Function
import Control.Functor
import Control.Foldable
......
implementation module Control.Foldable
import Control.Function
import Data.Function
import Data.Bool
import Data.Nat
import Data.Maybe
......
implementation module Control.Functor
import Control.Function
import Data.Function
/// # Class
......
implementation module Control.Monad
import Control.Function
import Data.Function
import Control.Functor
import Control.Applicative
......
implementation module Control.Sliceable
import Algebra.Order
import Control.Function
import Data.Function
import Control.Foldable
import Data.Bool
......
implementation module Control.Traversable
import Control.Function
import Data.Function
import Control.Functor
import Control.Applicative
import Control.Foldable
......
implementation module Data.Array
import Control.Function
import Data.Function
import Algebra.Order
import Algebra.Group
......
......@@ -3,7 +3,7 @@ implementation module Data.Char
import Data.Bool
import Data.Int
import Control.Function
import Data.Function
import Algebra.Order
......
implementation module Data.Either
import Control.Function
import Data.Function
import Control.Functor
import Control.Applicative
......
definition module Algebra.Enum
definition module Data.Enum
from Data.Nat import :: Nat
// import Algebra.Enum._Internal
// import Data.Enum._Internal
// import Clean._Enum
/// # Class
......
implementation module Data.Enum
definition module Control.Function
definition module Data.Function
import Clean.Prim
......@@ -53,4 +53,3 @@ uncurry f (a, b) :== f a b
abort s :== prim_abort s
undefined :: .a
implementation module Control.Function
implementation module Data.Function
undefined :: .a
undefined = abort "Run-time error! Program evaluated undefined value!"
definition module Data.Int
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.Ring import class Semiring, class Ring, class Domain
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