panic! applytTypeToArgs with non-infix function type constructor
module Foo where
-- this works
--mac :: Double -> (Double->Double) -> (Double-> Double)
--mac ac m = \ x -> ac + x * m x
-- this doesn't
mac2 :: Double -> (->) Double Double -> (->) Double Double
mac2 ac m = \ x -> ac + x * m x
Compiling this with ghc-7.6.1 results in
ghc: panic! (the 'impossible' happened)
(GHC version 7.6.1 for x86_64-unknown-linux):
applyTypeToArgs
m{v af4} [lid] x{v af5} [lid]
ghc-prim:GHC.Prim.(->){(w) tc 3D}
ghc-prim:GHC.Types.Double{(w) tc 3u}
ghc-prim:GHC.Types.Double{(w) tc 3u}
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.6.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | jwlato@gmail.com |
| Operating system | |
| Architecture |