summaryrefslogtreecommitdiff
path: root/src/GF/Grammar/Lockfield.hs
diff options
context:
space:
mode:
authoraarne <unknown>2005-02-18 13:53:29 +0000
committeraarne <unknown>2005-02-18 13:53:29 +0000
commit75b03fb624af33c9b90c3f3dccacadf18b442d17 (patch)
tree4731876ea45b88a38a2f71934c55e9be7b4ca632 /src/GF/Grammar/Lockfield.hs
parentbafc9fbd0570626749261061c858cbbf95ccdcfb (diff)
working on resource doc and exx, fixing bugs
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