Commit 9df66b44 authored by Mart Lubbers's avatar Mart Lubbers

Merge branch 'master' of gitlab.science.ru.nl:clean-and-itasks/clean-platform

parents 41942712 e37702da
Pipeline #8125 passed with stage
in 2 minutes and 10 seconds
......@@ -7,16 +7,16 @@ from Data.Maybe import :: Maybe
class Monad m | Applicative m where
bind :: !(m a) (a -> m b) -> m b
(>>=) infixl 1 :: (m a) (a -> m b) -> m b
(>>=) infixl 1 :: (m a) (a -> m b) -> m b | Monad m
(>>=) ma a2mb :== bind ma a2mb
(`b`) infixl 1 :: (m a) (a -> m b) -> m b
(`b`) infixl 1 :: (m a) (a -> m b) -> m b | Monad m
(`b`) ma a2mb :== bind ma a2mb
(>>|) infixl 1 :: (m a) (m b) -> m b | Monad m
(>>|) ma mb :== ma >>= \_ -> mb
(=<<) infixr 1 :: (a -> m b) (m a) -> m b
(=<<) infixr 1 :: (a -> m b) (m a) -> m b | Monad m
(=<<) f x :== x >>= f
instance Monad ((->) r)
......
......@@ -6,16 +6,16 @@ from StdFunc import const
class Functor f where
fmap :: (a -> b) !(f a) -> f b
(<$>) infixl 4 :: (a -> b) !(f a) -> f b
(<$>) infixl 4 :: (a -> b) !(f a) -> f b | Functor f
(<$>) f fa :== fmap f fa
(<$) infixl 4 :: a !(f b) -> f a
(<$) infixl 4 :: a !(f b) -> f a | Functor f
(<$) x fa :== fmap (const x) fa
($>) infixl 4 :: !(f b) a -> f a
($>) infixl 4 :: !(f b) a -> f a | Functor f
($>) fa x :== x <$ fa
void :: !(f a) -> f ()
void :: !(f a) -> f () | Functor f
void x :== () <$ x
instance Functor ((->) r)
......
......@@ -3,7 +3,7 @@
definition module Data.Graphviz
from StdOverloaded import class toString
from StdOverloaded import class toString, class ==
from Data.Maybe import :: Maybe
from GenEq import generic gEq
......
......@@ -7,14 +7,14 @@ import qualified StdList
class Semigroup a where
mappend :: !a a -> a
mconcat :: !.[a] -> a
mconcat xs :== 'StdList'.foldr mappend mempty xs
(<++>) infixr 6 :: a a -> a | Semigroup a
(<++>) ma mb :== mappend ma mb
class Monoid a | Semigroup a where
mempty :: a
(<++>) infixr 6 :: a a -> a
(<++>) ma mb :== mappend ma mb
mconcat :: !.[a] -> a | Monoid a
mconcat xs :== 'StdList'.foldr mappend mempty xs
instance Semigroup [a]
instance Semigroup (a -> b) | Semigroup b
......
......@@ -26,8 +26,8 @@ STDERR_FILENO :== 2
FIONREAD :== 0x541B
F_SETFD :== 2
O_CLOEXEC :== 02000000
F_SETFD :== 2
FD_CLOEXEC :== 1
//Posix API calls
errno :: !*w -> (!Int,!*w)
......
......@@ -25,8 +25,8 @@ STDERR_FILENO :== 2
FIONREAD :== 0x4004667F
F_SETFD :== 2
O_CLOEXEC :== 02000000
F_SETFD :== 2
FD_CLOEXEC :== 1
//Posix API calls
errno :: !*w -> (!Int,!*w)
......
......@@ -109,8 +109,8 @@ runProcessChildProcessExec :: !FilePath ![String] !(Maybe String) !Int !Int !*Wo
runProcessChildProcessExec path args mCurrentDirectory pipeExecErrorOut pipeExecErrorIn world
# (res, world) = close pipeExecErrorOut world
| res == -1 = passLastOSErrorToParent pipeExecErrorIn world
// set O_CLOEXEC such that parent is informed if 'execvp' succeeds
# (res, world) = fcntlArg pipeExecErrorIn F_SETFD O_CLOEXEC world
// set FD_CLOEXEC such that parent is informed if 'execvp' succeeds
# (res, world) = fcntlArg pipeExecErrorIn F_SETFD FD_CLOEXEC world
| res == -1 = passLastOSErrorToParent pipeExecErrorIn world
//Chdir
# (res,world) = case mCurrentDirectory of
......
Markdown is supported
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