From de81f6cac440fff159546f6423f017197db49e1a Mon Sep 17 00:00:00 2001 From: stuebinm Date: Thu, 16 Sep 2021 02:41:40 +0200 Subject: some unused code --- lib/Properties.hs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/Properties.hs b/lib/Properties.hs index 0b9a71f..10cbf2c 100644 --- a/lib/Properties.hs +++ b/lib/Properties.hs @@ -5,7 +5,7 @@ module Properties (checkProperty) where -import Control.Monad (unless, when) +import Control.Monad (unless) import Control.Monad.Trans.Class (lift) import Data.Aeson as Aeson (Value (String)) import Data.Map (Map, (!?)) @@ -33,7 +33,7 @@ type Properties = Map Text Aeson.Value -- The tests in here are meant to comply with the informal spec -- 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 -- are strings anyways, so this just extracts that string and then -- calls that. @@ -84,9 +84,6 @@ checkProperty' layer prop ty = case ty of -- | require some property in this layer requireProperty name = unless (hasProperty name layer) $ 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 isForbidden = forbid $ "property " <> quote ty <> " should not be used" -- TODO: check if the property has the correct value -- cgit v1.2.3