Re: [Haskell-cafe] Infinite types should be optionally allowed

2011-02-22 Thread Job Vranish
Thanks, Perhaps my algorithm works then. I shall have to read up more on these things :) - Job On Mon, Feb 21, 2011 at 4:54 PM, Luke Palmer lrpal...@gmail.com wrote: On Sun, Feb 20, 2011 at 6:01 PM, Job Vranish jvran...@gmail.com wrote: My current algorithm says that neither of the types you

Re: [Haskell-cafe] Infinite types should be optionally allowed

2011-02-21 Thread Job Vranish
On Sun, Feb 20, 2011 at 8:56 PM, Brandon Moore brandon_m_mo...@yahoo.comwrote: Typechecking with regular types isn't hard. So do I have the right idea then? To check against a signature, I can just unify the two types and then check if the unified type is 'equivalent' (is there a special word

Re: [Haskell-cafe] Infinite types should be optionally allowed

2011-02-21 Thread Brandon Moore
From: Job Vranish jvran...@gmail.com On Sun, Feb 20, 2011 at 8:56 PM, Brandon Moore brandon_m_mo...@yahoo.com wrote: Typechecking with regular types isn't hard. So do I have the right idea then? To check against a signature, I can just unify the two types and then check if the unified type

Re: [Haskell-cafe] Infinite types should be optionally allowed

2011-02-21 Thread Luke Palmer
On Sun, Feb 20, 2011 at 6:01 PM, Job Vranish jvran...@gmail.com wrote: My current algorithm says that neither of the types you gave is strictly more general than the other, which I'm guessing is probably not true. I'm curious what the correct answer is and would appreciate someone pointing out

Re: [Haskell-cafe] Infinite types should be optionally allowed

2011-02-20 Thread Job Vranish
Sorry for bringing back an ancient thread but I'd still like to understand this better. It is still not obvious to me why typechecking infinite types is so hard. Is determining type 'equivalence' the hard part? or is that a separate issue? I wrote a simple infinite type inferer and made an

Re: [Haskell-cafe] Infinite types should be optionally allowed

2011-02-20 Thread Brandon Moore
From: Job Vranish jvran...@gmail.com Sorry for bringing back an ancient thread but I'd still like to understand this better. It is still not obvious to me why typechecking infinite types is so hard. Is determining type 'equivalence' the hard part? or is that a separate issue? Typechecking

Re: [Haskell-cafe] Infinite types should be optionally allowed

2009-02-16 Thread Luke Palmer
On Sat, Feb 14, 2009 at 2:06 PM, Job Vranish jvran...@gmail.com wrote: I'm pretty sure that the problem is decidable, at least with haskell 98 types (other type extensions may complicate things a bit). It ends up being a graph unification algorithm. I've tried some simple algorithms and they

Re: [Haskell-cafe] Infinite types should be optionally allowed

2009-02-14 Thread Job Vranish
I'm pretty sure that the problem is decidable, at least with haskell 98 types (other type extensions may complicate things a bit). It ends up being a graph unification algorithm. I've tried some simple algorithms and they seem to work. What do you mean by the inference engine is only half of the

Re: [Haskell-cafe] Infinite types should be optionally allowed

2009-02-13 Thread Luke Palmer
On Fri, Feb 13, 2009 at 3:13 PM, Job Vranish jvran...@gmail.com wrote: There are good reasons against allowing infinite types by default (mostly, that a lot of things type check that are normally not what we want). An old haskell cafe conversation on the topic is here:

Re: [Haskell-cafe] Infinite types should be optionally allowed

2009-02-13 Thread Luke Palmer
On Fri, Feb 13, 2009 at 4:04 PM, Luke Palmer lrpal...@gmail.com wrote: On Fri, Feb 13, 2009 at 3:13 PM, Job Vranish jvran...@gmail.com wrote: There are good reasons against allowing infinite types by default (mostly, that a lot of things type check that are normally not what we want). An old