#3583: Default view patterns
---------------------------------+------------------------------------------
Reporter: ksf | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.4
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
---------------------------------+------------------------------------------
Comment (by ksf):
Erm yes. The idea is to desugar
{{{
foo Bar = baz
}}}
into
{{{
foo (view -> Bar) = baz
}}}
, "view" being a member of a magic typeclass types have to instantiate to
be eligible for this transformation. The rationale is to make the syntax
as free of clutter as is the case with matching on plain constructors, to
facilitate usage of view patterns and abstraction from concrete
representations.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3583#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs