No line number in implicit parameter error message

Alastair Reid reid at cs.utah.edu
Thu Apr 26 16:02:03 EDT 2001


GHC 5.0 doesn't tell me which line the error is on in the attached program.

$ rm -f T.o && ghc -c -fglasgow-exts T.hs 

Couldn't match `Int' against `[(String, Int)]'
    Expected type: Int
    Inferred type: [(String, Int)]

The type error itself is correct: the type of ?env in the signature
for ident should be Env not Int.

-- 
Alastair Reid        reid at cs.utah.edu        http://www.cs.utah.edu/~reid/

module T where

import Maybe

type Env = [(String,Int)]

ident :: (?env :: Int) => String -> Int
ident x = fromJust (lookup x ?env)




More information about the Glasgow-haskell-bugs mailing list