
#13865: Add to Data.Proxy a utility function proxy :: a -> Proxy a -------------------------------------+------------------------------------- Reporter: louispan | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.2.1 Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Proxy Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by louispan: @@ -6,0 +6,1 @@ + {{{#!haskell @@ -8,0 +9,1 @@ + }}} New description: I sometime find myself wanting to create a Proxy of a certain type (to pass into functions that use Proxy), but I only have easy access to the value, but not the type (eg. because the type is being inferred). That is, I find myself defining the following function {{{#!haskell proxy :: a -> Proxy a proxy _ = Proxy }}} It would be great if something like that could be added to Data.Proxy -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13865#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler