X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FDesugar.hs;h=eaa15dcf3e7f0db2d9d96f8e76415e406bc033cc;hb=81b217b104feb963e00537a51e6b3dfee8163b86;hp=67ff6638f4674bd6697bee056151bfed5a6467ef;hpb=5b2b5621f83723e22beb4b6cbbf5963ee34d548b;p=ghc-base.git diff --git a/GHC/Desugar.hs b/GHC/Desugar.hs index 67ff663..eaa15dc 100644 --- a/GHC/Desugar.hs +++ b/GHC/Desugar.hs @@ -13,11 +13,11 @@ ----------------------------------------------------------------------------- -- #hide -module GHC.Desugar ((>>>)) where +module GHC.Desugar ((>>>), AnnotationWrapper(..), toAnnotationWrapper) where import Control.Arrow (Arrow(..)) import Control.Category ((.)) -import Prelude hiding ((.)) +import Data.Data (Data) -- A version of Control.Category.>>> overloaded on Arrow #ifndef __HADDOCK__ @@ -28,3 +28,9 @@ import Prelude hiding ((.)) -- Yes, this is a bit grotesque, but heck it works and the whole -- arrows stuff needs reworking anyway! f >>> g = g . f + +-- A wrapper data type that lets the typechecker get at the appropriate dictionaries for an annotation +data AnnotationWrapper = forall a. (Data a) => AnnotationWrapper a + +toAnnotationWrapper :: (Data a) => a -> AnnotationWrapper +toAnnotationWrapper what = AnnotationWrapper what