forall not recognized in RULES
{-# LANGUAGE GADTs, TypeFamilies, TypeOperators
-- , ScopedTypeVariables
#-}
{-# OPTIONS_GHC -Wall -frewrite-rules #-}
-- ScopedTypeVariables works around a 6.10 bug. The forall keyword is
-- supposed to be recognized in a RULES pragma, but it's not.
--
-- This bug was introduced between ghc 6.9.20080622 and 6.10.0.20081007.
-- | Mapping from all elements of @a@ to the results of some function
class HasTrie a where
-- | Representation of trie with domain type @a@
data (:->:) a :: * -> *
-- Create the trie for the entire domain of a function
trie :: (a -> b) -> (a :->: b)
-- | Convert a trie to a function, i.e., access a field of the trie
untrie :: (a :->: b) -> (a -> b)
{-# RULES
"trie/untrie" forall t. trie (untrie t) = t
"untrie/trie" forall f. untrie (trie f) = f
#-}
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.11 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | conal |
| Operating system | |
| Architecture |