diff --git a/primer-service/test/outputs/OpenAPI/openapi.json b/primer-service/test/outputs/OpenAPI/openapi.json index a3cb60972..a67c94034 100644 --- a/primer-service/test/outputs/OpenAPI/openapi.json +++ b/primer-service/test/outputs/OpenAPI/openapi.json @@ -170,7 +170,7 @@ }, "InputAction": { "enum": [ - "MakeConSat", + "MakeCon", "MakeInt", "MakeChar", "MakeVar", @@ -1062,7 +1062,7 @@ "required": true, "schema": { "enum": [ - "MakeConSat", + "MakeCon", "MakeInt", "MakeChar", "MakeVar", diff --git a/primer/src/Primer/Action.hs b/primer/src/Primer/Action.hs index 9073854c7..c2bd26e27 100644 --- a/primer/src/Primer/Action.hs +++ b/primer/src/Primer/Action.hs @@ -922,7 +922,7 @@ toProgActionInput :: Available.InputAction -> Either ActionError [ProgAction] toProgActionInput def defName mNodeSel opt0 = \case - Available.MakeConSat -> do + Available.MakeCon -> do opt <- optGlobal toProg [ConstructSaturatedCon opt] Available.MakeInt -> do diff --git a/primer/src/Primer/Action/Available.hs b/primer/src/Primer/Action/Available.hs index e3ec29151..adbadb59a 100644 --- a/primer/src/Primer/Action/Available.hs +++ b/primer/src/Primer/Action/Available.hs @@ -122,7 +122,7 @@ data NoInputAction -- | An action which requires extra data (often a name) before it can be applied. data InputAction - = MakeConSat + = MakeCon | MakeInt | MakeChar | MakeVar @@ -201,7 +201,7 @@ forExpr tydefs l expr = EmptyHole{} -> annotate <> [ Input MakeVar - , Input MakeConSat + , Input MakeCon ] <> mwhen (Map.member tInt tydefs) [Input MakeInt] <> mwhen (Map.member tChar tydefs) [Input MakeChar] @@ -326,7 +326,7 @@ options :: -- or found but didn't correspond to the expected sort of entity (type/expr/pattern). Maybe Options options typeDefs defs cxt level def mNodeSel = \case - MakeConSat -> + MakeCon -> pure . noFree . map (globalOpt . valConName . snd) @@ -451,7 +451,7 @@ sortByPriority l = DuplicateDef -> P.duplicate DeleteDef -> P.delete Input a -> case a of - MakeConSat -> P.useSaturatedValueCon + MakeCon -> P.useSaturatedValueCon MakeInt -> P.makeInt MakeChar -> P.makeChar MakeVar -> P.useVar diff --git a/primer/test/Tests/Action/Available.hs b/primer/test/Tests/Action/Available.hs index 4f57e4007..747aa8861 100644 --- a/primer/test/Tests/Action/Available.hs +++ b/primer/test/Tests/Action/Available.hs @@ -34,7 +34,7 @@ import Primer.Action ( toProgActionInput, toProgActionNoInput, ) -import Primer.Action.Available (InputAction (MakeConSat), NoInputAction (Raise), Option (Option)) +import Primer.Action.Available (InputAction (MakeCon), NoInputAction (Raise), Option (Option)) import Primer.Action.Available qualified as Available import Primer.App ( App, @@ -368,7 +368,7 @@ unit_sat_con_1 = Intermediate (emptyHole `ann` (tEmptyHole `tfun` tEmptyHole)) [Child1] - (Right (MakeConSat, Option "Cons" $ Just $ unName <$> unModuleName builtinModuleName)) + (Right (MakeCon, Option "Cons" $ Just $ unName <$> unModuleName builtinModuleName)) (hole (con cCons [emptyHole, emptyHole] `ann` tEmptyHole) `ann` (tEmptyHole `tfun` tEmptyHole)) unit_sat_con_2 :: Assertion @@ -378,7 +378,7 @@ unit_sat_con_2 = Intermediate (emptyHole `ann` ((tcon tList `tapp` tcon tNat) `tfun` (tcon tList `tapp` tcon tNat))) [Child1] - (Right (MakeConSat, Option "Cons" $ Just $ unName <$> unModuleName builtinModuleName)) + (Right (MakeCon, Option "Cons" $ Just $ unName <$> unModuleName builtinModuleName)) (hole (con cCons [emptyHole, emptyHole] `ann` tEmptyHole) `ann` ((tcon tList `tapp` tcon tNat) `tfun` (tcon tList `tapp` tcon tNat))) -- | Apply the action to the node in the input expression pointed to by the diff --git a/primer/test/outputs/available-actions/M.comprehensive/Beginner-Editable.fragment b/primer/test/outputs/available-actions/M.comprehensive/Beginner-Editable.fragment index 820c8f5b3..d12798635 100644 --- a/primer/test/outputs/available-actions/M.comprehensive/Beginner-Editable.fragment +++ b/primer/test/outputs/available-actions/M.comprehensive/Beginner-Editable.fragment @@ -306,7 +306,7 @@ Output } ) , NoInput MakeCase - , Input MakeConSat + , Input MakeCon ( Options { opts = [ Option @@ -381,7 +381,7 @@ Output } ) , NoInput MakeCase - , Input MakeConSat + , Input MakeCon ( Options { opts = [ Option @@ -929,7 +929,7 @@ Output } ) , NoInput MakeCase - , Input MakeConSat + , Input MakeCon ( Options { opts = [ Option diff --git a/primer/test/outputs/available-actions/M.comprehensive/Expert-Editable.fragment b/primer/test/outputs/available-actions/M.comprehensive/Expert-Editable.fragment index 13217d2ed..6f3177782 100644 --- a/primer/test/outputs/available-actions/M.comprehensive/Expert-Editable.fragment +++ b/primer/test/outputs/available-actions/M.comprehensive/Expert-Editable.fragment @@ -487,7 +487,7 @@ Output } ) , NoInput MakeCase - , Input MakeConSat + , Input MakeCon ( Options { opts = [ Option @@ -680,7 +680,7 @@ Output } ) , NoInput MakeCase - , Input MakeConSat + , Input MakeCon ( Options { opts = [ Option @@ -1714,7 +1714,7 @@ Output } ) , NoInput MakeCase - , Input MakeConSat + , Input MakeCon ( Options { opts = [ Option diff --git a/primer/test/outputs/available-actions/M.comprehensive/Intermediate-Editable.fragment b/primer/test/outputs/available-actions/M.comprehensive/Intermediate-Editable.fragment index 7e3e6ddd1..4493fc0c6 100644 --- a/primer/test/outputs/available-actions/M.comprehensive/Intermediate-Editable.fragment +++ b/primer/test/outputs/available-actions/M.comprehensive/Intermediate-Editable.fragment @@ -319,7 +319,7 @@ Output } ) , NoInput MakeCase - , Input MakeConSat + , Input MakeCon ( Options { opts = [ Option @@ -491,7 +491,7 @@ Output } ) , NoInput MakeCase - , Input MakeConSat + , Input MakeCon ( Options { opts = [ Option @@ -1151,7 +1151,7 @@ Output } ) , NoInput MakeCase - , Input MakeConSat + , Input MakeCon ( Options { opts = [ Option