diff options
| author | aarne <unknown> | 2005-11-14 15:03:40 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2005-11-14 15:03:40 +0000 |
| commit | f339b8839bcb25a57cb22baa3342032892f9be63 (patch) | |
| tree | 59b15d37579d5b5630d9ae5ac7a9d701cf3e09a4 /src/GF/Canon | |
| parent | 505eb2ec5794e741d343e52be4f75da7b4980a62 (diff) | |
arbitrary lincat records; noparse pragmas
Diffstat (limited to 'src/GF/Canon')
| -rw-r--r-- | src/GF/Canon/CMacros.hs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/GF/Canon/CMacros.hs b/src/GF/Canon/CMacros.hs index a89d13611..609e8e869 100644 --- a/src/GF/Canon/CMacros.hs +++ b/src/GF/Canon/CMacros.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/09/16 13:56:12 $ +-- > CVS $Date: 2005/11/14 16:03:41 $ -- > CVS $Author: aarne $ --- > CVS $Revision: 1.28 $ +-- > CVS $Revision: 1.29 $ -- -- Macros for building and analysing terms in GFC concrete syntax. -- @@ -225,6 +225,15 @@ allLinValues trm = do lts <- allLinFields trm mapM (mapPairsM (return . allCaseValues)) lts +-- | to gather all linearizations, even from nested records; params ignored +allLinBranches :: Term -> [([Label],Term)] +allLinBranches trm = case trm of + R rs -> [(l:ls,u) | Ass l t <- rs, (ls,u) <- allLinBranches t] + FV ts -> concatMap allLinBranches ts + T _ ts -> concatMap allLinBranches [t | Cas _ t <- ts] + V _ ts -> concatMap allLinBranches ts + _ -> [([],trm)] + redirectIdent :: A.Ident -> CIdent -> CIdent redirectIdent n f@(CIQ _ c) = CIQ n c |
