[Haskell-cafe] why typeRepArgs (typeOf "hello") is [Char] ?
Jonathan Cast
jonathanccast at fastmail.fm
Mon Feb 2 15:15:27 EST 2009
On Mon, 2009-02-02 at 21:09 +0100, minh thu wrote:
> Hello,
>
> With Data.Typeable :
>
> *Graph> typeRepArgs (typeOf 1)
> []
> *Graph> typeRepArgs (typeOf 'a')
> []
> *Graph> typeRepArgs (typeOf True)
> []
> *Graph> typeRepArgs (typeOf "hello")
> [Char]
>
> I don't understand why the latter is not []. Could someone explain it ?
Because ("hello" :: [] Char)?
Prelude> :t "hello"
"hello" :: [Char]
jcc
More information about the Haskell-Cafe
mailing list