Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
clean-and-itasks
clean-platform
Commits
90c555e9
Commit
90c555e9
authored
Nov 19, 2018
by
Steffen Michels
Committed by
Mart Lubbers
Nov 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add < instance for Maybe
parent
84f142fb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
1 deletion
+23
-1
src/libraries/OS-Independent/Data/Maybe.dcl
src/libraries/OS-Independent/Data/Maybe.dcl
+1
-1
src/libraries/OS-Independent/Data/Maybe/Ord.dcl
src/libraries/OS-Independent/Data/Maybe/Ord.dcl
+12
-0
src/libraries/OS-Independent/Data/Maybe/Ord.icl
src/libraries/OS-Independent/Data/Maybe/Ord.icl
+9
-0
tests/linux64/test.icl
tests/linux64/test.icl
+1
-0
No files found.
src/libraries/OS-Independent/Data/Maybe.dcl
View file @
90c555e9
...
...
@@ -5,7 +5,7 @@ definition module Data.Maybe
import
StdMaybe
from
StdOverloaded
import
class
==
(..)
from
StdOverloaded
import
class
==
from
Data
.
Functor
import
class
Functor
from
Control
.
Applicative
import
class
pure
,
class
<*>,
class
Applicative
,
class
*>,
class
<*,
class
Alternative
from
Control
.
Monad
import
class
Monad
,
class
MonadPlus
...
...
src/libraries/OS-Independent/Data/Maybe/Ord.dcl
0 → 100644
View file @
90c555e9
definition
module
Data
.
Maybe
.
Ord
/**
* This contains a possible `<` and with this an `Ord` instance of the `Maybe` type.
* As there is no natural order and therefore an arbitrary choice is made,
* the instances is provided in a separate module. This makes is easier to use another ordering.
*/
from
StdOverloaded
import
class
<
from
Data
.
Maybe
import
::
Maybe
instance
<
(
Maybe
a
)
|
<
a
src/libraries/OS-Independent/Data/Maybe/Ord.icl
0 → 100644
View file @
90c555e9
implementation
module
Data
.
Maybe
.
Ord
import
StdEnv
,
Data
.
Maybe
instance
<
(
Maybe
a
)
|
<
a
where
<
Nothing
Nothing
=
False
<
Nothing
_
=
True
<
(
Just
a1
)
(
Just
a2
)
=
a1
<
a2
<
_
_
=
False
tests/linux64/test.icl
View file @
90c555e9
...
...
@@ -123,6 +123,7 @@ import qualified Data.Map
import
qualified
Data
.
MapCollection
import
qualified
Data
.
Matrix
import
qualified
Data
.
Maybe
import
qualified
Data
.
Maybe
.
Ord
import
qualified
Data
.
Monoid
import
qualified
Data
.
NGramIndex
import
qualified
Data
.
OrdList
...
...
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