summaryrefslogtreecommitdiff
path: root/src/GF/Grammar/Grammar.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2009-02-23 12:42:44 +0000
committerkrasimir <krasimir@chalmers.se>2009-02-23 12:42:44 +0000
commit01fef5109c2920d13004ae5b94d192fa5fba205f (patch)
treea5211ace0573bbe5397b68681d1949889f73a000 /src/GF/Grammar/Grammar.hs
parent2bc918bb9a6489d5f40993c8417b147ffc375472 (diff)
Perhaps -> Maybe refactoring and better error message for conflicts during module update
Diffstat (limited to 'src/GF/Grammar/Grammar.hs')
-rw-r--r--src/GF/Grammar/Grammar.hs26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/GF/Grammar/Grammar.hs b/src/GF/Grammar/Grammar.hs
index f36177774..c3f303655 100644
--- a/src/GF/Grammar/Grammar.hs
+++ b/src/GF/Grammar/Grammar.hs
@@ -21,8 +21,6 @@ module GF.Grammar.Grammar (SourceGrammar,
mapSourceModule,
Info(..),
PValues,
- Perh,
- MPr,
Type,
Cat,
Fun,
@@ -82,30 +80,24 @@ type PValues = [Term]
-- and indirection to module (/INDIR/)
data Info =
-- judgements in abstract syntax
- AbsCat (Perh Context) (Perh [Term]) -- ^ (/ABS/) constructors; must be 'Id' or 'QId'
- | AbsFun (Perh Type) (Perh Term) -- ^ (/ABS/) 'Yes f' = canonical
+ AbsCat (Maybe Context) (Maybe [Term]) -- ^ (/ABS/) constructors; must be 'Id' or 'QId'
+ | AbsFun (Maybe Type) (Maybe Term) -- ^ (/ABS/) 'Yes f' = canonical
-- judgements in resource
- | ResParam (Perh ([Param],Maybe PValues)) -- ^ (/RES/)
- | ResValue (Perh (Type,Maybe Int)) -- ^ (/RES/) to mark parameter constructors for lookup
- | ResOper (Perh Type) (Perh Term) -- ^ (/RES/)
+ | ResParam (Maybe ([Param],Maybe PValues)) -- ^ (/RES/)
+ | ResValue (Maybe (Type,Maybe Int)) -- ^ (/RES/) to mark parameter constructors for lookup
+ | ResOper (Maybe Type) (Maybe Term) -- ^ (/RES/)
- | ResOverload [Ident] [(Type,Term)] -- ^ (/RES/) idents: modules inherited
+ | ResOverload [Ident] [(Type,Term)] -- ^ (/RES/) idents: modules inherited
-- judgements in concrete syntax
- | CncCat (Perh Type) (Perh Term) MPr -- ^ (/CNC/) lindef ini'zed,
- | CncFun (Maybe (Ident,(Context,Type))) (Perh Term) MPr -- (/CNC/) type info added at 'TC'
+ | CncCat (Maybe Type) (Maybe Term) (Maybe Term) -- ^ (/CNC/) lindef ini'zed,
+ | CncFun (Maybe (Ident,(Context,Type))) (Maybe Term) (Maybe Term) -- ^ (/CNC/) type info added at 'TC'
-- indirection to module Ident
- | AnyInd Bool Ident -- ^ (/INDIR/) the 'Bool' says if canonical
+ | AnyInd Bool Ident -- ^ (/INDIR/) the 'Bool' says if canonical
deriving (Read, Show)
--- | to express indirection to other module
-type Perh a = Perhaps a Ident
-
--- | printname
-type MPr = Perhaps Term Ident
-
type Type = Term
type Cat = QIdent
type Fun = QIdent