parameterized-utils-1.0.0: Classes and data structures for working with data-kind indexed types

Copyright(c) Galois Inc 2014
MaintainerJoe Hendrix <jhendrix@galois.com>
Safe HaskellSafe
LanguageHaskell98

Data.Parameterized.Some

Description

This module provides Some, a GADT that hides a type parameter.

Synopsis

Documentation

data Some (f :: k -> *) Source #

Constructors

Some (f x) 

Instances

TestEquality k f => Eq (Some k f) Source # 

Methods

(==) :: Some k f -> Some k f -> Bool #

(/=) :: Some k f -> Some k f -> Bool #

OrdF k f => Ord (Some k f) Source # 

Methods

compare :: Some k f -> Some k f -> Ordering #

(<) :: Some k f -> Some k f -> Bool #

(<=) :: Some k f -> Some k f -> Bool #

(>) :: Some k f -> Some k f -> Bool #

(>=) :: Some k f -> Some k f -> Bool #

max :: Some k f -> Some k f -> Some k f #

min :: Some k f -> Some k f -> Some k f #

ShowF k f => Show (Some k f) Source # 

Methods

showsPrec :: Int -> Some k f -> ShowS #

show :: Some k f -> String #

showList :: [Some k f] -> ShowS #

HashableF k f => Hashable (Some k f) Source # 

Methods

hashWithSalt :: Int -> Some k f -> Int #

hash :: Some k f -> Int #

viewSome :: (forall tp. f tp -> r) -> Some f -> r Source #

Project out of Some.

mapSome :: (forall tp. f tp -> g tp) -> Some f -> Some g Source #

Apply function to inner value.

traverseSome :: Functor m => (forall tp. f tp -> m (g tp)) -> Some f -> m (Some g) Source #

Modify the inner value.

traverseSome_ :: Functor m => (forall tp. f tp -> m ()) -> Some f -> m () Source #

Modify the inner value.