[Haskell-cafe] Partial Signatures with Implicit Parameters

Brandon S Allbery KF8NH allbery at ece.cmu.edu
Mon Aug 30 11:21:20 EDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 8/30/10 09:21 , Alex Rozenshteyn wrote:
> I would like to specify that a function takes implicit parameters, without
> specifying its full return type.  My main motivation for this is my xmonad
> config file and the attempt to remove the need for NoMonomorphismRestriction
> and some of the code smell associated with global variables that wafts in
> with implicit parameters.
> 
> I have read this: http://okmij.org/ftp/Haskell/partial-signatures.lhs and
> even somewhat understood it; however, I tried to apply it to my config file
> with an implicit parameter in the signature, and I couldn't get it to compile.
> 
> Is there something inherently different about using this approach with
> implicit parameters, or am I probably just doing something wrong?

Example code (that is, the code you're trying to modify with an implicit
parameter) would be useful.  I'm not sure implicit parameters would work
with that example anyway, as they aren't Haskell '98 and can't be emulated
in Haskell '98 (at least, not that way).

- -- 
brandon s. allbery     [linux,solaris,freebsd,perl]      allbery at kf8nh.com
system administrator  [openafs,heimdal,too many hats]  allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university      KF8NH
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx7zHAACgkQIn7hlCsL25UZCACg0OILDSnwXceO+gctbFwAcG5a
zs4An0YZLmKDDt67xGzeWK2fNWLGZyiC
=hwND
-----END PGP SIGNATURE-----


More information about the Haskell-Cafe mailing list