RULES

Bulat Ziganshin bulat.ziganshin at gmail.com
Fri Apr 21 12:41:49 EDT 2006


Hello GHC,

i has the following function:

freezeIOUArray :: (Unboxed e, HasDefaultValue e, Ix i) => IOUArray i e -> IO (UArray i e)

when i try to use rule:

{-# RULES
"freeze/IOUArray" freeze = freezeIOUArray
    #-}

the compiler barks. i found the way that compiled:

{-# RULES
"freeze/IOUArray" forall (x :: (forall s e i . (Unboxed e, HasDefaultValue e) => IOUArray i e)) . freeze x = freezeIOUArray x
    #-}

but is this rule really works? SPJ once mentioned that type checking
is just impossible in current rules usage implementation


-- 
Best regards,
 Bulat                          mailto:Bulat.Ziganshin at gmail.com



More information about the Glasgow-haskell-users mailing list