I've occasionally wanted some sort of equivalent of an instanceOf function
in haskell, i.e. one that would let me define a function that could
dispatch on the type of its argument as well as the value. One option
I've seen for this is
"http://okmij.org/ftp/Haskell/class-based-dispatch.lhs";, but t
see the GHC library Text.Show.Functions for some insight.rui yang <[EMAIL PROTECTED]> wrote:
I want to print a function which itself have some functions as it's parameters and will return some functions as the results, and I want to print out the result, does anyone knows how to define the instance
[We apologize if you receive multiple copies of this announcement.]
MPC 2004
7th International Conference on
MATHEMATICS OF PROGRAM CONSTRUCTION
---
http
(*
This field has meanwhile seen a number of contributions from the
functional programming community.
So it is fair to assume that the present announcement is of interest
for some subscribers of this list.
*)
FOAL: Foundations of Aspect-Oriented Languages
A one day workshop affiliated w
(*
This field has meanwhile seen a number of contributions from the
functional programming community. So it is fair to assume that
the present announcement is of interest for some subscribers of
this list.
*)
FOAL: Foundations of Aspect-Oriented Languages
A one day workshop affil
(*
This field has meanwhile seen a number of contributions from the
functional programming community. So it is fair to assume that
the present announcement is of interest for subscribers of this list.
*)
FOAL: Foundations of Aspect-Oriented Languages
A one day workshop affiliated with AO
Hi,
if I try to supply a signatur for the local function "showsl" below,
then ghc rejects a constraint (Show a) whereas hugs (and nhc98) needs
this constraint.
What should be the correct notation? (apart from omitting any signature)
Cheers Christian
(BTW, I would appreciate if the (instantiat
I've just noticed that I used ghc with -fglasgow-exts.
Without extensions hugs, ghc und nhc98 consistently need the constraint
in the type signature (below)
showsl :: Show a => List a -> ShowS
Switching the extensions on, breaks this code, however (ghc only).
Christian
I wrote:
Hi,
if I tr
On Wed, 03 Dec 2003 15:10:07 -0500
"Abraham Egnor" <[EMAIL PROTECTED]> wrote:
> I've occasionally wanted some sort of equivalent of an instanceOf
> function in haskell, i.e. one that would let me define a function that
> could dispatch on the type of its argument as well as the value. One
> optio
Abe writes:
> The thought occurred to me that it is (intuitively) natural to do this via
> extending the pattern-matching facility to include types as well as
> literal values, i.e. something like:
>
> f :: a -> String
> f (a :: Int) = "got an int, incremented: "++(show (a+1))
> f (a :: Show q =>
10 matches
Mail list logo