summaryrefslogtreecommitdiff
path: root/src/GF/Grammar/LookAbs.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2009-01-31 22:08:12 +0000
committerkrasimir <krasimir@chalmers.se>2009-01-31 22:08:12 +0000
commitdb9a1acaebb18599bb5fbd933ff4b13bccb8c4db (patch)
tree02ee7147c8a706dd036e6cea642c105bd7665826 /src/GF/Grammar/LookAbs.hs
parent5e3a1f73927c8849ac1f8e91519f436f385e9e86 (diff)
merge Lookup and LookAbs and move some lookup functions from PrGrammar to Lookup
Diffstat (limited to 'src/GF/Grammar/LookAbs.hs')
-rw-r--r--src/GF/Grammar/LookAbs.hs47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/GF/Grammar/LookAbs.hs b/src/GF/Grammar/LookAbs.hs
deleted file mode 100644
index 137e602aa..000000000
--- a/src/GF/Grammar/LookAbs.hs
+++ /dev/null
@@ -1,47 +0,0 @@
-----------------------------------------------------------------------
--- |
--- Module : LookAbs
--- Maintainer : AR
--- Stability : (stable)
--- Portability : (portable)
---
--- > CVS $Date: 2005/04/28 16:42:48 $
--- > CVS $Author: aarne $
--- > CVS $Revision: 1.14 $
---
--- (Description of the module)
------------------------------------------------------------------------------
-
-module GF.Grammar.LookAbs (
- lookupFunType,
- lookupCatContext
- ) where
-
-import GF.Data.Operations
-import GF.Grammar.Abstract
-import GF.Infra.Ident
-
-import GF.Infra.Modules
-
-import Data.List (nub)
-import Control.Monad
-
--- | this is needed at compile time
-lookupFunType :: Grammar -> Ident -> Ident -> Err Type
-lookupFunType gr m c = do
- mo <- lookupModule gr m
- info <- lookupIdentInfo mo c
- case info of
- AbsFun (Yes t) _ -> return t
- AnyInd _ n -> lookupFunType gr n c
- _ -> prtBad "cannot find type of" c
-
--- | this is needed at compile time
-lookupCatContext :: Grammar -> Ident -> Ident -> Err Context
-lookupCatContext gr m c = do
- mo <- lookupModule gr m
- info <- lookupIdentInfo mo c
- case info of
- AbsCat (Yes co) _ -> return co
- AnyInd _ n -> lookupCatContext gr n c
- _ -> prtBad "unknown category" c