diff options
| author | hallgren <hallgren@chalmers.se> | 2015-02-12 16:09:33 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2015-02-12 16:09:33 +0000 |
| commit | 2b8fe8ea7a4f40445889b80bd7f737d0078e7598 (patch) | |
| tree | 0ed1b5587b43da48867637bacc56c3b37fc66dad /src/runtime | |
| parent | efb1b540f43a71e33673f0f6a02fcc39e8604c74 (diff) | |
PGF.Haskell: adding operators for selections from tables
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/haskell/PGF/Haskell.hs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/runtime/haskell/PGF/Haskell.hs b/src/runtime/haskell/PGF/Haskell.hs index d77395518..81e8cffaa 100644 --- a/src/runtime/haskell/PGF/Haskell.hs +++ b/src/runtime/haskell/PGF/Haskell.hs @@ -3,6 +3,7 @@ {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-} module PGF.Haskell where import Control.Applicative((<$>),(<*>)) +import Control.Monad(join) import Data.Char(toUpper) import Data.List(isPrefixOf) import qualified Data.Map as M @@ -65,4 +66,10 @@ to_R_s r = R_s (proj_s r) infixr 5 +++ -xs +++ ys = (++) <$> xs <*> ys
\ No newline at end of file +-- | Concatenation with variants +xs +++ ys = (++) <$> xs <*> ys + +-- | Selection from tables with variants +t ! p = join (t p) +t !$ p = join (t <$> p) +t !* p = join (t <*> p) |
