
#9898: Wanted: higher-order type-level programming -------------------------------------+------------------------------------- Reporter: erisco | Owner: Type: feature | Status: new request | Milestone: Priority: normal | Version: 7.8.3 Component: Compiler | Keywords: (Type checker) | Architecture: x86_64 (amd64) Resolution: | Difficulty: Unknown Operating System: Windows | Blocked By: Type of failure: GHC | Related Tickets: rejects valid program | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by simonpj): * type: bug => feature request Comment: HEAD correctly says {{{ T9898.hs:20:10: Type family ‘Equal’ should have 2 arguments, but has been given 1 In the type signature for ‘test1’: test1 :: ApplyFilter ((Equal Int) Char) (Char, Filter (Equal Int) ()) T9898.hs:27:10: Type family ‘Equal’ should have 2 arguments, but has been given 1 In the type signature for ‘test3’: test3 :: Filter (Equal Int) (Char, ()) T9898.hs:31:10: Type family ‘Equal’ should have 2 arguments, but has been given 1 In the type signature for ‘test4’: test4 :: Filter (Equal Int) (Char, ()) }}} You can't partially apply a type function, I'm afraid. Yes, that limits higher-order programming. Better solutions (that still support type inference) most welcome. I'll leave this open as a feature request for higher order type level programming. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9898#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler