Commit 6d7f2346 authored by Mart Lubbers's avatar Mart Lubbers

Merge branch 'genericNewtypeConstructors' into 'master'

don't use newtype constructors OBJECT & FIELD without arguments

See merge request !212
parents c1a650af c53a7332
Pipeline #16556 passed with stage
in 3 minutes and 41 seconds
......@@ -135,7 +135,7 @@ where
onEdit dp (tp,e) childSt vst = exOnEdit dp (tp,e) childSt vst
onRefresh dp (FIELD new) childSt vst = exOnRefresh dp new childSt vst
valueFromState state = mapMaybe FIELD $ exValueFromState state
valueFromState state = mapMaybe (\x -> FIELD x) $ exValueFromState state
/*
* For ADT's we need to deal with two cases:
......@@ -247,7 +247,7 @@ where
= (Ok (change, viewMode, [consChooseSt, childSt]), {vst & selectedConsIndex = curSelectedConsIndex})
(Error e,vst) = (Error e,vst)
valueFromState _ [_, childSt] = mapMaybe OBJECT $ exValueFromState childSt
valueFromState _ [_, childSt] = mapMaybe (\x -> OBJECT x) $ exValueFromState childSt
valueFromState _ _ = Nothing
gEditor{|EITHER|} ex _ _ _ ey _ _ _
......
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