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
96c077b9
Commit
96c077b9
authored
Mar 07, 2016
by
Tim Steenvoorden
Browse files
remove Data.Tuple from core
parent
abec75bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Sources/Clean/Core.dcl
View file @
96c077b9
...
...
@@ -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
...
...
Sources/Clean/Core.icl
View file @
96c077b9
...
...
@@ -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
)
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