Skip to content

Commit

Permalink
Add back view and knows and sort
Browse files Browse the repository at this point in the history
  • Loading branch information
xsebek committed Sep 9, 2024
1 parent 4909e5d commit 74f9dab
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/swarm-lang/Swarm/Language/Capability.hs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ capabilityName :: Capability -> Text
capabilityName = \case
CExecute con -> case con of
Neg -> "neg"
Not -> "not"
_ -> syntax $ constInfo con
CMoveHeavy -> "move heavy robot"
cap -> from @String . map toLower . drop 1 $ show cap
Expand Down Expand Up @@ -107,30 +106,31 @@ constCaps :: Const -> Maybe Capability
constCaps = \case
-- ----------------------------------------------------------------
-- Some built-in constants that don't require any special capability.
Noop -> Nothing
AppF -> Nothing
Base -> Nothing
Equipped -> Nothing
Fail -> Nothing
Force -> Nothing
Return -> Nothing
Has -> Nothing
Knows -> Nothing
Noop -> Nothing
Parent -> Nothing
Base -> Nothing
Return -> Nothing
Say -> Nothing -- speaking is natural to robots (unlike listening)
Setname -> Nothing
Undefined -> Nothing
Fail -> Nothing
Has -> Nothing
Equipped -> Nothing
-- speaking is natural to robots (unlike listening)
Say -> Nothing
Use -> Nothing -- Recipes alone shall dictate whether things can be "used"
View -> Nothing -- TODO: #17 should require equipping an antenna
-- TODO: #495
-- the require command will be inlined once the Issue is fixed
-- so the capabilities of the run commands will be checked instead
Run -> Nothing
Use -> Nothing -- Recipes alone shall dictate whether things can be "used"
-- Some God-like abilities.
Instant -> Just CGod
As -> Just CGod
Create -> Just CGod
Instant -> Just CGod
RobotNamed -> Just CGod
RobotNumbered -> Just CGod
Create -> Just CGod
Surveil -> Just CGod
-- ----------------------------------------------------------------
-- type-level arithmetic
Expand Down

0 comments on commit 74f9dab

Please sign in to comment.