Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1.  invalid type signature last2::: [a] -> a (Roelof Wobben)
   2. Re:  invalid type signature last2::: [a] -> a (akash g)
   3.  invalid type signature last2::: [a] -> a (Roelof Wobben)
   4. Re:  invalid type signature last2::: [a] -> a (Roelof Wobben)
   5. Re:  invalid type signature last2::: [a] -> a (May Khaw)


----------------------------------------------------------------------

Message: 1
Date: Sun, 09 Nov 2014 10:42:26 +0100
From: Roelof Wobben <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: [Haskell-beginners] invalid type signature last2::: [a] -> a
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"

An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20141109/89b25d96/attachment-0001.html>

------------------------------

Message: 2
Date: Sun, 9 Nov 2014 15:18:59 +0530
From: akash g <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] invalid type signature last2::: [a]
        -> a
Message-ID:
        <CALiga_fyzCx7Fowz=_db25mjceupzxqomrotyee+gwje2u8...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

The naming convention for variables and functions is that they should start
with a lower case letter.  Types have capitalized names.


On Sun, Nov 9, 2014 at 3:12 PM, Roelof Wobben <[email protected]> wrote:

>
>
>
>
>
>
>
>
>
>
>
>
>
> Hello,
>
> I try to solve the 99 haskell problems on several ways.
>
> But my first try which looks like this :
>
> Last2::[a]-> a
> Last2:: last[list]
>
> gives the following error message :
>
> src/Main.hs@1:1-1:6
> Invalid type signature: Last2 :: [a] -> a Should be of form <variable>
> :: <type>
>
> What am trying to do is say the input is a list which can be of integers
> or chars so everything is the output can then also be of type everything.
>
> Roelof
>
>
>
>
>
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20141109/a4a4daa8/attachment-0001.html>

------------------------------

Message: 3
Date: Sun, 09 Nov 2014 10:10:33 +0100
From: Roelof Wobben <[email protected]>
To: [email protected]
Subject: [Haskell-beginners] invalid type signature last2::: [a] -> a
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hello,

I try to solve the 99 haskell problems on several ways.

But my first try which looks like this :

Last2::[a]-> a
Last2:: last[list]

gives the following error message :

src/Main.hs@1:1-1:6
Invalid type signature: Last2 :: [a] -> a Should be of form <variable> 
:: <type>

What am trying to do is say the input is a list which can be of integers 
or chars so everything is the output can then also be of type everything.

Roelof





------------------------------

Message: 4
Date: Sun, 09 Nov 2014 11:02:41 +0100
From: Roelof Wobben <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] invalid type signature last2::: [a]
        -> a
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"

An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20141109/38353236/attachment-0001.html>

------------------------------

Message: 5
Date: Sun, 09 Nov 2014 10:17:28 +0000
From: May Khaw <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] invalid type signature last2::: [a]
        -> a
Message-ID:
        <CAE8k2sw5gBYBh=h8eeuncsc0fx5nrbom_dade79pjg-ovaj...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

The first one means that you gave a type signature for a function you did
not define.

The second one means that there are 2 last2 type signature, but you can
only have one.

What you want is something like :
last2 :: [a] - > a
last2 list = (put your function here)

On Sun, 9 Nov 2014 21:02 Roelof Wobben <[email protected]> wrote:

>  Thanks,
>
> I changed it to this :
>
> last2::[a]-> a
> last2::last[a]
>
> but now I see these error messages:
>
>  src/Main.hs@1:1-1:6 The type signature forlast2 lacks an accompanying
> binding
>  src/Main.hs@2:1-2:6 Duplicate type signatures for last2
> at
> /home/app/isolation-runner-work/projects/75679/session.207/src/src/Main.hs:1:1-5
>
>
> /home/app/isolation-runner-work/projects/75679/session.207/src/src/Main.hs:2:1-5
> src/Main.hs@2:1-2:6
>  The type signature for last2 lacks an accompanying binding
>
>
>
> akash g schreef op 9-11-2014 10:48:
>
> The naming convention for variables and functions is that they should
> start with a lower case letter.  Types have capitalized names.
>
>
> On Sun, Nov 9, 2014 at 3:12 PM, Roelof Wobben <[email protected]> wrote:
>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Hello,
>>
>> I try to solve the 99 haskell problems on several ways.
>>
>> But my first try which looks like this :
>>
>> Last2::[a]-> a
>> Last2:: last[list]
>>
>> gives the following error message :
>>
>> src/Main.hs@1:1-1:6
>> Invalid type signature: Last2 :: [a] -> a Should be of form <variable>
>> :: <type>
>>
>> What am trying to do is say the input is a list which can be of integers
>> or chars so everything is the output can then also be of type everything.
>>
>> Roelof
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Beginners mailing list
>> [email protected]
>> http://www.haskell.org/mailman/listinfo/beginners
>>
>>
>
>
> _______________________________________________
> Beginners mailing 
> [email protected]http://www.haskell.org/mailman/listinfo/beginners
>
>
>  _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20141109/015666e6/attachment-0001.html>

------------------------------

Subject: Digest Footer

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


------------------------------

End of Beginners Digest, Vol 77, Issue 2
****************************************

Reply via email to