[GHC] #10547: feature request: expanding type synonyms in error messages
GHC
ghc-devs at haskell.org
Wed May 11 20:07:25 UTC 2016
#10547: feature request: expanding type synonyms in error messages
-------------------------------------+-------------------------------------
Reporter: osa1 | Owner:
Type: feature request | Status: new
Priority: low | Milestone: 8.0.1
Component: Compiler (Type | Version:
checker) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| typecheck/should_fail/ExpandSynsFail1,2,3,4
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1016,
Wiki Page: | Phab:D2198
-------------------------------------+-------------------------------------
Comment (by ezyang):
Under Simon's algorithm, I don't see why you should have an `O(n * m)`
asymptotic behavior. I guess you are trying to handle this case?
{{{
type T = Int
type S = T
type S1 = S
type S2 = S
-- error message comparing S1 and S2
-- AKA S and S (not Int and Int)
}}}
Then the problem resolves to this: given two (singly) linked lists which
share a common tail, determine the head of the tail. This is a popular
coding interview question and you can do better than `O(n * m)`; e.g. by
method 3 here http://www.geeksforgeeks.org/write-a-function-to-get-the-
intersection-point-of-two-linked-lists/
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10547#comment:18>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list