Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions primer-service/test/outputs/OpenAPI/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
},
"InputAction": {
"enum": [
"MakeConSat",
"MakeCon",
"MakeInt",
"MakeChar",
"MakeVar",
Expand Down Expand Up @@ -1062,7 +1062,7 @@
"required": true,
"schema": {
"enum": [
"MakeConSat",
"MakeCon",
"MakeInt",
"MakeChar",
"MakeVar",
Expand Down
2 changes: 1 addition & 1 deletion primer/src/Primer/Action.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions primer/src/Primer/Action/Available.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions primer/test/Tests/Action/Available.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ Output
}
)
, NoInput MakeCase
, Input MakeConSat
, Input MakeCon
( Options
{ opts =
[ Option
Expand Down Expand Up @@ -381,7 +381,7 @@ Output
}
)
, NoInput MakeCase
, Input MakeConSat
, Input MakeCon
( Options
{ opts =
[ Option
Expand Down Expand Up @@ -929,7 +929,7 @@ Output
}
)
, NoInput MakeCase
, Input MakeConSat
, Input MakeCon
( Options
{ opts =
[ Option
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ Output
}
)
, NoInput MakeCase
, Input MakeConSat
, Input MakeCon
( Options
{ opts =
[ Option
Expand Down Expand Up @@ -680,7 +680,7 @@ Output
}
)
, NoInput MakeCase
, Input MakeConSat
, Input MakeCon
( Options
{ opts =
[ Option
Expand Down Expand Up @@ -1714,7 +1714,7 @@ Output
}
)
, NoInput MakeCase
, Input MakeConSat
, Input MakeCon
( Options
{ opts =
[ Option
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ Output
}
)
, NoInput MakeCase
, Input MakeConSat
, Input MakeCon
( Options
{ opts =
[ Option
Expand Down Expand Up @@ -491,7 +491,7 @@ Output
}
)
, NoInput MakeCase
, Input MakeConSat
, Input MakeCon
( Options
{ opts =
[ Option
Expand Down Expand Up @@ -1151,7 +1151,7 @@ Output
}
)
, NoInput MakeCase
, Input MakeConSat
, Input MakeCon
( Options
{ opts =
[ Option
Expand Down