Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clean-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
17
Issues
17
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
clean-platform
Commits
4b596266
Verified
Commit
4b596266
authored
Dec 16, 2017
by
Camil Staps
🚀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move Functor instances
parent
df224d7a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
15 deletions
+23
-15
src/libraries/OS-Independent/Data/Func.dcl
src/libraries/OS-Independent/Data/Func.dcl
+4
-0
src/libraries/OS-Independent/Data/Func.icl
src/libraries/OS-Independent/Data/Func.icl
+7
-0
src/libraries/OS-Independent/Data/Functor.dcl
src/libraries/OS-Independent/Data/Functor.dcl
+0
-4
src/libraries/OS-Independent/Data/Functor.icl
src/libraries/OS-Independent/Data/Functor.icl
+0
-10
src/libraries/OS-Independent/Data/Traversable.icl
src/libraries/OS-Independent/Data/Traversable.icl
+1
-0
src/libraries/OS-Independent/Data/Tuple.dcl
src/libraries/OS-Independent/Data/Tuple.dcl
+4
-0
src/libraries/OS-Independent/Data/Tuple.icl
src/libraries/OS-Independent/Data/Tuple.icl
+6
-0
src/libraries/OS-Independent/Internet/HTTP.icl
src/libraries/OS-Independent/Internet/HTTP.icl
+1
-1
No files found.
src/libraries/OS-Independent/Data/Func.dcl
View file @
4b596266
definition
module
Data
.
Func
from
Data
.
Functor
import
class
Functor
instance
Functor
((->)
r
)
/**
* Function application.
* @type (a -> b) a -> b
...
...
src/libraries/OS-Independent/Data/Func.icl
View file @
4b596266
implementation
module
Data
.
Func
from
StdFunc
import
o
import
Data
.
Functor
instance
Functor
((->)
r
)
where
fmap
f
g
=
\
x
->
(
f
o
g
)
x
seqSt
::
!(
a
.
st
->
.
st
)
![
a
]
!.
st
->
.
st
seqSt
f
[]
st
=
st
seqSt
f
[
x
:
xs
]
st
=
seqSt
f
xs
(
f
x
st
)
...
...
src/libraries/OS-Independent/Data/Functor.dcl
View file @
4b596266
...
...
@@ -17,7 +17,3 @@ class Functor f where
void
::
!(
f
a
)
->
f
()
|
Functor
f
void
x
:==
()
<$
x
instance
Functor
((->)
r
)
instance
Functor
((,)
a
)
src/libraries/OS-Independent/Data/Functor.icl
View file @
4b596266
implementation
module
Data
.
Functor
from
StdFunc
import
o
import
Control
.
Applicative
instance
Functor
((->)
r
)
where
fmap
f
g
=
\
x
->
(
f
o
g
)
x
instance
Functor
((,)
a
)
where
fmap
f
(
x
,
y
)
=
(
x
,
f
y
)
src/libraries/OS-Independent/Data/Traversable.icl
View file @
4b596266
...
...
@@ -16,6 +16,7 @@ from Control.Monad import class Monad
import
qualified
Control
.
Monad
as
CM
from
Data
.
Monoid
import
class
Monoid
import
Data
.
Maybe
import
Data
.
Tuple
from
StdFunc
import
o
,
id
,
flip
instance
Traversable
Maybe
where
...
...
src/libraries/OS-Independent/Data/Tuple.dcl
View file @
4b596266
definition
module
Data
.
Tuple
from
Data
.
Functor
import
class
Functor
tuple
::
a
b
->
(
a
,
b
)
tuple3
::
a
b
c
->
(
a
,
b
,
c
)
...
...
@@ -11,3 +13,5 @@ appSnd3 :: (.b -> .d) !(.a,.b,.c) -> (.a,.d,.c)
appThd3
::
(.
c
->
.
d
)
!(.
a
,.
b
,.
c
)
->
(.
a
,.
b
,.
d
)
swap
::
!(
a
,
b
)
->
(
b
,
a
)
instance
Functor
((,)
a
)
src/libraries/OS-Independent/Data/Tuple.icl
View file @
4b596266
implementation
module
Data
.
Tuple
import
Data
.
Functor
tuple
::
a
b
->
(
a
,
b
)
tuple
a
b
=
(
a
,
b
)
...
...
@@ -23,3 +25,7 @@ appThd3 f (a,b,c) = (a,b,f c)
swap
::
!(
a
,
b
)
->
(
b
,
a
)
swap
(
a
,
b
)
=
(
b
,
a
)
instance
Functor
((,)
a
)
where
fmap
f
(
x
,
y
)
=
(
x
,
f
y
)
src/libraries/OS-Independent/Internet/HTTP.icl
View file @
4b596266
...
...
@@ -5,7 +5,7 @@ import Data.Maybe, Data.List, Text, Text.Encodings.UrlEncoding, Text.Encodings.M
from
Data
.
Map
import
get
,
put
,
::
Map
(..),
newMap
,
fromList
,
toList
,
toAscList
,
foldrWithKey
from
StdFunc
import
id
from
Data
.
Func
import
$
from
Data
.
Func
import
$
,
instance
Functor
((->)
r
)
import
Data
.
Error
import
Text
.
URI
import
Data
.
Functor
...
...
Write
Preview
Markdown
is supported
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