Skip to content
Snippets Groups Projects
Unverified Commit de81f6ca authored by stuebinm's avatar stuebinm
Browse files

some unused code

parent 35566bf1
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
module Properties (checkProperty) where module Properties (checkProperty) where
import Control.Monad (unless, when) import Control.Monad (unless)
import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Class (lift)
import Data.Aeson as Aeson (Value (String)) import Data.Aeson as Aeson (Value (String))
import Data.Map (Map, (!?)) import Data.Map (Map, (!?))
...@@ -33,7 +33,7 @@ type Properties = Map Text Aeson.Value ...@@ -33,7 +33,7 @@ type Properties = Map Text Aeson.Value
-- The tests in here are meant to comply with the informal spec -- The tests in here are meant to comply with the informal spec
-- at https://workadventu.re/map-building -- at https://workadventu.re/map-building
-- --
-- In practice, the actual specifiaction of what is allowed is -- In practice, the actual specification of what is allowed is
-- handled in checkProperty', since apparently all possible layerProperties -- handled in checkProperty', since apparently all possible layerProperties
-- are strings anyways, so this just extracts that string and then -- are strings anyways, so this just extracts that string and then
-- calls that. -- calls that.
...@@ -84,9 +84,6 @@ checkProperty' layer prop ty = case ty of ...@@ -84,9 +84,6 @@ checkProperty' layer prop ty = case ty of
-- | require some property in this layer -- | require some property in this layer
requireProperty name = unless (hasProperty name layer) requireProperty name = unless (hasProperty name layer)
$ complain $ "property "<>quote name<>" requires property "<>quote ty $ complain $ "property "<>quote name<>" requires property "<>quote ty
-- | forbid some property in this layer
forbidProperty name = when (hasProperty name layer)
$ forbid $ "property " <> quote name <> " should not be used"
-- | This property is forbidden and should not be used -- | This property is forbidden and should not be used
isForbidden = forbid $ "property " <> quote ty <> " should not be used" isForbidden = forbid $ "property " <> quote ty <> " should not be used"
-- TODO: check if the property has the correct value -- TODO: check if the property has the correct value
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment