packages feed

HList 0.3.0.1 → 0.3.1.0

raw patch · 12 files changed

+14/−101 lines, 12 filesdep ~base

Dependency ranges changed: base

Files

ChangeLog view
@@ -1,3 +1,7 @@+29 Jan 2014+	Release 0.3.1.1+	Work with newer GHC.TypeLits (SingI and similar were moved out)+ 05 Nov 2013 	Release 0.3.0.1 	fix `cabal test'
Data/HList/Data.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP #-}+{-# LANGUAGE CPP, DeriveDataTypeable #-}  {- | 'Data.Data.Data' instances for 'HListFlat' and 'Record' which pretend to be flat data structures. The @Data@ instance for 'HList' gives a nested
Data/HList/Label6.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {- |    Description : labels using promoted strings (Symbol) @@ -20,6 +21,11 @@ import Data.HList.FakePrelude import GHC.TypeLits +#if MIN_VERSION_base(4,7,0)+instance KnownSymbol x => ShowLabel (x :: Symbol) where+  showLabel _ =  symbolVal (proxy :: Proxy x)++#else instance SingI x => ShowLabel (x :: Symbol) where   showLabel _ =  fromSing (sing :: Sing x)-+#endif
− Data/HList/obsolete/TIC.hs
@@ -1,69 +0,0 @@-{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}--{- |-   The HList library--   (C) 2004, Oleg Kiselyov, Ralf Laemmel, Keean Schupke--   Type-indexed co-products.--   (There are other ways: see ConsUnion.hs, for example)--}--module Data.HList.TIC where--import Data.Dynamic--import Data.HList.HList-import Data.HList.FakePrelude-import Data.HList.HOccurs-import Data.HList.TIP----- ----------------------------------------------------------------------------- | A datatype for type-indexed co-products--newtype TIC l = TIC Dynamic----- ----------------------------------------------------------------------------- | Public constructor--mkTIC :: ( HTypeIndexed l-         , HTypeProxied l-         , HOccurs' (Proxy i) l-         , Typeable i-         )-      => i -> TIC l--mkTIC i = TIC (toDyn i)----- ----------------------------------------------------------------------------- | Public destructor--unTIC :: ( HTypeIndexed l-         , HTypeProxied l-         , HOccurs' (Proxy o) l-         , Typeable o-         )-      => TIC l -> Maybe o--unTIC (TIC i) = fromDynamic i----- ----------------------------------------------------------------------------- | A type-indexed type sequence that is a sequence of proxy types--class HTypeProxied l-instance HTypeProxied 'HNil-instance HTypeProxied l => HTypeProxied ('HCons (Proxy e) l)----- ----------------------------------------------------------------------------- | TICs are opaque--instance Show (TIC l)- where-  show _ = "<Cannot show TIC content!>"-
HList.cabal view
@@ -1,5 +1,5 @@ Name:                HList-Version:             0.3.0.1+Version:             0.3.1.0 Category:            Data Synopsis:            Heterogeneous lists Description:         HList is a record system providing strongly typed heterogenous lists, records,@@ -27,12 +27,9 @@                      examples/*.out,                       examples/broken/*.ref,-                     examples/broken/*.out,                       Data/HList/broken/*.hs,-                     Data/HList/obsolete/*.hs,--                     examples/Main.in+                     Data/HList/obsolete/*.hs  Source-Repository head     type: darcs
− examples/Main.in
@@ -1,1 +0,0 @@-main
− examples/broken/MainGhcGeneric3.out
− examples/broken/MainGhcTTypeable.out
− examples/broken/TypeEqBoolTTypeable.out
− examples/broken/TypeEqExplosive.out
− examples/broken/TypeEqTTypeable.out
− examples/labelable2.hs
@@ -1,24 +0,0 @@-{-# LANGUAGE FlexibleContexts, TemplateHaskell, DataKinds, PolyKinds #-}-{- | Demonstrates @hLens'@--may be worthwhile to have a lens-free test suite, doing stuff like:--> case x (Identity  . (++"there")) r of Identity t -> t---}-module Main where-import Data.HList.CommonMain-import Control.Lens--makeLabelable "x y"--r = x .==. "hi" .*.-    y .==. (y .==. 321 .*. x .==. 123 .*. emptyRecord) .*.-    emptyRecord--main = do-    print (r ^. x)-    print (r & x .~ ())--    print (r ^. y . y)-    print (r & y . y .~ "xy")