[GHC] #14004: G
GHC
ghc-devs at haskell.org
Fri Jul 28 02:28:03 UTC 2017
#14004: G
-------------------------------------+-------------------------------------
Reporter: zaoqi | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by zaoqi):
Replying to [comment:13 AntC]:
> Replying to [comment:12 zaoqi]:
> > Replying to [comment:11 AntC]:
> > >
> > > So `instance Eq Dyn` will always return False.
> >
> > How to write the correct `instance Eq Dyn`, do not change `data Dyn`.
>
> The short answer is: `data Dyn` has the wrong definition for looking
inside. Ben has given you one possibility in comment:8. A more simple one
is:
>
> {{{
>
> data Dyn a where
> Dyn :: Eq a => a -> Dyn a
>
> }}}
>
> If you can't change the definition of `Dyn` (why not?), you need to
explain what you are trying to achieve.
>
> I suggest you ask a question on the cafe (or StackOverflow). GHC is
behaving as intended. There's no fault, so Trac is not the place to look
for that kind of help. (I see you've posted several Trac tickets that are
not really faults.)
>
> Perhaps it would be easier for you to ask on a Chinese language forum?
There seem to be
[https://www.reddit.com/r/ChineseLanguage/comments/62qfze/is_there_a_chinese_app_that_is_equivalent_to/
some equivalents to reddit], for both Mandarin and Cantonese.
`instance Dyn Ord`
`instance Dyn Num`
`instance Dyn Read`
`instance Dyn Show`
...
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14004#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list