Commit 0f6de3a5 authored by Mart Lubbers's avatar Mart Lubbers

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

Merge branch 'master' of gitlab.science.ru.nl:clean-and-itasks/iTasks-SDK into separate-basicAPIExamples
parents fac84b86 703fdae8
......@@ -657,7 +657,7 @@ toggleDoor roomNo=:(floorIdx, c2d) exit
where
newLocks :: !Dir ![Dir] -> [Dir]
newLocks dir locks
#! (lockedDirs, rest) = splitWith (\l -> l === dir) locks
#! (lockedDirs, rest) = partition (\l -> l === dir) locks
| isEmpty lockedDirs = [dir : rest]
| otherwise = rest
......@@ -672,7 +672,7 @@ toggleHop fromRoom toRoom
where
newLocks :: !Coord3D ![Coord3D] -> [Coord3D]
newLocks c3d locks
#! (lockedDirs, rest) = splitWith (\l -> l === c3d) locks
#! (lockedDirs, rest) = partition (\l -> l === c3d) locks
| isEmpty lockedDirs = [c3d : rest]
| otherwise = rest
......
......@@ -41,7 +41,7 @@ dbUpdateItem new
dbDeleteItem :: !(DBRef a) -> Task (Maybe a) | iTask, DB a
dbDeleteItem itemid
= get databaseId >>= \items ->
let (match, nomatch) = splitWith (\i -> getItemId i == itemid) items in
let (match, nomatch) = partition (\i -> getItemId i == itemid) items in
dbWriteAll nomatch >>| case match of
[] = return Nothing
[item:_] = return (Just item)
......
......@@ -11,7 +11,7 @@ derive JSONEncode TonicModule, TonicFunc, TExpr, TPriority, TAssoc, TLit
derive JSONDecode TonicModule, TonicFunc, TExpr, TPriority, TAssoc, TLit
derive gEq TonicModule, TonicFunc, TExpr, TPriority, TAssoc, TLit, Maybe
derive gEq TonicModule, TonicFunc, TExpr, TPriority, TAssoc, TLit
instance == TonicModule where
(==) tm1 tm2 = tm1.tm_name == tm2.tm_name
......
......@@ -532,8 +532,8 @@ gEditor{|Char|} = bijectEditorValue toString (\c -> c.[0]) (selectByMode
gEditor{|String|} = selectByMode
textView
(withDynamicHintAttributes "single line of text" (withEditModeAttr textField ))
(withDynamicHintAttributes "single line of text" (withEditModeAttr textField ))
(withDynamicHintAttributes "single line of text" (withEditModeAttr textField <<@ minlengthAttr 1))
(withDynamicHintAttributes "single line of text" (withEditModeAttr textField <<@ minlengthAttr 1))
gEditor{|Bool|} = selectByMode (checkBox <<@ enabledAttr False) (withEditMode Update checkBox) checkBox
gEditor{|[]|} ex _ dx tjx _ = listEditor_ tjx dx (Just (const Nothing)) True True (Just (\l -> pluralisen English (length l) "item")) ex
......
......@@ -110,7 +110,7 @@ where
}
apply ui=:(UI t attr cs)
# (actions, others) = splitWith (\s->s=:(UI UIAction _ _)) cs
# (actions, others) = partition (\s->s=:(UI UIAction _ _)) cs
= (ReplaceUI (UI t attr (mkmenu actions ++ others)), LSType ui)
adjust (NoChange,s) = (NoChange,s)
......
......@@ -21,7 +21,7 @@ from Text.HTML import :: SVGStrokeDashArray, :: SVGStrokeDashOffset, :: SVGStrok
//Common library types
derive JSONEncode (), HtmlTag, HtmlAttr, Either, MaybeError, Timestamp
derive JSONDecode (), HtmlTag, HtmlAttr, Either, MaybeError, Timestamp
derive gEq (), HtmlTag, HtmlAttr, Either, MaybeError, Timestamp, JSONNode, (->), Dynamic, Maybe
derive gEq (), HtmlTag, HtmlAttr, Either, MaybeError, Timestamp, JSONNode, (->), Dynamic
derive gDefault HtmlAttr
derive gEditor HtmlAttr
derive gText HtmlAttr
......
......@@ -16,7 +16,7 @@ import StdArray
// Generic instances for common library types
derive JSONEncode Either, MaybeError, HtmlTag, HtmlAttr
derive JSONDecode Either, MaybeError, HtmlTag, HtmlAttr
derive gEq Either, MaybeError, HtmlTag, HtmlAttr, Timestamp, JSONNode, Maybe
derive gEq Either, MaybeError, HtmlTag, HtmlAttr, Timestamp, JSONNode
gEq{|()|} _ _ = True
JSONEncode{|()|} _ () = [JSONNull]
......
......@@ -3,6 +3,7 @@ set -e
trap 'mv -v /opt/clean/etc/IDEEnvs{.bak,}' EXIT
cp -v /opt/clean/etc/IDEEnvs{,.bak}
sed -i "s|{Application}/lib/iTasks|$(pwd)/Libraries|g" /opt/clean/etc/IDEEnvs
sed -i 's#EnvironmentLinker: lib/exe/linker#&:-lmysqlclient -lsqlite3#g' /opt/clean/etc/IDEEnvs
#Create BasicAPIExamples
(
......
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