Heinrich Hördegen | 28 Mar 07:40 2013

duplicate type signatures


Dear all,

why is this allowed (GHCi, version 7.4.1):

main :: IO ()
main = do
   let a, a :: Int
       a = 5
   print a

but this not:

main :: IO ()
main = do
   let a :: Int
       a :: Int
       a = 5
   print a

Is there a deeper sens or is it just a little bit inconsistent?

Heinrich
Joachim Breitner | 28 Mar 09:24 2013
Picon

Re: duplicate type signatures

Hi,

Am Donnerstag, den 28.03.2013, 07:40 +0100 schrieb Heinrich Hördegen:
> Is there a deeper sens or is it just a little bit inconsistent?

looks like the latter to me. The report states

        Moreover, it is invalid to give more than one type signature for
        one variable, even if the signatures are identical.

so I guess you can file a bug report.

Greetings,
Joachim

--

-- 
Joachim "nomeata" Breitner
Debian Developer
  nomeata <at> debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata <at> joachim-breitner.de | http://people.debian.org/~nomeata

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Gmane