packages feed

parameterized-data 0.1.3 → 0.1.4

raw patch · 2 files changed

+30/−30 lines, 2 filesdep +sybdep ~basenew-uploader

Dependencies added: syb

Dependency ranges changed: base

Files

parameterized-data.cabal view
@@ -1,5 +1,5 @@ name:           parameterized-data-version:        0.1.3+version:        0.1.4 cabal-version:  >= 1.2 build-type:     Simple license:        BSD3@@ -19,16 +19,16 @@  type-level computations to implement the type parameters and emulate  dependent types. - Right now only fixed-sized vectors are provided. A tutorial on how to use them can be found at <http://www.ict.kth.se/org/ict/ecs/sam/projects/forsyde/www/files/tutorial/tutorial.html#FSVec>+ Right now only fixed-sized vectors are provided. A tutorial on how to use them can be found at <http://www.ict.kth.se/forsyde/files/tutorial/tutorial.html#FSVec>  category:       Data-tested-with:    GHC==6.8.2+tested-with:    GHC==6.10.4 extra-source-files: LICENSE,                     README  -- depends on ghc due to the use of Template Haskell Library-  build-depends:   base, type-level, template-haskell > 2.0+  build-depends:   base>=4 && <6, type-level, template-haskell > 2.0, syb   hs-source-dirs:  src   exposed-modules: Data.Param,                    Data.Param.FSVec
src/Data/Param/FSVec.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE Rank2Types, ScopedTypeVariables, PatternSignatures,+{-# LANGUAGE Rank2Types, ScopedTypeVariables,              MultiParamTypeClasses, DeriveDataTypeable,               GeneralizedNewtypeDeriving, TemplateHaskell, CPP #-} {-# OPTIONS_GHC -fno-warn-incomplete-patterns -fno-warn-name-shadowing #-}@@ -15,13 +15,13 @@ -- -- 'FSVec': Fixed sized vectors. Vectors with numerically parameterized size. ----- Tutorial: <http://www.ict.kth.se/org/ict/ecs/sam/projects/forsyde/www/files/tutorial/tutorial.html#FSVec>+-- Tutorial: <http://www.ict.kth.se/forsyde/files/tutorial/tutorial.html#FSVec> ---------------------------------------------------------------------------- module Data.Param.FSVec    (FSVec, empty, (+>), singleton, vectorCPS, vectorTH,-#if __GLASGOW_HASKELL__ >= 609-   v,-#endif+-- #if __GLASGOW_HASKELL__ >= 609+--    v,+-- #endif    unsafeVector, reallyUnsafeVector, readFSVec, readFSVecCPS, length,    genericLength, lengthT, fromVector, null, (!), replace, head, last,    init, tail, take, drop, select, group, (<+), (++), map, zipWith,@@ -43,9 +43,9 @@ import qualified Data.Traversable as DT (Traversable(traverse))  import Language.Haskell.TH import Language.Haskell.TH.Syntax (Lift(..))-#if __GLASGOW_HASKELL__ >= 609-import Language.Haskell.TH.Quote-#endif+-- #if __GLASGOW_HASKELL__ >= 609+-- import Language.Haskell.TH.Quote+-- #endif   -- | Fixed-Sized Vector data type, indexed with type-level naturals, the @@ -89,24 +89,24 @@ vectorTH xs = (vectorCPS xs) lift  #if __GLASGOW_HASKELL__ >= 609--- | Vector quasiquoter-v :: QuasiQuoter-v = undefined--- v = QuasiQuoter (fst.parseFSVecExp) parseFSVecPat---- Build a vector using quasiquotation--- Not possible in the general case! It is feasible, though, when only --- allowing monomorphic vectors. For example, in the case of Ints:--- parseFSVecExp :: String -> ExpQ--- parseFSVecExp str = (readFSVec str) (lift :: Nat s => FSVec s Int -> ExpQ)-parseFSVecExp :: forall a . String -> (ExpQ, a)-parseFSVecExp str = ((readFSVec str) (lift :: (Nat s, Lift a) => FSVec s a -> ExpQ), undefined)  ---- Pattern match a vector using quasiquotation-parseFSVecPat :: String -> PatQ-parseFSVecPat = error "Data.Param.FSVec: quasiquoting paterns not supported"---- __GLASGOW_HASKELL__+-- -- | Vector quasiquoter+-- v :: QuasiQuoter+-- v = undefined+-- -- v = QuasiQuoter (fst.parseFSVecExp) parseFSVecPat+-- +-- -- Build a vector using quasiquotation+-- -- Not possible in the general case! It is feasible, though, when only +-- -- allowing monomorphic vectors. For example, in the case of Ints:+-- -- parseFSVecExp :: String -> ExpQ+-- -- parseFSVecExp str = (readFSVec str) (lift :: Nat s => FSVec s Int -> ExpQ)+-- parseFSVecExp :: forall a . String -> (ExpQ, a)+-- parseFSVecExp str = ((readFSVec str) (lift :: (Nat s, Lift a) => FSVec s a -> ExpQ), undefined)  +-- +-- -- Pattern match a vector using quasiquotation+-- parseFSVecPat :: String -> PatQ+-- parseFSVecPat = error "Data.Param.FSVec: quasiquoting paterns not supported"+-- +-- -- __GLASGOW_HASKELL__ #endif   -- | Build a vector from a list (unsafe version: The static/dynamic size of