./devel/hs-some, Existential type: Some

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 1.0.6nb1, Package name: hs-some-1.0.6nb1, Maintainer: pkgsrc-users

This library defines an existential type Some.

data Some f where
Some :: f a -> Some f

in few variants, and utilities to work with it.

If you are unsure which variant to use, use the one in Data.Some module.


Master sites:

Filesize: 11.127 KB

Version history: (Expand)


CVS history: (Expand)


   2023-11-02 07:37:49 by Masatake Daimon | Files touched by this commit (1141)
Log message:
Revbump all Haskell after updating lang/ghc96
   2023-10-25 15:52:16 by Masatake Daimon | Files touched by this commit (4)
Log message:
devel/hs-some: Update to 1.0.6

1.0.6
* Add instances for SSymbol, SNat and SChar from `base >=4.18.0.0'

1.0.5
* Add EqP and OrdP classes. These are strong versions of Eq1 and Ord1, and
  on the other hand weaker versions of GEq and GCompare. They are exactly
  what's needed for Eq and Ord instances of Some.

  The naming is unfortunate: GShow would be better named ShowP, as it's
  similar version of Show1.

  Note: we could add ReadP with readsPrecP :: Int -> ReadS (t a) method,
  but it will barely have any instances. GRead is different, as it can
  reify the type index for many types, e.g. for the singletons.

  In some future there will be major version of some with following
  breaking changes:
  - EqP and OrdP will become superclasses of GEq and GCompare
  - Eq (Some t) will require EqP t, similarly for Ord and OrdP.
  - GShow will get forall a. Show (f a) superclass. (This will cause
    removal of Product and Sum instances for base <4.18).

  To ease future transition you may
  - Define EqP and OrdP instances for your types. The defaultEq and
    defaultCompare methods can be used to define eqp and comparep from GEq
    and GCompare instances respectively.
  - Move to use GHC.Generics.:*: and :+: instead of Data.Functor.Product
    and Sum, as these have better Eq and Ord instances.
   2023-10-09 06:55:01 by Masatake Daimon | Files touched by this commit (988)
Log message:
Bump Haskell packages after updating lang/ghc94
   2023-01-24 19:34:14 by Masatake Daimon | Files touched by this commit (5)
Log message:
devel/hs-some: Update to 1.0.4.1

1.0.4.1
* Drop support for GHC before 8.6

1.0.4
* Add instances for (:~~:)
* Add instances for :+: and :*:
* Add defaultGeq :: GCompare f => f a -> f b -> Maybe (a :~: b)
* Add defaultGshowsPrec :: Show (t a) => Int -> t a -> ShowS
   2022-02-26 04:58:36 by Masatake Daimon | Files touched by this commit (872)
Log message:
Bump all Haskell packages after enabling "split sections" in mk/haskell.mk
   2022-02-16 06:04:23 by Masatake Daimon | Files touched by this commit (6)
Log message:
devel/hs-some: import hs-some-1.0.3

This library defines an existential type Some.

data Some f where
    Some :: f a -> Some f

in few variants, and utilities to work with it.

If you are unsure which variant to use, use the one in Data.Some module.