Search Results

Search found 1 results on 1 pages for 'user1760586'.

Page 1/1 | 1 

  • Haskell: list of elements with class restriction

    - by user1760586
    here's my question: this works perfectly: type Asdf = [Integer] type ListOfAsdf = [Asdf] Now I want to do the same but with the Integral class restriction: type Asdf2 a = (Integral a) => [a] type ListOfAsdf2 = (Integral a) => [Asdf2 a] I got this error: Illegal polymorphic or qualified type: Asdf2 a Perhaps you intended to use -XImpredicativeTypes In the type synonym declaration for `ListOfAsdf2' I have tried a lot of things but I am still not able to create a type with a class restriction as described above. Thanks in advance!!! =) Dak

    Read the article

1