ku-fpg / hermit

Haskell Equational Reasoning Model-to-Implementation Tunnel
http://www.ittc.ku.edu/csdl/fpg/Tools/HERMIT
BSD 2-Clause "Simplified" License
49 stars 8 forks source link

Add addHermitCoreRules method to the HasCoreRules class. #172

Closed conal closed 8 years ago

conal commented 8 years ago

I needed to generate and add GHC rewrite rules, so I extended the HasCoreRules class

-- | A class of contexts that store GHC rewrite rules.
class HasCoreRules c where
    hermitCoreRules    :: c -> [CoreRule]
    addHermitCoreRules :: [CoreRule] -> c -> c

Some alternatives:

I'm happy to tweak and resubmit.

conal commented 8 years ago

Added some spelling corrections.

xich commented 8 years ago

Just that nit, otherwise happy to merge!

conal commented 8 years ago

Great! I'll make the changes, compile on both 7.10.3 and 8.0.* and re-push.

conal commented 8 years ago

Compiled fine under 7.10.3 and 8.0. Ready to go.

xich commented 8 years ago

Thanks for the patch!