nikita-volkov / record

Anonymous records
http://hackage.haskell.org/package/record
MIT License
245 stars 8 forks source link

Arrow types disallowed in type definitions #10

Open josyoun opened 9 years ago

josyoun commented 9 years ago

It appears that arrow types are currently not supported. For example, in vanilla Haskell, the following works fine:

data Bar = Bar {
    bar :: String -> String
}

With the Record package, the following code

type Foo = [r| {
    foo :: String -> String 
} |] 

generates the error

    `String' is applied to too many type arguments
    In the type `Record.Types.Record1 "foo" (String (->) String)'
    In the type declaration for `Foo'
Failed, modules loaded: none.
nikita-volkov commented 9 years ago

Yes, the parser doesn't support lambdas yet.

I won't be implementing it, since I'm working on a complete reimplementation of parsing, which hacks around the "haskell-src-exts" parser. I'm open for pull requests however.

3noch commented 8 years ago

How's it going?