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-libraries
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
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-libraries
Commits
596ecb71
Commit
596ecb71
authored
Aug 15, 2018
by
John van Groningen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove function accMaybe and type St (St will be removed from module StdEnv)
parent
072f056b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
13 deletions
+0
-13
Libraries/StdLib/StdMaybe.dcl
Libraries/StdLib/StdMaybe.dcl
+0
-5
Libraries/StdLib/StdMaybe.icl
Libraries/StdLib/StdMaybe.icl
+0
-8
No files found.
Libraries/StdLib/StdMaybe.dcl
View file @
596ecb71
...
...
@@ -4,7 +4,6 @@ definition module StdMaybe
// Clean StdLib library module, version 1.0
// ********************************************************************************
from
StdFunc
import
::
St
;
from
StdOverloaded
import
class
==(..);
::
Maybe
x
...
...
@@ -19,10 +18,6 @@ fromJust :: !(Maybe .x) -> .x // \(Just x) -> x
u_isJust
::
!
u
:(
Maybe
.
x
)
->
(!
Bool
,
!
u
:
Maybe
.
x
)
u_isNothing
::
!
u
:(
Maybe
.
x
)
->
(!
Bool
,
!
u
:
Maybe
.
x
)
accMaybe
::
.(
St
.
x
.
a
)
!
u
:(
Maybe
.
x
)
->
(!
Maybe
.
a
,!
u
:
Maybe
.
x
)
// accMaybe f (Just x) = (Just (fst (f x)),Just (snd (f x)))
// accMaybe f Nothing = (Nothing,Nothing)
mapMaybe
::
.(.
x
->
.
y
)
!(
Maybe
.
x
)
->
Maybe
.
y
// mapMaybe f (Just x) = Just (f x)
// mapMaybe f Nothing = Nothing
...
...
Libraries/StdLib/StdMaybe.icl
View file @
596ecb71
...
...
@@ -4,7 +4,6 @@ implementation module StdMaybe
// Clean StdLib library module, version 1.0
// ********************************************************************************
from
StdFunc
import
::
St
;
from
StdOverloaded
import
class
==(..);
::
Maybe
x
...
...
@@ -34,13 +33,6 @@ u_isNothing just
fromJust
::
!(
Maybe
.
x
)
->
.
x
fromJust
(
Just
x
)
=
x
accMaybe
::
.(
St
.
x
.
a
)
!
u
:(
Maybe
.
x
)
->
(!
Maybe
.
a
,!
u
:
Maybe
.
x
)
accMaybe
f
(
Just
x
)
#
(
a
,
x
)
=
f
x
=
(
Just
a
,
Just
x
)
accMaybe
_
nothing
=
(
Nothing
,
nothing
)
mapMaybe
::
.(.
x
->
.
y
)
!(
Maybe
.
x
)
->
Maybe
.
y
mapMaybe
f
(
Just
x
)
=
Just
(
f
x
)
mapMaybe
_
nothing
=
Nothing
...
...
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