Commit 96c077b9 authored by Tim Steenvoorden's avatar Tim Steenvoorden
Browse files

remove Data.Tuple from core

parent abec75bd
......@@ -5,10 +5,10 @@ import Data.Char
import Data.Nat
import Data.Int
import Data.Real
// import Data.File
import Data.Function
import Data.Tuple
import Data.Enum
import Data.Array
import Data.Array.Unboxed
......
......@@ -2,37 +2,6 @@ implementation module Clean.Core
import Clean.Core
c :: {#Int}
c = {1, 2}
a = {#0,1,2,3,4}
d :: {#Int}
d = {3, 4}
// e :: {#Nat}
// e = {nat 1, nat 2}
:: NewInt = {n :: Int}
instance Semigroup {#NewInt} where
(+) xs ys = concatUnboxedArray xs ys
// concatUnboxedArray :: {#a} {#a} -> {#a}
concatUnboxedArray xs ys #
// new = array (size xs + size ys) neutral
new = unsafeArray (size xs + size ys)
new = { new & [i] = xs.[i] \\ i <- [0..pred (size xs)] }
new = { new & [i + size xs] = ys.[i] \\ i <- [0..pred (size ys)] }
:== new
f :: {#NewInt}
f = {{n = 5}, {n = 6}}
g :: {#NewInt}
g = {{n = 7}, {n = 8}}
n0 = nat 0
n1 = nat 1
n2 = nat 2
n_ = nat -1
Start = [n2 .- n1, n1 .- n0, n1 .- n2, n_]
Start = (a,show a)
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