Re: [Haskell-cafe] Re: Non-existing types in existential quantification?

2010-10-03 Thread Erik Hesselink
On Sun, Oct 3, 2010 at 14:10, Daniel Fischer wrote: > On Sunday 03 October 2010 10:43:24, Henning Thielemann wrote: >> On Sun, 3 Oct 2010, Ben Franksen wrote: >> > Christopher Done wrote: >> >> Consider the following program: >> >> >> >> main = putStrLn $ show $ length [undefined :: a,undefined ::

Re: [Haskell-cafe] Re: Non-existing types in existential quantification?

2010-10-03 Thread Daniel Fischer
On Sunday 03 October 2010 10:43:24, Henning Thielemann wrote: > On Sun, 3 Oct 2010, Ben Franksen wrote: > > Christopher Done wrote: > >> Consider the following program: > >> > >> main = putStrLn $ show $ length [undefined :: a,undefined :: b] > >> > >> A concrete type of the element in list doesn't

Re: [Haskell-cafe] Re: Non-existing types in existential quantification?

2010-10-03 Thread Henning Thielemann
On Sun, 3 Oct 2010, Ben Franksen wrote: Christopher Done wrote: Consider the following program: main = putStrLn $ show $ length [undefined :: a,undefined :: b] A concrete type of the element in list doesn't need to be determined at runtime, or any time. a unifies with b, and that unifies wi

[Haskell-cafe] Re: Non-existing types in existential quantification?

2010-10-02 Thread Ben Franksen
Christopher Done wrote: > On 1 October 2010 15:27, Henning Thielemann > wrote: >> >> Given the following code, that is accepted by GHC: >> >>> data Exist = forall a. Exist a >>> >>> exist :: Exist >>> exist = Exist undefined >> >> What type has the 'undefined' ? > > I think its type is `a'. >> >>