summaryrefslogtreecommitdiff
path: root/src/GF/Grammar/Lockfield.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Grammar/Lockfield.hs')
-rw-r--r--src/GF/Grammar/Lockfield.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/GF/Grammar/Lockfield.hs b/src/GF/Grammar/Lockfield.hs
index f283dde93..f7ec081bd 100644
--- a/src/GF/Grammar/Lockfield.hs
+++ b/src/GF/Grammar/Lockfield.hs
@@ -12,7 +12,7 @@
-- Creating and using lock fields in reused resource grammars.
-----------------------------------------------------------------------------
-module Lockfield (lockRecType, unlockRecord, lockLabel) where
+module Lockfield (lockRecType, unlockRecord, lockLabel, isLockLabel) where
import Grammar
import Ident
@@ -40,3 +40,7 @@ unlockRecord c ft = do
lockLabel :: Ident -> Label
lockLabel c = LIdent $ "lock_" ++ prt c ----
+isLockLabel :: Label -> Bool
+isLockLabel l = case l of
+ LIdent c -> take 5 c == "lock_"
+ _ -> False \ No newline at end of file