diff options
| author | krasimir <krasimir@chalmers.se> | 2010-09-12 12:26:38 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-09-12 12:26:38 +0000 |
| commit | d09f62b0b18bfe194893cdf1816c3f95f916ae89 (patch) | |
| tree | f6497a55c685049ab88a34a69f9374e19066ced0 /src/runtime | |
| parent | 1b6d9ee29da311adbaddc2f1239bae9ecec2a9e0 (diff) | |
bugfix in PGF.Type.pType: Agda style types like {x : A} -> B should not be supported in GF
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/haskell/PGF/Type.hs | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/runtime/haskell/PGF/Type.hs b/src/runtime/haskell/PGF/Type.hs index e3cf46eec..b51b74a59 100644 --- a/src/runtime/haskell/PGF/Type.hs +++ b/src/runtime/haskell/PGF/Type.hs @@ -67,21 +67,16 @@ pType = do do (cat,args) <- pAtom
return [(Explicit,wildCId,DTyp [] cat args)]
RP.<++
- (RP.between (RP.char '(') (RP.char ')') $ do
- xs <- RP.option [(Explicit,wildCId)] $ do
- xs <- pBinds
- RP.skipSpaces
- RP.char ':'
- return xs
- ty <- pType
- return [(b,v,ty) | (b,v) <- xs])
- RP.<++
- (RP.between (RP.char '{') (RP.char '}') $ do
- vs <- RP.sepBy1 (RP.skipSpaces >> pCId) (RP.skipSpaces >> RP.char ',')
- RP.skipSpaces
- RP.char ':'
- ty <- pType
- return [(Implicit,v,ty) | v <- vs])
+ do RP.between (RP.char '(') (RP.char ')') pHypoBinds
+
+pHypoBinds = do
+ xs <- RP.option [(Explicit,wildCId)] $ do
+ xs <- pBinds
+ RP.skipSpaces
+ RP.char ':'
+ return xs
+ ty <- pType
+ return [(b,v,ty) | (b,v) <- xs]
pAtom = do
cat <- pCId
|
