UWNetworksLab / arrakis

Arrakis public repository.
MIT License
253 stars 13 forks source link

Update Main.hs #1

Closed woohooyeah closed 10 years ago

woohooyeah commented 10 years ago

Update for compiling under GHC 7.6, because of the API change with regard to the defaultErrorHandler.

simpeter commented 10 years ago

Sweet! Thanks for the patch!

simpeter commented 10 years ago

While this fixed the hake build issue with GHC v7.6, there is now a build issue with Mackerel:

../arrakis/tools/mackerel/Fields.hs:126:18: Could not deduce (Num a) arising from the literal 0' from the context (Bits a) bound by the type signature for extract_mask :: Bits a => Rec -> Integer -> a at ../arrakis/tools/mackerel/Fields.hs:124:17-47 Possible fix: add (Num a) to the context of the type signature for extract_mask :: Bits a => Rec -> Integer -> a In the second argument offoldl', namely 0' In the expression: foldl setBit 0 (enumFromTo (fromInteger $ offset f) (fromInteger $ (offset f) + (size f) - 1)) In an equation forextract_mask': extract_mask f sz = foldl setBit 0 (enumFromTo (fromInteger $ offset f) (fromInteger $ (offset f) + (size f) - 1))