src/Tools/Haskell/Properties.hs
changeset 69381 4c9b4e2c5460
parent 69380 87644f76c997
child 69382 d70767e508d7
--- a/src/Tools/Haskell/Properties.hs	Fri Nov 30 23:30:42 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-{- generated by Isabelle -}
-
-{-  Title:      Tools/Haskell/Properties.hs
-    Author:     Makarius
-    LICENSE:    BSD 3-clause (Isabelle)
-
-Property lists.
-
-See also "$ISABELLE_HOME/src/Pure/General/properties.ML".
--}
-
-module Isabelle.Properties (Entry, T, defined, get, put, remove)
-where
-
-import qualified Data.List as List
-
-
-type Entry = (String, String)
-type T = [Entry]
-
-defined :: T -> String -> Bool
-defined props name = any (\(a, _) -> a == name) props
-
-get :: T -> String -> Maybe String
-get props name = List.lookup name props
-
-put :: Entry -> T -> T
-put entry props = entry : remove (fst entry) props
-
-remove :: String -> T -> T
-remove name props =
-  if defined props name then filter (\(a, _) -> a /= name) props
-  else props