narc 0.1.1 → 0.1.2
raw patch · 2 files changed
+8/−6 lines, 2 filesdep ~base
Dependency ranges changed: base
Files
- Database/Narc.hs +6/−4
- narc.cabal +2/−2
Database/Narc.hs view
@@ -17,7 +17,7 @@ -- * Translation to an SQL representation narcToSQL, narcToSQLString, -- * The language itself- unit, table, cnst, primApp, abs, app, ifthenelse, singleton,+ unit, table, cnst, Constable, primApp, abs, app, ifthenelse, singleton, nil, union, record, project, foreach, having, Type(..) ) where@@ -93,9 +93,11 @@ unit = return $ (!) Unit -- | A polymorphic way of embedding constants into a term.-class Const' a where cnst :: a -> NarcTerm-instance Const' Bool where cnst b = return ((!)(Bool b))-instance Const' Integer where cnst n = return ((!)(Num n))+class Constable a where+ -- | Lift a constant value into a query.+ cnst :: a -> NarcTerm+instance Constable Bool where cnst b = return ((!)(Bool b))+instance Constable Integer where cnst n = return ((!)(Num n)) -- | Apply some primitive function, such as @(+)@ or @avg@, to a list -- of arguments.
narc.cabal view
@@ -7,7 +7,7 @@ -- The package version. See the Haskell package versioning policy -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for -- standards guiding when and how versions should be incremented.-Version: 0.1.1+Version: 0.1.2 -- A short (one-line) description of the package. Synopsis: Query SQL databases using Nested Relational Calculus embedded in Haskell.@@ -66,7 +66,7 @@ Exposed-modules: Database.Narc, Database.Narc.SQL, Database.Narc.Test, Database.Narc.Type, Database.Narc.HDBC -- Packages needed in order to build this package.- Build-depends: base >=4 && < 4, HUnit, QuickCheck, mtl, random, HDBC+ Build-depends: base >=4 && < 5, HUnit, QuickCheck, mtl, random, HDBC -- Modules not exported by this package. Other-modules: Gensym, QCUtils, Database.Narc.TermGen, Database.Narc.Var, Database.Narc.Contract, Database.Narc.Debug, Database.Narc.TypeInfer, Database.Narc.Util, Database.Narc.AST.Pretty, Database.Narc.Failure.QuickCheck, Database.Narc.Rewrite, Database.Narc.AST, Database.Narc.Common, Database.Narc.Compile, Database.Narc.Eval, Database.Narc.Failure, Database.Narc.Pretty, Database.Narc.SQL.Pretty