|
[GHC] #821: implicit parameters and type synonyms: msg#00040lang.haskell.glasgow.bugs
#821: implicit parameters and type synonyms -----------------------------------+---------------------------------------- Reporter: tullsen@xxxxxxxxxx | Owner: Type: support request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 6.5 Severity: normal | Keywords: Os: Unknown | Difficulty: Unknown Architecture: Unknown | -----------------------------------+---------------------------------------- I wouldn't call this a bug. But we have various pieces of code at Galois that rely on this undocumented (AFAIK) feature of GHC: Allow implicit parameter constraints in type synonyms and float the constraints out when the synonym is used. So, given the following program: {{{ {-# OPTIONS -fglasgow-exts -fimplicit-params #-} module TestIP where type PPEnv = Int type Doc = Char type PPDoc = (?env :: PPEnv) => Doc f :: Char -> PPDoc f = succ }}} In ghc 6.4.1 and 6.2.1 it compiles fine. In ghc 6.5.20060526 I get this: {{{ src $ ghci ~/TestIP.hs ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.5.20060526, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \____/\/ /_/\____/|_| Type :? for help. Loading package base-1.0 ... linking ... done. [1 of 1] Compiling TestIP ( /Users/tullsen/TestIP.hs, interpreted ) /Users/tullsen/TestIP.hs:10:4: Couldn't match expected type `PPDoc' against inferred type `Char' Probable cause: `succ' is applied to too many arguments In the expression: succ In the definition of `f': f = succ Failed, modules loaded: none. Prelude> }}} So, my question is Is this a bug or the removing of an undocumented 'feature'? Thanks, Mark -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/821> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler_______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@xxxxxxxxxxx http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [GHC] #820: problem compiling a file with top level Template Haskell splice, GHC |
|---|---|
| Next by Date: | Re: [GHC] #817: internal error: stg_ap_ppp_ret, GHC |
| Previous by Thread: | [GHC] #820: problem compiling a file with top level Template Haskell splice, GHC |
| Next by Thread: | Re: [GHC] #806: hGetBufNonBlocking doesn't work with -threaded on Windows, GHC |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |