POV-Ray : Newsgroups : povray.off-topic : Pointless but satisfying : Re: Pointless but satisfying Server Time
5 Sep 2024 13:12:53 EDT (-0400)
  Re: Pointless but satisfying  
From: Orchid XP v8
Date: 16 Jul 2009 15:56:57
Message: <4a5f8609$1@news.povray.org>
Orchid XP v8 wrote:

> Ah, but wait! The exact way you decompose the expression and apply the 
> unification process dictate what result you get. In the process of 
> crawling through this stuff, I discovered things I never even realised 
> about Haskell's type system. For example...
> 
>   (foo 1, foo 'x')
> 
> If "foo" is a top-level variable, this expression might be well-typed. 
> ("Might" depending on what type signature foo has, obviously.) However, 
> if "foo" is a local variable, then the above expression is *guaranteed* 
> to be ill-typed.
> 
> Stop and think about that for a moment: Where a variable is bound 
> determins whether this expression is well-typed or not. That should tell 
> you that something pretty subtle is going on here!
> 
> I never realised this, but look:

Awesome. On further investigation, it turns out my understanding of 
Haskell's type system is actually incorrect. And, unsurprisingly, my 
program is incorrect too; it rejects expressions that it should actually 
accept.

Nice to know I understand my own favourit programming language, eh? :-}

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.