Re: Fundeps and quantified constructors

2001-02-07 Thread anatoli
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

Re: Fundeps and quantified constructors

2001-02-08 Thread anatoli
--- 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

Contexts for data constructors.

2001-02-11 Thread anatoli
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/

Dimensional analysis with fundeps

2001-04-09 Thread anatoli
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

RE: Dimensional analysis with fundeps

2001-04-11 Thread anatoli
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)

Re: class parameters to existential datatypes

2001-12-07 Thread anatoli
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*

Re: Lambda over types.

2002-03-21 Thread anatoli
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:/

Re: Lambda over types.

2002-04-01 Thread anatoli
[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&#x

Re: preprocessing printf/regex strings (like ocaml)

2002-05-13 Thread anatoli
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

Re: preprocessing printf/regex strings (like ocaml)

2002-05-14 Thread anatoli
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

Re: preprocessing printf/regex strings (like ocaml)

2002-05-14 Thread anatoli
; > "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

Re: preprocessing printf/regex strings (like ocaml)

2002-05-14 Thread anatoli
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

Re: UTF-8 library

2002-08-10 Thread anatoli
--- 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

Re: UTF-8 library

2002-08-10 Thread anatoli
--- 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

Re: UTF-8 library

2002-08-10 Thread anatoli
[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

Re: class Function ?

2002-10-29 Thread anatoli
--- 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

No Subject

1999-06-07 Thread Anatoli Tubman
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]>

Re: Units of measure

1999-08-26 Thread Anatoli Tubman
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

Re: Units of measure

1999-08-26 Thread Anatoli Tubman
ds x) = x > > newtype Prod a b = Prod Float > newtype Quot a b = Quot Float > -- Anatoli Tubman <[EMAIL PROTECTED]> - opinions aren't

Re: Units of measure

1999-08-30 Thread Anatoli Tubman
Charge ^ 2Mass * Length (Mass * Length ^ 3) ^ 1/2 -- = - => Charge = - Length ^ 2Time ^2 Time -- Anatoli Tubman <[EMAIL PROTECTED]> - opinions aren't