On 28 August 2016 at 22:40, wrote:
> This is Leksah http://leksah.org/
> Please excuse my false name for it
> And the Question is why can I install it.
What error messages do you have when you try?
From here, this is what you need to do:
https://github.com/leksah/leksah/wiki/download
This is Leksah http://leksah.org/
Please excuse my false name for it
And the Question is why can I install it.
excuse me.
Mungo1981
Gesendet: Sonntag, 28. August 2016 um 13:49 Uhr
Von: "Ivan Lazar Miljenovic"
An: cc...@web.de
Cc: "Haskell List"
Betreff: Re: [
On 28 August 2016 at 20:43, wrote:
> Ok Haskell is good.
> Ok Laska is great.
> And my Ubuntu Studio ist rubish
> So I try to install Laska on Ubuntu Studio
> But when I do this, i will get a long list of dependecies
> which could not reallise
> So I not know what should
Ok Haskell is good.
Ok Laska is great.
And my Ubuntu Studio ist rubish
So I try to install Laska on Ubuntu Studio
But when I do this, i will get a long list of dependecies
which could not reallise
So I not know what should I do
Mungo1981
___
Has
a c) = 1 + numLeaves c
numLeaves (Node b a EmptyBST) = 1 + numLeaves c
numLeaves (Node b a c) = numLeaves b + numLeaves c
By the way, you might want to think about the following question: Is it
really necessary to handle empty trees in the case for non-empty trees,
or can the recu
Wow, this was a fast reply :-) Thank you Mihai! This works.
--
View this message in context:
http://haskell.1045720.n5.nabble.com/Beginner-Binary-Search-Tree-Question-tp3382548p3382554.html
Sent from the Haskell - Haskell mailing list archive at Nabble.com
Wow, this was a fast reply :-) Thank you Mihai! This works.
On 12 February 2011 10:45, Mihai Maruseac wrote:
> On Sat, Feb 12, 2011 at 12:39 PM, htc2011 wrote:
> >
> > Hi All,
> >
> > I am learning Haskell and can't understand the following problem. Maybe
> > somebody could advise me on a solut
On Sat, Feb 12, 2011 at 12:39 PM, htc2011 wrote:
>
> Hi All,
>
> I am learning Haskell and can't understand the following problem. Maybe
> somebody could advise me on a solution?
>
> Using GHCI, I have the following definition of a BST:
> data Ord a => BST a = EmptyBST | Node ( BST a ) a ( BST a )
.nabble.com/Beginner-Binary-Search-Tree-Question-tp3382548p3382548.html
Sent from the Haskell - Haskell mailing list archive at Nabble.com.
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 2/2/11 22:01 , Ramy Abdel-Azim wrote:
> No need to apologize. Not dumb of you. The mandatory else is unusual. I
> don't personally know of any other language that requires an else for every
> if.
Haskell's if is an expression, best compared to the
Can I suggest you take this discussion to either the haskell-beginners list, or haskell-cafe?This list (haskell@haskell.org) is intended primarily for announcements.Regards,
MalcolmOn 03 Feb, 2011,at 09:33 AM, Matthias Görgens wrote:> uptable::[[Char]]->[([Char],Int,Int,Int,Int)]->[([Char],Int
> uptable::[[Char]]->[([Char],Int,Int,Int,Int)]->[([Char],Int,Int,Int,Int)]
> uptable (xf:xs) main_array = map (\(x,y,z,r,t)-> do if x==xf then tupup x y
> z r t second xs ) main_array
Why do you have a `do' in that snippet?
___
Haskell mailing list
Has
On Wed, Feb 02, 2011 at 10:01:08PM -0500, Ramy Abdel-Azim wrote:
> No need to apologize. Not dumb of you. The mandatory else is unusual. I
> don't personally know of any other language that requires an else for every
> if.
Indeed. Haskell's if ... then ... else ... is akin to C's ... ? ... :
...
thanks,
> Navin
> --
> *From:* Ramy Abdel-Azim
> *To:* Navin Rustagi
> *Cc:* Haskell@haskell.org
> *Sent:* Wed, February 2, 2011 7:55:09 PM
> *Subject:* Re: [Haskell] a quick question
>
> Missing else?
>
> On Wed, Feb 2, 2011 at 8:49 PM, Navin Rustagi w
Sorry, dumb of me doesn't give this error anymore.
thanks,
Navin
From: Ramy Abdel-Azim
To: Navin Rustagi
Cc: Haskell@haskell.org
Sent: Wed, February 2, 2011 7:55:09 PM
Subject: Re: [Haskell] a quick question
Missing else?
On Wed, Feb 2, 2011 at 8:
Missing else?
On Wed, Feb 2, 2011 at 8:49 PM, Navin Rustagi wrote:
> Hi all,
>
> I am stuck at a piece of code and am not able to figure out the error.
>
>
> uptable::[[Char]]->[([Char],Int,Int,Int,Int)]->[([Char],Int,Int,Int,Int)]
> uptable (xf:xs) main_array = map (\(x,y,z,r,t)-> do if x==xf t
Hi all,
I am stuck at a piece of code and am not able to figure out the error.
uptable::[[Char]]->[([Char],Int,Int,Int,Int)]->[([Char],Int,Int,Int,Int)]
uptable (xf:xs) main_array = map (\(x,y,z,r,t)-> do if x==xf then tupup x y z r
t second xs ) main_array
here tupup and second are functi
Richard sent me a note offlist which quickly cleared up my
misconception. I was mistaken that table could contain n^2 elements.
A closer reading of the definition of table makes it clear that it
will have n elements, so the n log n bound makes perfect sense to me
now.
Thanks!
--Mark
P.S. I hig
I'm currently reading the excellent Haskell-based book "Pearls of
Functional Algorithm Design". I have a question about Chapter 2, the
"surpassing problem".
According to the book, "since join takes linear time, table is
computer in O(n log n) steps".
Howeve
It is not repeated because fiblist is pure and has no arguments. Otherwise
it would be repeated.
2010/8/14 Tako Schotanus
> I was reading this article:
>
> http://scienceblogs.com/goodmath/2009/11/writing_basic_functions_in_has.php
>
> And came to the part where it shows:
>
>
> > fiblist = 0 :
On 12 April 2010 10:39, Mark Snyder wrote:
> I'm wondering what the correct terminology is for the extra functions
> that we define with monads. For instance, State has get and put, Reader has
> ask and local, etc. Is there a good name for these? I've been calling them
> the "non-proper mor
I think these names are specific to each data type (which happens to be
a monad) so unless they generalise, then they are not deserving of any
special terminology than any other functions.
While State and Reader are both Monads, they are also many other things
such as Functor and Applicative (and
Hello,
I'm wondering what the correct terminology is for the extra functions that
we define with monads. For instance, State has get and put, Reader has ask and
local, etc. Is there a good name for these? I've been calling them the
"non-proper morphisms" (as opposed to the "proper" morph
Stephan Friedrichs wrote:
class ArrElem Int where -- sic!
-- ...
My question is: Is "class ArrElem Int" a typo and should be "instance
ArrElem Int" or did I get something wrong?
Yes, that's a typo. Thanks fo
s an important source of
> my seminar handout about skeletons and parallelisation. It contains code
> samples concerning the ArrElem type family:
>
> class ArrElem e where
>data [:e:]
>(!:) :: [:e:] -> Int -> e
>
> and various instance declarations, e.g.:
erning the ArrElem type family:
class ArrElem e where
data [:e:]
(!:) :: [:e:] -> Int -> e
and various instance declarations, e.g.:
class ArrElem Int where -- sic!
-- ...
My question is: Is "class ArrElem Int" a typo and should be "instance
ArrElem In
On Mon, Oct 15, 2007 at 10:34:37PM +0300, Iavor Diatchki wrote:
> I like the Hugs behavior because it accepts more programs. OTOH,
> GHC's behavior may be a bit simpler to explain and implement(?). Any
> thoughts?
Currently, the class and datatype namespaces are considered the same by
the stand
Hello,
On 10/16/07, Simon Peyton-Jones <[EMAIL PROTECTED]> wrote:
> The H98 report is pretty clear about there being a single name space for type
> constructors and classes. Yes, in certain circumstances it's unambiguous.
> In Hugs, can you write
> module M where
> class C a
ich is also unambiguous.
I'm inclined to stick to the H98 story.
Simon
| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Iavor Diatchki
| Sent: 15 October 2007 20:35
| To: haskell@haskell.org
| Subject: [Haskell] Module system question
|
| Hello,
|
| I
Hello,
I have a question concerning Haskell's module system.
Consider the following example which defines three modules A,B, and C:
> module A where { data X = X }
> module B where { class X a }
> module C where { import A; import B; data Y = Y X }
The question is: "Is there
> If so, try working around the monomorphism restriction by changing
> from a pattern binding to a function binding.
>
> fold f = foldRegsUsed f
Brilliant. I hadn't known about the monomorphism restriction.
Now I know it's a 'necessary evil'. Thanks!
Norman
Ashley Yakeley wrote:
If I have a thread that's blocked on an STM retry or TChan read, and
none of its TVars are referenced elsewhere, will it get stopped and
garbage-collected?
I have in mind a pump thread that eternally reads off a TChan and pushes
the result to some function. If the TChan
d by top-level-or-not, see
sections 4.5.1 and 4.5.5 in the Haskell 98 Language and Libraries
Report.
Stefan
Aargh! Sorry, I'm having a Bad Details Day. 3 in 1 message:
- Overlooking the "to make the code work, I had to expand 'fold'
into 'foldRegsUsed' every
On Mon, Sep 17, 2007 at 04:15:10PM +1200, Tom Pledger wrote:
> Norman Ramsey wrote:
> :
> | This code fails to compile because the compiler is willing to
> | use 'fold' at only one type (CmmExpr as it happens)
> :
>
> When it failed to compile, was
>
> fold = foldRegsUsed
>
> a top-level de
Norman Ramsey wrote:
:
| This code fails to compile because the compiler is willing to
| use 'fold' at only one type (CmmExpr as it happens)
:
When it failed to compile, was
fold = foldRegsUsed
a top-level declaration in the module, rather than local to foldRegsUsed?
If so, try working
Dear Haskellers,
I've had a Haskell program rejected for reasons I don't understand.
Here's the relevant bit of code; the problem is that I expected the
type-inference engine to generalize the abbreviation 'fold' to an
overloaded function, but it doesn't---to make the code work, I had to
expand 'f
If I have a thread that's blocked on an STM retry or TChan read, and
none of its TVars are referenced elsewhere, will it get stopped and
garbage-collected?
I have in mind a pump thread that eternally reads off a TChan and pushes
the result to some function. If the TChan is forgotten elsewhere,
Also note that this will install ghc into the underlying unix
environment. If you want a pretty GUI, I don't know of any for Mac OS
X. A quick search on google for "mac haskell ide" brings up
http://www.hoovy.org/HaskellXcodePlugin/ -- this might help you.
I will note that if you are developing a
You need to install Xcode (from your Mac OS disk) before you can use ghc.
On 5/20/07, Wolfgang De Meuter <[EMAIL PROTECTED]> wrote:
Exactly what I mean. When you download and unpack the file you get a
unix folder with install stuff. After trying to follow the
installation instructions, it compla
Exactly what I mean. When you download and unpack the file you get a
unix folder with install stuff. After trying to follow the
installation instructions, it complains that I don't have a gcc on my
machine...
Wolf
On 20-mei-07, at 22:41, Tom Harper wrote:
http://haskell.org/ghc/download_
http://haskell.org/ghc/download_ghc_661.html#macosxppc
On 5/20/07, Wolfgang De Meuter <[EMAIL PROTECTED]> wrote:
Dear all,
I used to be a Gofer freak on my Mac back in the mid-nineties.
Recently I have regained interest in FP and I'm trying to get hold of
an implementation of Haskell on my G4.
Dear all,
I used to be a Gofer freak on my Mac back in the mid-nineties.
Recently I have regained interest in FP and I'm trying to get hold of
an implementation of Haskell on my G4. I must say that this hunt has
been quite frustrating until now. I don't know unix and I'm unwilling
to lear
Haskellians,
In the attached file i have implemented the bare bones core of the syntax --
pre structural equivalence -- of Milner's presentation of \pi via
abstractions and concretions. (There's a minor twist in that the notion of
location affords more structure than in Milner's original presenta
Hi,
I've been told the following short code is correct but it's GHC's
fault it does not type check.
Is that the case?
--
{-# OPTIONS -fglasgow-exts #-}
-- An expression GADT:
data Exp :: * -> * where
LitNum :: Num a => a -> Exp a
LitBool :: Bool -> Exp Bool
Plus :: Num a => Exp a ->
Sascha Böhme wrote:
Hello,
referring to the Haskell 98 report as available in the Internet, I
have a short question. Section 4.1.3 (Syntax of Class Assertions
and Contexts) contains the rule:
class -> qtycls tyvar
| qtycls ( tyvar atype1 ... atypen ) (n>=1)
Is there a (
On Wed, Jan 10, 2007 at 03:33:44PM +0100, "Sascha B?hme" wrote:
> Hello,
>
> referring to the Haskell 98 report as available in the Internet, I have a
> short question. Section 4.1.3 (Syntax of Class Assertions and Contexts)
> contains the rule:
>
> class -&
Hello,
referring to the Haskell 98 report as available in the Internet, I have a short
question. Section 4.1.3 (Syntax of Class Assertions and Contexts) contains the
rule:
class -> qtycls tyvar
| qtycls ( tyvar atype1 ... atypen ) (n>=1)
Is there a (simple) practical exampl
On Jan 7, 2007, at 14:30 , Dominic Steinitz wrote:
Data/Digest/SHA1.hs:36:17:
Could not find module `Data.ByteString':
it was found in multiple packages: fps-0.8 base
What's the story with fast packed strings these days?
Is it now part of base and I shouldn't have installed it? If not
After a lay off from Haskell for a few months and preparatory to Hac 07,
I thought I had better check my laptop was appropriately set up.
However, I encountered the following:
C:\Documents and Settings\Owner\crypto>Setup build
Preprocessing library Crypto-3.1.0...
Preprocessing executables for
> The analogous declaration in *Standard* ML, which gets this right, is
>
> fun 'a foo (x:'a) y = (x + 1, (y:'a))
Following up my own post, I thought it might be kind to explain the
arcana of the SML syntax. The explicit 'a between 'fun' and 'foo' is
SML syntax for an explicit type-lambda (
> Regarding the quantification: in ML (OCaml) we can write
> let foo (x:'a) y = (x+1,(y:'a))
> That does not mean that foo has the type forall 'a. 'a -> 'a -> ...
Type annotations in OCaml are completely broken and always have been.
They use 'unifies with' instead of 'is an instance of' an
[EMAIL PROTECTED] wrote:
>
> I'm afraid I may disagree about the quantification. Also, I'm cautious
> about the phrase "ML and Haskell". In GHC 6.4, local type variables
> behave pretty much like those in ML (actually, GHC 6.2 was closer). In
> GHC 6.6, the behavior is completely different!
>
> Reg
> > Or, one may use the local type variable to the same end
> >
> > > compile1 :: forall b t box. (Builder b box) => t -> Name -> Ir.ANF -> b
> > > t compile1 f x body = do env <- compile body empty
> > > wire ((Arg W)::Source box) (env x)
> > >
> Norman Ramsey wrote:
>
> > compile1 :: (Builder b box) => t -> Name -> Ir.ANF -> b t
> > compile1 f x body = do env <- compile body empty
> > wire (Arg W) (env x)
> > return f
> > class (Monad b) => Builder b box where
> > wire
Norman Ramsey wrote:
> compile1 :: (Builder b box) => t -> Name -> Ir.ANF -> b t
> compile1 f x body = do env <- compile body empty
> wire (Arg W) (env x)
> return f
> class (Monad b) => Builder b box where
> wire:: Source bo
Without going too deep into the details of my type classes, I have
written the following code (focusing on compile1):
{-# OPTIONS -fglasgow-exts #-}
compile1 :: (Builder b box) => t -> Name -> Ir.ANF -> b t
compile1 f x body = do env <- compile body empty
wire (Arg
[ duh, hit send by mistake, message continues... ]
Chris Kuklewicz wrote:
> forkInheritIO :: IO () -> IO ThreadId -- inherits parent's
> block or unblock status
>
> forkBlockedIO :: IO () -> IO ThreadId -- starts the action in
> "block" mode. Must manually "unblock"
>
Either of these is certain
Chris Kuklewicz wrote:
> forkInheritIO :: IO () -> IO ThreadId -- inherits parent's
> block or unblock status
>
> forkBlockedIO :: IO () -> IO ThreadId -- starts the action in
> "block" mode. Must manually "unblock"
>
Either of these is certainly possible, and I agree that forkBlockedIO is more
Hi,
Thanks for the reply. I have my own proposal below:
Simon Marlow wrote:
> Chris Kuklewicz wrote:
>> In response to question by Cat Dancer <[EMAIL PROTECTED]> I wrote a few
>> tests of
>> sending asynchronous signal to a thread using GHC 6.6
>>
>>
Chris Kuklewicz wrote:
In response to question by Cat Dancer <[EMAIL PROTECTED]> I wrote a few tests of
sending asynchronous signal to a thread using GHC 6.6
The goal was to run a child thread via forkIO and use handle or finally to
respond
to the thread's demise.
Unfortunately, it
In response to question by Cat Dancer <[EMAIL PROTECTED]> I wrote a few tests of
sending asynchronous signal to a thread using GHC 6.6
The goal was to run a child thread via forkIO and use handle or finally to
respond
to the thread's demise.
Unfortunately, it seems that there is an
Cyril Schmidt wrote:
> Working on a Monte-Carlo simulation where I have to
> calculate the values of a certain function on the given set of inputs,
> I noticed that some of the input variables change for every iteration,
> while others do not.
>
> To give a simple example, let's suppose I have a f
.
>>results = map (runReader reader) [ Inner { p1 = x } | x <- [0..9] ]
>>putStrLn $ "a1 = "++show a1++", a2= "++show a2++", results = "
>> ++show results
>
>
> However similar they look, f and f' have ver
Lajos,
Point taken, thanks.
My question, though, is not as much about how I speed up my program,
as it is about the behaviour of the ReaderT monad transformer. There
is something I do not understand about it, namely, why does such a
small change in the code change the behaviour so much.
Regards
lc is
invoked 40 times,
which means that all the benefits of pre-calculating (a1*a2) are gone. (In
the real application, I pre-calculate a much more complicated and
expensive expression, that's why it matters).
I am curious why this happens. As far as I can see, the lift function of
ReaderT is the sa
On Tue, Feb 21, 2006 at 11:04:40PM +, Simon Marlow wrote:
> Your drop__ reminds me of GHC's touch#, which is like drop__ in the IO
> monad. We use it to control lifetimes, eg. inside withForeignPtr. You
> could implement drop in terms of touch#:
>
>drop__ a b = case touch# a realworld#
John Meacham wrote:
On Tue, Feb 21, 2006 at 10:15:59AM +, Malcolm Wallace wrote:
John Meacham <[EMAIL PROTECTED]> wrote:
I generalized this primitive to
drop__ :: a -> b -> b
Also known in the Prelude as "const"...
well, 'flip const' but yes.
The difference is that you propose
On Tue, Feb 21, 2006 at 10:15:59AM +, Malcolm Wallace wrote:
> John Meacham <[EMAIL PROTECTED]> wrote:
>
> > I generalized this primitive to
> >
> > drop__ :: a -> b -> b
>
> Also known in the Prelude as "const"...
well, 'flip const' but yes.
> The difference is that you propose it be pri
John Meacham <[EMAIL PROTECTED]> wrote:
> I generalized this primitive to
>
> drop__ :: a -> b -> b
Also known in the Prelude as "const"...
The difference is that you propose it be primitive, with the intention
that a clever compiler should not be able to bypass it by inlining its
definition a
After reading all the interesting responses I decided to go with a
slight generalization of my original idea, and it surprisingly turns out
to have other generally useful unintended uses, which is the point that a 'hack'
becomes a 'feature'. :)
before I had a primitive:
newWorld__ :: a -> World__
John Meacham wrote:
So, I finally decided that jhc needs real arrays, but am running into an
issue and was wondering how other compilers solve it, or if there is a
general accepted way to do so.
here is what I have so far
-- The opaque internal array type
data Array__ a
-- the array transform
Data.Array.ST has
runSTArray :: Ix i => (forall s . ST s (STArray s i e)) -> Array i e
I think if you can implement that, then all your problems will be solved.
-- Ben
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/list
On Feb 15, 2006, at 10:53 PM, John Meacham wrote:
So, I finally decided that jhc needs real arrays, but am running
into an
issue and was wondering how other compilers solve it, or if there is a
general accepted way to do so.
...
now, the problem occurs in newAT__
newAT__ :: Int -> AT a -> A
On 2/15/06, John Meacham <[EMAIL PROTECTED]> wrote:
> > foreign import primitive "prim_newWorld__" :: forall a . a -> World__
>
> which will throw away its argument and produce a World__. but since it
> is primtive, the compiler will assume the world it returns might depend
> on its argument. then
So, I finally decided that jhc needs real arrays, but am running into an
issue and was wondering how other compilers solve it, or if there is a
general accepted way to do so.
here is what I have so far
> -- The opaque internal array type
> data Array__ a
>
> -- the array transformer quasi-monad
>
On Mon, Dec 26, 2005 at 06:45:09PM +0100, Niklas Sorensson wrote:
> That's what I thought. But I'm still curious when it is used, and why
> it isn't a suitable solution for unboxed polymorhic functions in most
> cases.
I always thought A nice extension would be to allow polymorphic
functions that
In article
<[EMAIL PROTECTED]
ft.com>,
"Simon Peyton-Jones" <[EMAIL PROTECTED]> wrote:
> The .NET CLR lifts the restriction by specialising code, so that it can
> adapt to whether it is moving Int# or Double# values around. In
> Haskell, though, it's not possible to statically generate all the
On Thu, Dec 29, 2005 at 12:39:01PM +, Bruno Oliveira wrote:
> A second alternative would be to simulate your GADT with a type class and
> your constructors with the functions of that type class:
>
> [...]
>
> As a remark, this is a church encoding of the GADT.
>
> [...]
>
> Now you can encode
Hello Tomasz,
Unfortunatelly I have only seen your message after Simon answered to it.
I am sorry for the late answer!
>| If there is another way to do this right now (conveniently, Oleg! ;-),
>I
>| would be more than happy to hear about it.
>|
>| If this worked, it would be a cool trick and a n
On Thu, Dec 29, 2005 at 09:48:04AM -, Simon Peyton-Jones wrote:
> Intriguing! I'm afraid it'll be some time before your code works,
> though.
No problem, I can wait.
> First I have to get GADTs and type classes to play together nicely,
> which I am hoping to do during Jan/Feb. Then I'll hav
if it works at all, it's quite amazing.
Simon
| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Tomasz
| Zielonka
| Sent: 22 December 2005 14:16
| To: Haskell Mailing List
| Subject: [Haskell] A question about fundeps <-> GADT interaction
|
|
Ashley
I think Lennart answered your question rather well. As he says, the
restriction is that an unboxed type must not instantiate a polymorphic
type variable (and that polymorphic type variables may not have an
unboxed kind). You may like to read the paper "Unboxed types as
first-
Taral wrote:
Just a strange thought, but what about...
foo :: x# -> ...
=>
... foo (void *x, ...) { ... }
Just because it's unboxed doesn't mean it isn't in memory...
Then you have to worry about garbage collection. That's OK, but that
would be a separate kind, pointers to unboxed values tha
On 12/26/05, Ashley Yakeley <[EMAIL PROTECTED]> wrote:
> I thought functions receive dictionaries, rather than dictionaries being
> stored inside values? For instance:
>
> class C (x :: #4) where ...
>
> foo :: (C x) => x -> Bool
> foo x = ...
>
> might be generate something like this:
>
>
Hello Ashley,
Tuesday, December 27, 2005, 2:46:11 AM, you wrote:
>> it's unserious :) overloading of unboxed types must be resolved at
>> compile time, as in C++ templates.
Why can't (->>) that's been specialised to #4 -> #4 -> * just generate a
AY> function that takes an anonymous 4-byte quan
Tomasz Zielonka wrote:
> I tried to implement another function:
>
> mapChildren :: (forall a. Term f a -> Term f a) -> Term f b -> Term f b
> mapChildren fun t@(Lit x) = t
> mapChildren fun (IsZero t) = IsZero (fun t)
> mapChildren fun (Succ t) = Succ (fun t)
> mapChildren fun (If c t e)
On Fri, Dec 23, 2005 at 12:10:07PM +0100, Tomasz Zielonka wrote:
> On Fri, Dec 23, 2005 at 03:34:40AM -, [EMAIL PROTECTED] wrote:
> >
> > [Sorry for possible duplication, our DNS server seems to be broken,
> > and the sysadm is on vacation]
> >
> > I don't think that is the problem with GADT
In article <[EMAIL PROTECTED]>,
Lennart Augustsson <[EMAIL PROTECTED]> wrote:
> Yes, I think it would work. But I'd think it would be awkward.
> Now you need to know the size of each unboxed type to make polymorphic
> functions (and that's not even portable).
Yes, your polymorphic types and fun
Ashley Yakeley wrote:
In article <[EMAIL PROTECTED]>,
Lennart Augustsson <[EMAIL PROTECTED]> wrote:
On the whole it looks like you want type variables with kind #.
There are very good implementation reasons for not allowing this.
If you had type variables of kind # you could have polymorphic
In article <[EMAIL PROTECTED]>,
Bulat Ziganshin <[EMAIL PROTECTED]> wrote:
> it's unserious :) overloading of unboxed types must be resolved at
> compile time, as in C++ templates.
Why can't (->) that's been specialised to #4 -> #4 -> * just generate a
function that takes an anonymous 4-byte q
>That reminds me of something that I have wondered about for some
>time. Why is there such reluctance to instantiate polymorhic functions
>with the types with which they are used? (This isn't done automatically
>in complilers right?)
MLj, SML.NET and MLton all compile polymorphism this way. They c
Niklas Sorensson wrote:
That's what I thought. But I'm still curious when it is used, and why
it isn't a suitable solution for unboxed polymorhic functions in most
cases.
But getting most cases right isn't enough, you have to get all cases
right. So if you want to have unboxed polymorphic func
>> I can imagine that it is akward to delay code generation until all uses
>> of a function are known, and that in some cases there may be infinitely
>> many instances needed. But apart from that, what are the reasons
>> against this implementation technique?
>
> What made you think that this tech
On Mon, Dec 26, 2005 at 02:22:57PM +0100, Niklas Sorensson wrote:
> That reminds me of something that I have wondered about for some
> time. Why is there such reluctance to instantiate polymorhic functions
> with the types with which they are used? (This isn't done automatically
> in complilers rig
> On the whole it looks like you want type variables with kind #.
> There are very good implementation reasons for not allowing this.
> If you had type variables of kind # you could have polymorphic
> functions over unboxed values. But since the values are unboxed
> they don't have a uniform repre
Hello Ashley,
Monday, December 26, 2005, 2:41:38 PM, you wrote:
>> On the whole it looks like you want type variables with kind #.
>> There are very good implementation reasons for not allowing this.
>> If you had type variables of kind # you could have polymorphic
>> functions over unboxed values
In article <[EMAIL PROTECTED]>,
Lennart Augustsson <[EMAIL PROTECTED]> wrote:
> On the whole it looks like you want type variables with kind #.
> There are very good implementation reasons for not allowing this.
> If you had type variables of kind # you could have polymorphic
> functions over unb
On the whole it looks like you want type variables with kind #.
There are very good implementation reasons for not allowing this.
If you had type variables of kind # you could have polymorphic
functions over unboxed values. But since the values are unboxed
they don't have a uniform representation
As I understand it, with unboxing switched on (->) actually has this
kind:
(->) :: ? -> ? -> *
Reading the Core specification, GHC has a particular kind of
"polykindism" which introduces kind "?", and defines specialisation such
that "?" may be replaced by "*" or "#" inside any kind. Accordi
On Fri, Dec 23, 2005 at 03:34:40AM -, [EMAIL PROTECTED] wrote:
>
> [Sorry for possible duplication, our DNS server seems to be broken,
> and the sysadm is on vacation]
>
> I don't think that is the problem with GADTs. The following works
>
> > untype :: Term f a -> Term Untyped ()
> > untyp
1 - 100 of 618 matches
Mail list logo