ler just finds
'instance Collection T whatever' declaration. There can be only one such
instance (because of the fundep). All needed methods are specified there.
Regards
--
anatoli
__
Do You Yahoo!?
Yahoo! Auctions - Buy the th
--- Tom Pledger <[EMAIL PROTECTED]> wrote:
> anatoli writes:
> :
> | The same error message is given for
> |
> | > data Foo a = (Eq b) => MkFoo b
>
> Since the type variable a is orphaned, how about reducing it to this?
>
> > data Foo = forall
ing I
tried gives me "findquick :: Ord a => a -> Quick a -> Maybe a".
Regards
--
anatoli
__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
to
undecidable and/or overlapping instances?);
3) Allow arbitrary user-defined "fundamental" dimensions
(for things like dollars or radians) -- this may be
very tricky;
4) Allow several unit systems (such as SI and Imperial)
to coexist.
I've done most of these th
instance Half x y => Half (Succ (Succ x)) (Succ y)
sqrt :: (Half kg kg', Half m m', Half s s') =>
Dimensioned kg m s rep -> Dimensioned kg' m' s' rep
Sigh. I guess that with dependent types some things are a lot
easier.
--
anatoli (at, but not speaking for)
In similar cases I'm doing this:
> module Shapes where
> class Shape s where
> area :: s -> Double
> data Rectangle = Rectangle Double Double
> data Circle = Circle Double
> instance Shape Rectangle where
> area (Rectangle l w) = l*w
> instance Shape Circle where
> area (Circle r) = 2*
ourse pure lambda terms are not very useful Haskell types.
You may use your own types as primitive terms by defining
instances of Subst and/or Eval of them.
--
anatoli
__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http:/
[EMAIL PROTECTED] wrote (in part):
>
> anatoli wrote:
> > Attached are two interpreters: one for untyped lambda calculus,
>
> I'm afraid the attached interpreter can't be an implementation of the
> lambda calculus.
Indeed, it isn't. My bad; I shouldn
t; -- ==> "bar foo"
Naturally, such format strings cannot be pre-processed by the
compiler since they are typically loaded from some message database
at run time.
--
anatoli t.
__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experie
n use
formatDouble and whatnot, but the code looks cluttered
this way. "C" printf has many pitfalls, but I like its
terseness.
--
anatoli
__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
;
> "I have " ++ action ++ " " ++ number ++ " " ++ whatas
> where
> action = "trained"
> number = show 1
> whatas = "Jedi"
This is all fine and dandy, but how would you translate this to
42 different langu
eck it against your Haskell program using specialised tools.
But translators need to see simple readable message strings.
--
anatoli t.
__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
--- Sven Moritz Hallberg <[EMAIL PROTECTED]> wrote:
> I argue _strongly_ against associating some sort of locale state with
> handles.
>
> 1) In agreement with Ashley's statements, file IO should use octets,
> because that's what's in a file.
By the same token, we should handle CR/LF/CR-LF/LF-CR
--- Ashley Yakeley <[EMAIL PROTECTED]> wrote:
> >By the same token, we should handle CR/LF/CR-LF/LF-CR mess by hand.
> >(Files don't have lines in them, they are just sequences of octets.)
>
> Correct. Exactly what kind of newline do you want in your file?
The correct answer depends on the leve
[apologies if you see multiple copies; I forgot to Cc: the list
the first time around.]
--- Sven Moritz Hallberg <[EMAIL PROTECTED]> wrote:
> [...] I think that it's
> ugly, though, to do it somewhere outside, pretending the issue's not
> there. I value about Haskell it's clean representation of
--- Ashley Yakeley wrote:
> f a
> reduces to
> funapp f a
> reduces to
> funapp (funapp (funapp f)) a
> reduces to
> etc.
Not necessarily. If "funapp" is a new keyword,
and there's a new grammar rule along the lines of
expression :: "funapp" expression expression
then it does not reduce t
s of quotRem. Anyway, 10! can be computed much,
much faster than printed (using GHC).
So, can printing be done any faster?
I realize that the issue is mostly theoretical. No one in real
life needs to print numbers so large.
--
Anatoli Tubman <[EMAIL PROTECTED]>
othering me, and a longer
> discussion of why. Apologies if it's a rote.
>
> Where do units of measure fit into a type system?
>
--
Anatoli Tubman <[EMAIL PROTECTED]> - opinions aren't
ds x) = x
>
> newtype Prod a b = Prod Float
> newtype Quot a b = Quot Float
>
--
Anatoli Tubman <[EMAIL PROTECTED]> - opinions aren't
Charge ^ 2Mass * Length (Mass * Length ^ 3) ^ 1/2
-- = - => Charge = -
Length ^ 2Time ^2 Time
--
Anatoli Tubman <[EMAIL PROTECTED]> - opinions aren't
20 matches
Mail list logo