packages feed

uhc-util 0.1.6.0 → 0.1.6.2

raw patch · 13 files changed

+403/−78 lines, 13 filesdep −ListLikedep ~basePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies removed: ListLike

Dependency ranges changed: base

API changes (from Hackage documentation)

- UHC.Util.AGraph: instance (Show a, Show b) => Show (AGraph a b)
- UHC.Util.CompileRun: crCUCache :: CompileRun nm unit info err -> Map nm unit
- UHC.Util.CompileRun: crCompileOrder :: CompileRun nm unit info err -> [[nm]]
- UHC.Util.CompileRun: crState :: CompileRun nm unit info err -> CompileRunState err
- UHC.Util.CompileRun: crStateInfo :: CompileRun nm unit info err -> info
- UHC.Util.CompileRun: crTopModNm :: CompileRun nm unit info err -> nm
- UHC.Util.CompileRun: instance CompileRunError String ()
- UHC.Util.CompileRun: instance CompileRunner state n pos loc u i e m => Applicative (CompilePhaseT n u i e m)
- UHC.Util.CompileRun: instance CompileRunner state n pos loc u i e m => Functor (CompilePhaseT n u i e m)
- UHC.Util.CompileRun: instance CompileRunner state n pos loc u i e m => Monad (CompilePhaseT n u i e m)
- UHC.Util.CompileRun: instance Eq CompileParticipation
- UHC.Util.CompileRun: instance Error (CompileRunState err)
- UHC.Util.CompileRun: instance Ord CompileParticipation
- UHC.Util.CompileRun: instance Show (CompileRunState err)
- UHC.Util.CompileRun2: _crCUCache :: CompileRun nm unit info err -> Map nm unit
- UHC.Util.CompileRun2: _crCompileOrder :: CompileRun nm unit info err -> [[nm]]
- UHC.Util.CompileRun2: _crState :: CompileRun nm unit info err -> CompileRunState err
- UHC.Util.CompileRun2: _crStateInfo :: CompileRun nm unit info err -> info
- UHC.Util.CompileRun2: _crTopModNm :: CompileRun nm unit info err -> nm
- UHC.Util.CompileRun2: instance (CompileRunner state n pos loc u i e m, MonadError e' m) => MonadError e' (CompilePhaseT n u i e m)
- UHC.Util.CompileRun2: instance (CompileRunner state n pos loc u i e m, MonadFix m) => MonadFix (CompilePhaseT n u i e m)
- UHC.Util.CompileRun2: instance (CompileRunner state n pos loc u i e m, MonadIO m) => MonadIO (CompilePhaseT n u i e m)
- UHC.Util.CompileRun2: instance (CompileRunner state n pos loc u i e m, MonadState s m) => MonadState s (CompilePhaseT n u i e m)
- UHC.Util.CompileRun2: instance CompileRunError String ()
- UHC.Util.CompileRun2: instance CompileRunner state n pos loc u i e m => Applicative (CompilePhaseT n u i e m)
- UHC.Util.CompileRun2: instance CompileRunner state n pos loc u i e m => Functor (CompilePhaseT n u i e m)
- UHC.Util.CompileRun2: instance CompileRunner state n pos loc u i e m => Monad (CompilePhaseT n u i e m)
- UHC.Util.CompileRun2: instance Eq CompileParticipation
- UHC.Util.CompileRun2: instance Error (CompileRunState err)
- UHC.Util.CompileRun2: instance MonadTrans (CompilePhaseT n u i e)
- UHC.Util.CompileRun2: instance Ord CompileParticipation
- UHC.Util.CompileRun2: instance Show (CompileRunState err)
- UHC.Util.CompileRun3: _crCUCache :: CompileRun nm unit info err -> Map nm unit
- UHC.Util.CompileRun3: _crCompileOrder :: CompileRun nm unit info err -> [[nm]]
- UHC.Util.CompileRun3: _crNmForward :: CompileRun nm unit info err -> Map nm nm
- UHC.Util.CompileRun3: _crOutputDebug :: CompileRun nm unit info err -> Bool
- UHC.Util.CompileRun3: _crState :: CompileRun nm unit info err -> CompileRunState err
- UHC.Util.CompileRun3: _crStateInfo :: CompileRun nm unit info err -> info
- UHC.Util.CompileRun3: _crTopModNm :: CompileRun nm unit info err -> nm
- UHC.Util.CompileRun3: instance (CompileRunner state n pos loc u i e m, MonadError e' m) => MonadError e' (CompilePhaseT n u i e m)
- UHC.Util.CompileRun3: instance (CompileRunner state n pos loc u i e m, MonadFix m) => MonadFix (CompilePhaseT n u i e m)
- UHC.Util.CompileRun3: instance (CompileRunner state n pos loc u i e m, MonadIO m) => MonadIO (CompilePhaseT n u i e m)
- UHC.Util.CompileRun3: instance (CompileRunner state n pos loc u i e m, MonadState s m) => MonadState s (CompilePhaseT n u i e m)
- UHC.Util.CompileRun3: instance CompileRunError String ()
- UHC.Util.CompileRun3: instance CompileRunner state n pos loc u i e m => Applicative (CompilePhaseT n u i e m)
- UHC.Util.CompileRun3: instance CompileRunner state n pos loc u i e m => Functor (CompilePhaseT n u i e m)
- UHC.Util.CompileRun3: instance CompileRunner state n pos loc u i e m => Monad (CompilePhaseT n u i e m)
- UHC.Util.CompileRun3: instance Eq CompileParticipation
- UHC.Util.CompileRun3: instance Error (CompileRunState err)
- UHC.Util.CompileRun3: instance MonadTrans (CompilePhaseT n u i e)
- UHC.Util.CompileRun3: instance Ord CompileParticipation
- UHC.Util.CompileRun3: instance Show (CompileRunState err)
- UHC.Util.DependencyGraph: instance (Ord n, PP n) => PP (DpdGr n)
- UHC.Util.DependencyGraph: instance PP n => PP (SCC n)
- UHC.Util.DependencyGraph: instance Show (DpdGr n)
- UHC.Util.DependencyGraph: instance Show (SCC n)
- UHC.Util.FPath: fpathBase :: FPath -> !String
- UHC.Util.FPath: fpathMbDir :: FPath -> !(Maybe FilePath)
- UHC.Util.FPath: fpathMbSuff :: FPath -> !(Maybe String)
- UHC.Util.FPath: instance Constructor C1_0FPath
- UHC.Util.FPath: instance Datatype D1FPath
- UHC.Util.FPath: instance Eq FPath
- UHC.Util.FPath: instance FPATH FPath
- UHC.Util.FPath: instance FPATH String
- UHC.Util.FPath: instance FPathError String
- UHC.Util.FPath: instance Generic FPath
- UHC.Util.FPath: instance Ord FPath
- UHC.Util.FPath: instance Selector S1_0_0FPath
- UHC.Util.FPath: instance Selector S1_0_1FPath
- UHC.Util.FPath: instance Selector S1_0_2FPath
- UHC.Util.FPath: instance Show FPath
- UHC.Util.FPath: instance Typeable FPath
- UHC.Util.FastSeq: instance Monoid (FastSeq a)
- UHC.Util.Hashable: instance (Hashable a, Hashable b) => Hashable (Map a b)
- UHC.Util.Hashable: instance Hashable FPath
- UHC.Util.Hashable: instance Hashable a => Hashable (Set a)
- UHC.Util.Nm: instance Eq s => Eq (Nm' s)
- UHC.Util.Nm: instance FPATH Nm
- UHC.Util.Nm: instance Functor Nm'
- UHC.Util.Nm: instance NM Int
- UHC.Util.Nm: instance NM Nm
- UHC.Util.Nm: instance NM String
- UHC.Util.Nm: instance Ord s => Ord (Nm' s)
- UHC.Util.Nm: instance PP Nm
- UHC.Util.Nm: instance Show Nm
- UHC.Util.Nm: nmMbSel :: Nm' s -> Maybe s
- UHC.Util.Nm: nmNm :: Nm' s -> Nm' s
- UHC.Util.Nm: nmQual :: Nm' s -> s
- UHC.Util.Nm: nmStr :: Nm' s -> s
- UHC.Util.ParseErrPrettyPrint: instance (Eq s, Show s, Show p, Position p) => PP (Message s p)
- UHC.Util.Pretty: instance (PP a, PP b) => PP (a, b)
- UHC.Util.Pretty: instance PP Bool
- UHC.Util.Pretty: instance PP a => PP (Maybe a)
- UHC.Util.PrettySimple: instance PP Char
- UHC.Util.PrettySimple: instance PP Float
- UHC.Util.PrettySimple: instance PP Int
- UHC.Util.PrettySimple: instance PP Integer
- UHC.Util.PrettySimple: instance PP PP_Doc
- UHC.Util.PrettySimple: instance PP a => PP [a]
- UHC.Util.PrettySimple: instance Show PP_Doc
- UHC.Util.RelMap: instance (Ord b, Ord a, Binary a, Binary b) => Binary (Rel a b)
- UHC.Util.RelMap: instance (Ord b, Ord a, Serialize a, Serialize b) => Serialize (Rel a b)
- UHC.Util.ScanUtils: infpColumn :: InFilePos -> Int
- UHC.Util.ScanUtils: infpLine :: InFilePos -> Int
- UHC.Util.ScanUtils: instance Eq InFilePos
- UHC.Util.ScanUtils: instance Ord InFilePos
- UHC.Util.ScanUtils: instance PP Pos
- UHC.Util.ScanUtils: instance Position (GenToken k t v)
- UHC.Util.ScanUtils: instance Position p => Position (Maybe p)
- UHC.Util.ScanUtils: instance Show InFilePos
- UHC.Util.ScanUtils: scoAllowFloat :: ScanOpts -> !Bool
- UHC.Util.ScanUtils: scoAllowQualified :: ScanOpts -> !Bool
- UHC.Util.ScanUtils: scoCommandsTxt :: ScanOpts -> !(Set String)
- UHC.Util.ScanUtils: scoDollarIdent :: ScanOpts -> !Bool
- UHC.Util.ScanUtils: scoKeywExtraChars :: ScanOpts -> !(Set Char)
- UHC.Util.ScanUtils: scoKeywordsOps :: ScanOpts -> !(Set String)
- UHC.Util.ScanUtils: scoKeywordsTxt :: ScanOpts -> !(Set String)
- UHC.Util.ScanUtils: scoLitmode :: ScanOpts -> !Bool
- UHC.Util.ScanUtils: scoOffsideClose :: ScanOpts -> !String
- UHC.Util.ScanUtils: scoOffsideModule :: ScanOpts -> !String
- UHC.Util.ScanUtils: scoOffsideOpen :: ScanOpts -> !String
- UHC.Util.ScanUtils: scoOffsideTrigs :: ScanOpts -> ![String]
- UHC.Util.ScanUtils: scoOffsideTrigsGE :: ScanOpts -> ![String]
- UHC.Util.ScanUtils: scoOpChars :: ScanOpts -> !(Set Char)
- UHC.Util.ScanUtils: scoPragmasTxt :: ScanOpts -> !(Set String)
- UHC.Util.ScanUtils: scoSpecChars :: ScanOpts -> !(Set Char)
- UHC.Util.ScanUtils: scoSpecPairs :: ScanOpts -> !(Set String)
- UHC.Util.ScanUtils: scoStringDelims :: ScanOpts -> !String
- UHC.Util.ScanUtils: scoVerbOpenClose :: ScanOpts -> ![(String, String)]
- UHC.Util.ScopeMapGam: instance (Data k, Data v, Ord k) => Data (SGam k v)
- UHC.Util.ScopeMapGam: instance (Ord k, Serialize k, Serialize v) => Serialize (SGam k v)
- UHC.Util.ScopeMapGam: instance Data v => Data (SGamElt v)
- UHC.Util.ScopeMapGam: instance Serialize v => Serialize (SGamElt v)
- UHC.Util.ScopeMapGam: instance Show (SGam k v)
- UHC.Util.ScopeMapGam: instance Typeable SGam
- UHC.Util.ScopeMapGam: instance Typeable SGamElt
- UHC.Util.Serialize: instance (Ord a, Serialize a) => Serialize (Set a)
- UHC.Util.Serialize: instance (Ord k, Serialize k, Serialize e) => Serialize (Map k e)
- UHC.Util.Serialize: instance (Serialize a, Serialize b) => Serialize (a, b)
- UHC.Util.Serialize: instance (Serialize a, Serialize b, Serialize c) => Serialize (a, b, c)
- UHC.Util.Serialize: instance Binary SCmd
- UHC.Util.Serialize: instance Enum SCmd
- UHC.Util.Serialize: instance Serialize ()
- UHC.Util.Serialize: instance Serialize Bool
- UHC.Util.Serialize: instance Serialize Char
- UHC.Util.Serialize: instance Serialize Int
- UHC.Util.Serialize: instance Serialize Int16
- UHC.Util.Serialize: instance Serialize Int32
- UHC.Util.Serialize: instance Serialize Int64
- UHC.Util.Serialize: instance Serialize Integer
- UHC.Util.Serialize: instance Serialize Word16
- UHC.Util.Serialize: instance Serialize Word32
- UHC.Util.Serialize: instance Serialize Word64
- UHC.Util.Serialize: instance Serialize a => Serialize (Maybe a)
- UHC.Util.Serialize: instance Serialize a => Serialize [a]
- UHC.Util.Utils: showUnprefixedWithTypeable :: (Show x, Typeable x) => Int -> x -> String
- UHC.Util.VarLookup: instance [overlap ok] (VarLookup m1 k v, VarLookup m2 k v) => VarLookup (m1, m2) k v
- UHC.Util.VarLookup: instance [overlap ok] (VarLookupCmb m1 m1, VarLookupCmb m1 m2) => VarLookupCmb [m1] [m2]
- UHC.Util.VarLookup: instance [overlap ok] VarLookup m k v => VarLookup [m] k v
- UHC.Util.VarLookup: instance [overlap ok] VarLookupCmb m1 m2 => VarLookupCmb m1 [m2]
- UHC.Util.VarMp: instance [overlap ok] (Data k, Data v, Ord k) => Data (VarMp' k v)
- UHC.Util.VarMp: instance [overlap ok] (Eq k, Eq v) => Eq (VarMp' k v)
- UHC.Util.VarMp: instance [overlap ok] (Ord k, Ord v) => Ord (VarMp' k v)
- UHC.Util.VarMp: instance [overlap ok] (Ord k, Serialize k, Serialize v) => Serialize (VarMp' k v)
- UHC.Util.VarMp: instance [overlap ok] (PP k, PP v) => PP (VarMp' k v)
- UHC.Util.VarMp: instance [overlap ok] (PP k, PP v) => PP (VarMpStk' k v)
- UHC.Util.VarMp: instance [overlap ok] Ord k => VarLookup (VarMp' k v) k v
- UHC.Util.VarMp: instance [overlap ok] Ord k => VarLookup (VarMpStk' k v) k v
- UHC.Util.VarMp: instance [overlap ok] Ord k => VarLookupCmb (VarMp' k v) (VarMp' k v)
- UHC.Util.VarMp: instance [overlap ok] Ord k => VarLookupCmb (VarMpStk' k v) (VarMpStk' k v)
- UHC.Util.VarMp: instance [overlap ok] Show (VarMp' k v)
- UHC.Util.VarMp: instance [overlap ok] Show (VarMpStk' k v)
- UHC.Util.VarMp: instance [overlap ok] Typeable VarMp'
- UHC.Util.VarMp: instance [overlap ok] VarLookupBase (VarMp' k v) k v
- UHC.Util.VarMp: varmpMetaLev :: VarMp' k v -> !MetaLev
- UHC.Util.VarMp: varmpMpL :: VarMp' k v -> [Map k v]
+ UHC.Util.AGraph: instance (GHC.Show.Show a, GHC.Show.Show b) => GHC.Show.Show (UHC.Util.AGraph.AGraph a b)
+ UHC.Util.CompileRun: [crCUCache] :: CompileRun nm unit info err -> Map nm unit
+ UHC.Util.CompileRun: [crCompileOrder] :: CompileRun nm unit info err -> [[nm]]
+ UHC.Util.CompileRun: [crStateInfo] :: CompileRun nm unit info err -> info
+ UHC.Util.CompileRun: [crState] :: CompileRun nm unit info err -> CompileRunState err
+ UHC.Util.CompileRun: [crTopModNm] :: CompileRun nm unit info err -> nm
+ UHC.Util.CompileRun: instance GHC.Classes.Eq UHC.Util.CompileRun.CompileParticipation
+ UHC.Util.CompileRun: instance GHC.Classes.Ord UHC.Util.CompileRun.CompileParticipation
+ UHC.Util.CompileRun: instance GHC.Show.Show (UHC.Util.CompileRun.CompileRunState err)
+ UHC.Util.CompileRun: instance UHC.Util.CompileRun.CompileRunError GHC.Base.String ()
+ UHC.Util.CompileRun: instance UHC.Util.CompileRun.CompileRunner state n pos loc u i e m => GHC.Base.Applicative (UHC.Util.CompileRun.CompilePhaseT n u i e m)
+ UHC.Util.CompileRun: instance UHC.Util.CompileRun.CompileRunner state n pos loc u i e m => GHC.Base.Functor (UHC.Util.CompileRun.CompilePhaseT n u i e m)
+ UHC.Util.CompileRun: instance UHC.Util.CompileRun.CompileRunner state n pos loc u i e m => GHC.Base.Monad (UHC.Util.CompileRun.CompilePhaseT n u i e m)
+ UHC.Util.CompileRun: instance UHC.Util.Error.Error (UHC.Util.CompileRun.CompileRunState err)
+ UHC.Util.CompileRun2: [_crCUCache] :: CompileRun nm unit info err -> Map nm unit
+ UHC.Util.CompileRun2: [_crCompileOrder] :: CompileRun nm unit info err -> [[nm]]
+ UHC.Util.CompileRun2: [_crStateInfo] :: CompileRun nm unit info err -> info
+ UHC.Util.CompileRun2: [_crState] :: CompileRun nm unit info err -> CompileRunState err
+ UHC.Util.CompileRun2: [_crTopModNm] :: CompileRun nm unit info err -> nm
+ UHC.Util.CompileRun2: instance (UHC.Util.CompileRun2.CompileRunner state n pos loc u i e m, Control.Monad.Error.Class.MonadError e' m) => Control.Monad.Error.Class.MonadError e' (UHC.Util.CompileRun2.CompilePhaseT n u i e m)
+ UHC.Util.CompileRun2: instance (UHC.Util.CompileRun2.CompileRunner state n pos loc u i e m, Control.Monad.Fix.MonadFix m) => Control.Monad.Fix.MonadFix (UHC.Util.CompileRun2.CompilePhaseT n u i e m)
+ UHC.Util.CompileRun2: instance (UHC.Util.CompileRun2.CompileRunner state n pos loc u i e m, Control.Monad.IO.Class.MonadIO m) => Control.Monad.IO.Class.MonadIO (UHC.Util.CompileRun2.CompilePhaseT n u i e m)
+ UHC.Util.CompileRun2: instance (UHC.Util.CompileRun2.CompileRunner state n pos loc u i e m, Control.Monad.State.Class.MonadState s m) => Control.Monad.State.Class.MonadState s (UHC.Util.CompileRun2.CompilePhaseT n u i e m)
+ UHC.Util.CompileRun2: instance Control.Monad.Trans.Class.MonadTrans (UHC.Util.CompileRun2.CompilePhaseT n u i e)
+ UHC.Util.CompileRun2: instance GHC.Classes.Eq UHC.Util.CompileRun2.CompileParticipation
+ UHC.Util.CompileRun2: instance GHC.Classes.Ord UHC.Util.CompileRun2.CompileParticipation
+ UHC.Util.CompileRun2: instance GHC.Show.Show (UHC.Util.CompileRun2.CompileRunState err)
+ UHC.Util.CompileRun2: instance UHC.Util.CompileRun2.CompileRunError GHC.Base.String ()
+ UHC.Util.CompileRun2: instance UHC.Util.CompileRun2.CompileRunner state n pos loc u i e m => GHC.Base.Applicative (UHC.Util.CompileRun2.CompilePhaseT n u i e m)
+ UHC.Util.CompileRun2: instance UHC.Util.CompileRun2.CompileRunner state n pos loc u i e m => GHC.Base.Functor (UHC.Util.CompileRun2.CompilePhaseT n u i e m)
+ UHC.Util.CompileRun2: instance UHC.Util.CompileRun2.CompileRunner state n pos loc u i e m => GHC.Base.Monad (UHC.Util.CompileRun2.CompilePhaseT n u i e m)
+ UHC.Util.CompileRun2: instance UHC.Util.Error.Error (UHC.Util.CompileRun2.CompileRunState err)
+ UHC.Util.CompileRun3: [_crCUCache] :: CompileRun nm unit info err -> Map nm unit
+ UHC.Util.CompileRun3: [_crCompileOrder] :: CompileRun nm unit info err -> [[nm]]
+ UHC.Util.CompileRun3: [_crNmForward] :: CompileRun nm unit info err -> Map nm nm
+ UHC.Util.CompileRun3: [_crOutputDebug] :: CompileRun nm unit info err -> Bool
+ UHC.Util.CompileRun3: [_crStateInfo] :: CompileRun nm unit info err -> info
+ UHC.Util.CompileRun3: [_crState] :: CompileRun nm unit info err -> CompileRunState err
+ UHC.Util.CompileRun3: [_crTopModNm] :: CompileRun nm unit info err -> nm
+ UHC.Util.CompileRun3: instance (UHC.Util.CompileRun3.CompileRunner state n pos loc u i e m, Control.Monad.Error.Class.MonadError e' m) => Control.Monad.Error.Class.MonadError e' (UHC.Util.CompileRun3.CompilePhaseT n u i e m)
+ UHC.Util.CompileRun3: instance (UHC.Util.CompileRun3.CompileRunner state n pos loc u i e m, Control.Monad.Fix.MonadFix m) => Control.Monad.Fix.MonadFix (UHC.Util.CompileRun3.CompilePhaseT n u i e m)
+ UHC.Util.CompileRun3: instance (UHC.Util.CompileRun3.CompileRunner state n pos loc u i e m, Control.Monad.IO.Class.MonadIO m) => Control.Monad.IO.Class.MonadIO (UHC.Util.CompileRun3.CompilePhaseT n u i e m)
+ UHC.Util.CompileRun3: instance (UHC.Util.CompileRun3.CompileRunner state n pos loc u i e m, Control.Monad.State.Class.MonadState s m) => Control.Monad.State.Class.MonadState s (UHC.Util.CompileRun3.CompilePhaseT n u i e m)
+ UHC.Util.CompileRun3: instance Control.Monad.Trans.Class.MonadTrans (UHC.Util.CompileRun3.CompilePhaseT n u i e)
+ UHC.Util.CompileRun3: instance GHC.Classes.Eq UHC.Util.CompileRun3.CompileParticipation
+ UHC.Util.CompileRun3: instance GHC.Classes.Ord UHC.Util.CompileRun3.CompileParticipation
+ UHC.Util.CompileRun3: instance GHC.Show.Show (UHC.Util.CompileRun3.CompileRunState err)
+ UHC.Util.CompileRun3: instance UHC.Util.CompileRun3.CompileRunError GHC.Base.String ()
+ UHC.Util.CompileRun3: instance UHC.Util.CompileRun3.CompileRunner state n pos loc u i e m => GHC.Base.Applicative (UHC.Util.CompileRun3.CompilePhaseT n u i e m)
+ UHC.Util.CompileRun3: instance UHC.Util.CompileRun3.CompileRunner state n pos loc u i e m => GHC.Base.Functor (UHC.Util.CompileRun3.CompilePhaseT n u i e m)
+ UHC.Util.CompileRun3: instance UHC.Util.CompileRun3.CompileRunner state n pos loc u i e m => GHC.Base.Monad (UHC.Util.CompileRun3.CompilePhaseT n u i e m)
+ UHC.Util.CompileRun3: instance UHC.Util.Error.Error (UHC.Util.CompileRun3.CompileRunState err)
+ UHC.Util.DependencyGraph: instance (GHC.Classes.Ord n, UHC.Util.PrettySimple.PP n) => UHC.Util.PrettySimple.PP (UHC.Util.DependencyGraph.DpdGr n)
+ UHC.Util.DependencyGraph: instance GHC.Show.Show (Data.Graph.SCC n)
+ UHC.Util.DependencyGraph: instance GHC.Show.Show (UHC.Util.DependencyGraph.DpdGr n)
+ UHC.Util.DependencyGraph: instance UHC.Util.PrettySimple.PP n => UHC.Util.PrettySimple.PP (Data.Graph.SCC n)
+ UHC.Util.Error: class Error a where noMsg = strMsg "" strMsg _ = noMsg
+ UHC.Util.Error: mapError :: (Either e a -> Either e' b) -> Except e a -> Except e' b
+ UHC.Util.Error: mapErrorT :: (m (Either e a) -> n (Either e' b)) -> ExceptT e m a -> ExceptT e' n b
+ UHC.Util.Error: noMsg :: Error a => a
+ UHC.Util.Error: runError :: Except e a -> Either e a
+ UHC.Util.Error: runErrorT :: ExceptT e m a -> m (Either e a)
+ UHC.Util.Error: strMsg :: Error a => String -> a
+ UHC.Util.Error: type ErrorT = ExceptT
+ UHC.Util.Error: withError :: (e -> e') -> Except e a -> Except e' a
+ UHC.Util.Error: withErrorT :: Functor m => (e -> e') -> ExceptT e m a -> ExceptT e' m a
+ UHC.Util.FPath: [fpathBase] :: FPath -> !String
+ UHC.Util.FPath: [fpathMbDir] :: FPath -> !(Maybe FilePath)
+ UHC.Util.FPath: [fpathMbSuff] :: FPath -> !(Maybe String)
+ UHC.Util.FPath: instance GHC.Classes.Eq UHC.Util.FPath.FPath
+ UHC.Util.FPath: instance GHC.Classes.Ord UHC.Util.FPath.FPath
+ UHC.Util.FPath: instance GHC.Generics.Constructor UHC.Util.FPath.C1_0FPath
+ UHC.Util.FPath: instance GHC.Generics.Datatype UHC.Util.FPath.D1FPath
+ UHC.Util.FPath: instance GHC.Generics.Generic UHC.Util.FPath.FPath
+ UHC.Util.FPath: instance GHC.Generics.Selector UHC.Util.FPath.S1_0_0FPath
+ UHC.Util.FPath: instance GHC.Generics.Selector UHC.Util.FPath.S1_0_1FPath
+ UHC.Util.FPath: instance GHC.Generics.Selector UHC.Util.FPath.S1_0_2FPath
+ UHC.Util.FPath: instance GHC.Show.Show UHC.Util.FPath.FPath
+ UHC.Util.FPath: instance UHC.Util.FPath.FPATH GHC.Base.String
+ UHC.Util.FPath: instance UHC.Util.FPath.FPATH UHC.Util.FPath.FPath
+ UHC.Util.FPath: instance UHC.Util.FPath.FPathError GHC.Base.String
+ UHC.Util.FPath: searchLocationsForReadableFilesWith :: (loc -> FPath -> [(loc, FPath, [e])]) -> Bool -> [loc] -> FileSuffixesWith s -> FPath -> IO [(FPath, loc, s, [e])]
+ UHC.Util.FPath: type FileSuffixWith x = (Maybe String, x)
+ UHC.Util.FPath: type FileSuffixesWith x = [FileSuffixWith x]
+ UHC.Util.FastSeq: instance GHC.Base.Monoid (UHC.Util.FastSeq.FastSeq a)
+ UHC.Util.Hashable: instance (Data.Hashable.Class.Hashable a, Data.Hashable.Class.Hashable b) => Data.Hashable.Class.Hashable (Data.Map.Base.Map a b)
+ UHC.Util.Hashable: instance Data.Hashable.Class.Hashable UHC.Util.FPath.FPath
+ UHC.Util.Hashable: instance Data.Hashable.Class.Hashable a => Data.Hashable.Class.Hashable (Data.Set.Base.Set a)
+ UHC.Util.Nm: [nmMbSel] :: Nm' s -> Maybe s
+ UHC.Util.Nm: [nmNm] :: Nm' s -> Nm' s
+ UHC.Util.Nm: [nmQual] :: Nm' s -> s
+ UHC.Util.Nm: [nmStr] :: Nm' s -> s
+ UHC.Util.Nm: instance GHC.Base.Functor UHC.Util.Nm.Nm'
+ UHC.Util.Nm: instance GHC.Classes.Eq s => GHC.Classes.Eq (UHC.Util.Nm.Nm' s)
+ UHC.Util.Nm: instance GHC.Classes.Ord s => GHC.Classes.Ord (UHC.Util.Nm.Nm' s)
+ UHC.Util.Nm: instance GHC.Show.Show UHC.Util.Nm.Nm
+ UHC.Util.Nm: instance UHC.Util.FPath.FPATH UHC.Util.Nm.Nm
+ UHC.Util.Nm: instance UHC.Util.Nm.NM GHC.Base.String
+ UHC.Util.Nm: instance UHC.Util.Nm.NM GHC.Types.Int
+ UHC.Util.Nm: instance UHC.Util.Nm.NM UHC.Util.Nm.Nm
+ UHC.Util.Nm: instance UHC.Util.PrettySimple.PP UHC.Util.Nm.Nm
+ UHC.Util.ParseErrPrettyPrint: instance (GHC.Classes.Eq s, GHC.Show.Show s, GHC.Show.Show p, UU.Scanner.Position.Position p) => UHC.Util.PrettySimple.PP (UU.Parsing.MachineInterface.Message s p)
+ UHC.Util.Pretty: instance (UHC.Util.PrettySimple.PP a, UHC.Util.PrettySimple.PP b) => UHC.Util.PrettySimple.PP (a, b)
+ UHC.Util.Pretty: instance UHC.Util.PrettySimple.PP GHC.Types.Bool
+ UHC.Util.Pretty: instance UHC.Util.PrettySimple.PP UHC.Util.FPath.FPath
+ UHC.Util.Pretty: instance UHC.Util.PrettySimple.PP UHC.Util.Time.ClockTime
+ UHC.Util.Pretty: instance UHC.Util.PrettySimple.PP a => UHC.Util.PrettySimple.PP (GHC.Base.Maybe a)
+ UHC.Util.PrettySimple: instance GHC.Show.Show UHC.Util.PrettySimple.PP_Doc
+ UHC.Util.PrettySimple: instance UHC.Util.PrettySimple.PP GHC.Integer.Type.Integer
+ UHC.Util.PrettySimple: instance UHC.Util.PrettySimple.PP GHC.Types.Char
+ UHC.Util.PrettySimple: instance UHC.Util.PrettySimple.PP GHC.Types.Float
+ UHC.Util.PrettySimple: instance UHC.Util.PrettySimple.PP GHC.Types.Int
+ UHC.Util.PrettySimple: instance UHC.Util.PrettySimple.PP UHC.Util.PrettySimple.PP_Doc
+ UHC.Util.PrettySimple: instance UHC.Util.PrettySimple.PP a => UHC.Util.PrettySimple.PP [a]
+ UHC.Util.RelMap: instance (GHC.Classes.Ord b, GHC.Classes.Ord a, Data.Binary.Class.Binary a, Data.Binary.Class.Binary b) => Data.Binary.Class.Binary (UHC.Util.RelMap.Rel a b)
+ UHC.Util.RelMap: instance (GHC.Classes.Ord b, GHC.Classes.Ord a, UHC.Util.Serialize.Serialize a, UHC.Util.Serialize.Serialize b) => UHC.Util.Serialize.Serialize (UHC.Util.RelMap.Rel a b)
+ UHC.Util.ScanUtils: [infpLine, infpColumn] :: InFilePos -> Int
+ UHC.Util.ScanUtils: [scoAllowFloat] :: ScanOpts -> !Bool
+ UHC.Util.ScanUtils: [scoAllowQualified] :: ScanOpts -> !Bool
+ UHC.Util.ScanUtils: [scoCommandsTxt] :: ScanOpts -> !(Set String)
+ UHC.Util.ScanUtils: [scoDollarIdent] :: ScanOpts -> !Bool
+ UHC.Util.ScanUtils: [scoKeywExtraChars] :: ScanOpts -> !(Set Char)
+ UHC.Util.ScanUtils: [scoKeywordsOps] :: ScanOpts -> !(Set String)
+ UHC.Util.ScanUtils: [scoKeywordsTxt] :: ScanOpts -> !(Set String)
+ UHC.Util.ScanUtils: [scoLitmode] :: ScanOpts -> !Bool
+ UHC.Util.ScanUtils: [scoOffsideClose] :: ScanOpts -> !String
+ UHC.Util.ScanUtils: [scoOffsideModule] :: ScanOpts -> !String
+ UHC.Util.ScanUtils: [scoOffsideOpen] :: ScanOpts -> !String
+ UHC.Util.ScanUtils: [scoOffsideTrigsGE] :: ScanOpts -> ![String]
+ UHC.Util.ScanUtils: [scoOffsideTrigs] :: ScanOpts -> ![String]
+ UHC.Util.ScanUtils: [scoOpChars] :: ScanOpts -> !(Set Char)
+ UHC.Util.ScanUtils: [scoPragmasTxt] :: ScanOpts -> !(Set String)
+ UHC.Util.ScanUtils: [scoSpecChars] :: ScanOpts -> !(Set Char)
+ UHC.Util.ScanUtils: [scoSpecPairs] :: ScanOpts -> !(Set String)
+ UHC.Util.ScanUtils: [scoStringDelims] :: ScanOpts -> !String
+ UHC.Util.ScanUtils: [scoVerbOpenClose] :: ScanOpts -> ![(String, String)]
+ UHC.Util.ScanUtils: instance GHC.Classes.Eq UHC.Util.ScanUtils.InFilePos
+ UHC.Util.ScanUtils: instance GHC.Classes.Ord UHC.Util.ScanUtils.InFilePos
+ UHC.Util.ScanUtils: instance GHC.Show.Show UHC.Util.ScanUtils.InFilePos
+ UHC.Util.ScanUtils: instance UHC.Util.PrettySimple.PP UU.Scanner.Position.Pos
+ UHC.Util.ScanUtils: instance UU.Scanner.Position.Position (UU.Scanner.GenToken.GenToken k t v)
+ UHC.Util.ScanUtils: instance UU.Scanner.Position.Position p => UU.Scanner.Position.Position (GHC.Base.Maybe p)
+ UHC.Util.ScopeMapGam: instance (Data.Data.Data k, Data.Data.Data v, GHC.Classes.Ord k) => Data.Data.Data (UHC.Util.ScopeMapGam.SGam k v)
+ UHC.Util.ScopeMapGam: instance (GHC.Classes.Ord k, UHC.Util.Serialize.Serialize k, UHC.Util.Serialize.Serialize v) => UHC.Util.Serialize.Serialize (UHC.Util.ScopeMapGam.SGam k v)
+ UHC.Util.ScopeMapGam: instance Data.Data.Data v => Data.Data.Data (UHC.Util.ScopeMapGam.SGamElt v)
+ UHC.Util.ScopeMapGam: instance GHC.Generics.Constructor UHC.Util.ScopeMapGam.C1_0SGam
+ UHC.Util.ScopeMapGam: instance GHC.Generics.Constructor UHC.Util.ScopeMapGam.C1_0SGamElt
+ UHC.Util.ScopeMapGam: instance GHC.Generics.Datatype UHC.Util.ScopeMapGam.D1SGam
+ UHC.Util.ScopeMapGam: instance GHC.Generics.Datatype UHC.Util.ScopeMapGam.D1SGamElt
+ UHC.Util.ScopeMapGam: instance GHC.Generics.Generic (UHC.Util.ScopeMapGam.SGam k v)
+ UHC.Util.ScopeMapGam: instance GHC.Generics.Generic (UHC.Util.ScopeMapGam.SGamElt v)
+ UHC.Util.ScopeMapGam: instance GHC.Generics.Selector UHC.Util.ScopeMapGam.S1_0_0SGam
+ UHC.Util.ScopeMapGam: instance GHC.Generics.Selector UHC.Util.ScopeMapGam.S1_0_0SGamElt
+ UHC.Util.ScopeMapGam: instance GHC.Generics.Selector UHC.Util.ScopeMapGam.S1_0_1SGam
+ UHC.Util.ScopeMapGam: instance GHC.Generics.Selector UHC.Util.ScopeMapGam.S1_0_1SGamElt
+ UHC.Util.ScopeMapGam: instance GHC.Generics.Selector UHC.Util.ScopeMapGam.S1_0_2SGam
+ UHC.Util.ScopeMapGam: instance GHC.Show.Show (UHC.Util.ScopeMapGam.SGam k v)
+ UHC.Util.ScopeMapGam: instance UHC.Util.Serialize.Serialize v => UHC.Util.Serialize.Serialize (UHC.Util.ScopeMapGam.SGamElt v)
+ UHC.Util.Serialize: class Generic a
+ UHC.Util.Serialize: instance (GHC.Classes.Ord a, UHC.Util.Serialize.Serialize a) => UHC.Util.Serialize.Serialize (Data.Set.Base.Set a)
+ UHC.Util.Serialize: instance (GHC.Classes.Ord k, UHC.Util.Serialize.Serialize k, UHC.Util.Serialize.Serialize e) => UHC.Util.Serialize.Serialize (Data.Map.Base.Map k e)
+ UHC.Util.Serialize: instance (GHC.Generics.Datatype d, UHC.Util.Serialize.SerializeSum x) => UHC.Util.Serialize.GSerialize (GHC.Generics.D1 d x)
+ UHC.Util.Serialize: instance (UHC.Util.Serialize.Serialize a, UHC.Util.Serialize.Serialize b) => UHC.Util.Serialize.Serialize (a, b)
+ UHC.Util.Serialize: instance (UHC.Util.Serialize.Serialize a, UHC.Util.Serialize.Serialize b, UHC.Util.Serialize.Serialize c) => UHC.Util.Serialize.Serialize (a, b, c)
+ UHC.Util.Serialize: instance (UHC.Util.Serialize.SerializeProduct a, UHC.Util.Serialize.SerializeProduct b) => UHC.Util.Serialize.SerializeProduct (a GHC.Generics.:*: b)
+ UHC.Util.Serialize: instance (UHC.Util.Serialize.SerializeProduct x, GHC.Generics.Constructor c) => UHC.Util.Serialize.SerializeSum (GHC.Generics.C1 c x)
+ UHC.Util.Serialize: instance (UHC.Util.Serialize.SerializeSum a, UHC.Util.Serialize.SerializeSum b) => UHC.Util.Serialize.SerializeSum (a GHC.Generics.:+: b)
+ UHC.Util.Serialize: instance Data.Binary.Class.Binary UHC.Util.Serialize.SCmd
+ UHC.Util.Serialize: instance GHC.Enum.Enum UHC.Util.Serialize.SCmd
+ UHC.Util.Serialize: instance UHC.Util.Serialize.Serialize ()
+ UHC.Util.Serialize: instance UHC.Util.Serialize.Serialize GHC.Int.Int16
+ UHC.Util.Serialize: instance UHC.Util.Serialize.Serialize GHC.Int.Int32
+ UHC.Util.Serialize: instance UHC.Util.Serialize.Serialize GHC.Int.Int64
+ UHC.Util.Serialize: instance UHC.Util.Serialize.Serialize GHC.Integer.Type.Integer
+ UHC.Util.Serialize: instance UHC.Util.Serialize.Serialize GHC.Types.Bool
+ UHC.Util.Serialize: instance UHC.Util.Serialize.Serialize GHC.Types.Char
+ UHC.Util.Serialize: instance UHC.Util.Serialize.Serialize GHC.Types.Int
+ UHC.Util.Serialize: instance UHC.Util.Serialize.Serialize GHC.Word.Word16
+ UHC.Util.Serialize: instance UHC.Util.Serialize.Serialize GHC.Word.Word32
+ UHC.Util.Serialize: instance UHC.Util.Serialize.Serialize GHC.Word.Word64
+ UHC.Util.Serialize: instance UHC.Util.Serialize.Serialize a => UHC.Util.Serialize.Serialize (GHC.Base.Maybe a)
+ UHC.Util.Serialize: instance UHC.Util.Serialize.Serialize a => UHC.Util.Serialize.Serialize [a]
+ UHC.Util.Serialize: instance UHC.Util.Serialize.Serialize x => UHC.Util.Serialize.SerializeProduct (GHC.Generics.K1 i x)
+ UHC.Util.Serialize: instance UHC.Util.Serialize.SerializeProduct GHC.Generics.U1
+ UHC.Util.Serialize: instance UHC.Util.Serialize.SerializeProduct x => UHC.Util.Serialize.SerializeProduct (GHC.Generics.S1 s x)
+ UHC.Util.Utils: breakM :: Monad m => (a -> Bool) -> [m a] -> m ([a], Maybe (a, [m a]))
+ UHC.Util.Utils: class DataAndConName x where dataAndConName = gDataAndConName . from
+ UHC.Util.Utils: dataAndConName :: DataAndConName x => x -> (String, String)
+ UHC.Util.Utils: fst3 :: (t, t1, t2) -> t
+ UHC.Util.Utils: fst4 :: (t, t1, t2, t3) -> t
+ UHC.Util.Utils: fth :: (t, t1, t2, t3) -> t3
+ UHC.Util.Utils: fth4 :: (t, t1, t2, t3) -> t3
+ UHC.Util.Utils: instance (GHC.Generics.Datatype d, UHC.Util.Utils.GDataAndConName x) => UHC.Util.Utils.GDataAndConName (GHC.Generics.D1 d x)
+ UHC.Util.Utils: instance (UHC.Util.Utils.GDataAndConName a, UHC.Util.Utils.GDataAndConName b) => UHC.Util.Utils.GDataAndConName (a GHC.Generics.:+: b)
+ UHC.Util.Utils: instance GHC.Generics.Constructor c => UHC.Util.Utils.GDataAndConName (GHC.Generics.C1 c x)
+ UHC.Util.Utils: showUnprefixed :: (DataAndConName x) => Int -> x -> String
+ UHC.Util.Utils: showUnprefixedWithShowTypeable :: (Show x, Typeable x) => Int -> x -> String
+ UHC.Util.Utils: snd3 :: (t, t1, t2) -> t1
+ UHC.Util.Utils: snd4 :: (t, t1, t2, t3) -> t1
+ UHC.Util.Utils: thd :: (t, t1, t2) -> t2
+ UHC.Util.Utils: thd3 :: (t, t1, t2) -> t2
+ UHC.Util.Utils: thd4 :: (t, t1, t2, t3) -> t2
+ UHC.Util.Utils: tup1234to1 :: (t, t1, t2, t3) -> t
+ UHC.Util.Utils: tup1234to12 :: (t2, t3, t, t1) -> (t2, t3)
+ UHC.Util.Utils: tup1234to123 :: (t1, t2, t3, t) -> (t1, t2, t3)
+ UHC.Util.Utils: tup1234to124 :: (t1, t2, t, t3) -> (t1, t2, t3)
+ UHC.Util.Utils: tup1234to13 :: (t2, t, t3, t1) -> (t2, t3)
+ UHC.Util.Utils: tup1234to134 :: (t1, t, t2, t3) -> (t1, t2, t3)
+ UHC.Util.Utils: tup1234to14 :: (t2, t, t1, t3) -> (t2, t3)
+ UHC.Util.Utils: tup1234to2 :: (t, t1, t2, t3) -> t1
+ UHC.Util.Utils: tup1234to23 :: (t, t2, t3, t1) -> (t2, t3)
+ UHC.Util.Utils: tup1234to234 :: (t, t1, t2, t3) -> (t1, t2, t3)
+ UHC.Util.Utils: tup1234to24 :: (t, t2, t1, t3) -> (t2, t3)
+ UHC.Util.Utils: tup1234to3 :: (t, t1, t2, t3) -> t2
+ UHC.Util.Utils: tup1234to34 :: (t, t1, t2, t3) -> (t2, t3)
+ UHC.Util.Utils: tup1234to4 :: (t, t1, t2, t3) -> t3
+ UHC.Util.Utils: tup123to1234 :: t3 -> (t, t1, t2) -> (t, t1, t2, t3)
+ UHC.Util.VarLookup: instance (UHC.Util.VarLookup.VarLookup m1 k v, UHC.Util.VarLookup.VarLookup m2 k v) => UHC.Util.VarLookup.VarLookup (m1, m2) k v
+ UHC.Util.VarLookup: instance (UHC.Util.VarLookup.VarLookupCmb m1 m1, UHC.Util.VarLookup.VarLookupCmb m1 m2) => UHC.Util.VarLookup.VarLookupCmb [m1] [m2]
+ UHC.Util.VarLookup: instance UHC.Util.VarLookup.VarLookup m k v => UHC.Util.VarLookup.VarLookup [m] k v
+ UHC.Util.VarLookup: instance UHC.Util.VarLookup.VarLookupCmb m1 m2 => UHC.Util.VarLookup.VarLookupCmb m1 [m2]
+ UHC.Util.VarMp: [varmpMetaLev] :: VarMp' k v -> !MetaLev
+ UHC.Util.VarMp: [varmpMpL] :: VarMp' k v -> [Map k v]
+ UHC.Util.VarMp: instance (Data.Data.Data k, Data.Data.Data v, GHC.Classes.Ord k) => Data.Data.Data (UHC.Util.VarMp.VarMp' k v)
+ UHC.Util.VarMp: instance (GHC.Classes.Eq k, GHC.Classes.Eq v) => GHC.Classes.Eq (UHC.Util.VarMp.VarMp' k v)
+ UHC.Util.VarMp: instance (GHC.Classes.Ord k, GHC.Classes.Ord v) => GHC.Classes.Ord (UHC.Util.VarMp.VarMp' k v)
+ UHC.Util.VarMp: instance (GHC.Classes.Ord k, UHC.Util.Serialize.Serialize k, UHC.Util.Serialize.Serialize v) => UHC.Util.Serialize.Serialize (UHC.Util.VarMp.VarMp' k v)
+ UHC.Util.VarMp: instance (UHC.Util.PrettySimple.PP k, UHC.Util.PrettySimple.PP v) => UHC.Util.PrettySimple.PP (UHC.Util.VarMp.VarMp' k v)
+ UHC.Util.VarMp: instance (UHC.Util.PrettySimple.PP k, UHC.Util.PrettySimple.PP v) => UHC.Util.PrettySimple.PP (UHC.Util.VarMp.VarMpStk' k v)
+ UHC.Util.VarMp: instance GHC.Classes.Ord k => UHC.Util.VarLookup.VarLookup (UHC.Util.VarMp.VarMp' k v) k v
+ UHC.Util.VarMp: instance GHC.Classes.Ord k => UHC.Util.VarLookup.VarLookup (UHC.Util.VarMp.VarMpStk' k v) k v
+ UHC.Util.VarMp: instance GHC.Classes.Ord k => UHC.Util.VarLookup.VarLookupCmb (UHC.Util.VarMp.VarMp' k v) (UHC.Util.VarMp.VarMp' k v)
+ UHC.Util.VarMp: instance GHC.Classes.Ord k => UHC.Util.VarLookup.VarLookupCmb (UHC.Util.VarMp.VarMpStk' k v) (UHC.Util.VarMp.VarMpStk' k v)
+ UHC.Util.VarMp: instance GHC.Generics.Constructor UHC.Util.VarMp.C1_0VarMp'
+ UHC.Util.VarMp: instance GHC.Generics.Datatype UHC.Util.VarMp.D1VarMp'
+ UHC.Util.VarMp: instance GHC.Generics.Generic (UHC.Util.VarMp.VarMp' k v)
+ UHC.Util.VarMp: instance GHC.Generics.Selector UHC.Util.VarMp.S1_0_0VarMp'
+ UHC.Util.VarMp: instance GHC.Generics.Selector UHC.Util.VarMp.S1_0_1VarMp'
+ UHC.Util.VarMp: instance GHC.Show.Show (UHC.Util.VarMp.VarMp' k v)
+ UHC.Util.VarMp: instance GHC.Show.Show (UHC.Util.VarMp.VarMpStk' k v)
+ UHC.Util.VarMp: instance UHC.Util.VarLookup.VarLookupBase (UHC.Util.VarMp.VarMp' k v) k v
- UHC.Util.CompileRun: cpFindFileForNameOrFPath :: FPATH n => String -> n -> FPath -> [(String, FPath)]
+ UHC.Util.CompileRun: cpFindFileForNameOrFPath :: (FPATH n) => String -> n -> FPath -> [(String, FPath)]
- UHC.Util.CompileRun: cpPPMsg :: PP m => m -> CompilePhase n u i e ()
+ UHC.Util.CompileRun: cpPPMsg :: (PP m) => m -> CompilePhase n u i e ()
- UHC.Util.CompileRun2: cpFindFileForNameOrFPath :: FPATH n => String -> n -> FPath -> [(String, FPath)]
+ UHC.Util.CompileRun2: cpFindFileForNameOrFPath :: (FPATH n) => String -> n -> FPath -> [(String, FPath)]
- UHC.Util.CompileRun2: cpFindFilesForFPath :: (Ord n, FPATH n, FileLocatable u String, CompileRunner s n p String u i e m) => Bool -> [(FileSuffix, s)] -> [String] -> Maybe n -> Maybe FPath -> CompilePhaseT n u i e m [FPath]
+ UHC.Util.CompileRun2: cpFindFilesForFPath :: (Ord n, FPATH n, FileLocatable u String, CompileRunner s n p String u i e m) => Bool -> [FileSuffixWith s] -> [String] -> Maybe n -> Maybe FPath -> CompilePhaseT n u i e m [FPath]
- UHC.Util.CompileRun2: cpFindFilesForFPathInLocations :: (Ord n, FPATH n, FileLocatable u loc, Show loc, CompileRunner s n p loc u i e m) => (loc -> n -> FPath -> [(loc, FPath, [e])]) -> ((FPath, loc, [e]) -> res) -> Bool -> [(FileSuffix, s)] -> [loc] -> Maybe n -> Maybe FPath -> CompilePhaseT n u i e m [res]
+ UHC.Util.CompileRun2: cpFindFilesForFPathInLocations :: (Ord n, FPATH n, FileLocatable u loc, Show loc, CompileRunner s n p loc u i e m) => (loc -> n -> FPath -> [(loc, FPath, [e])]) -> ((FPath, loc, s, [e]) -> res) -> Bool -> [(FileSuffixWith s)] -> [loc] -> Maybe n -> Maybe FPath -> CompilePhaseT n u i e m [res]
- UHC.Util.CompileRun3: cpFindFileForNameOrFPath :: FPATH n => String -> n -> FPath -> [(String, FPath)]
+ UHC.Util.CompileRun3: cpFindFileForNameOrFPath :: (FPATH n) => String -> n -> FPath -> [(String, FPath)]
- UHC.Util.Control.Monad: liftM6 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m a6 -> m r
+ UHC.Util.Control.Monad: liftM6 :: (Monad m) => (a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m a6 -> m r
- UHC.Util.Control.Monad: liftM7 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m a6 -> m a7 -> m r
+ UHC.Util.Control.Monad: liftM7 :: (Monad m) => (a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m a6 -> m a7 -> m r
- UHC.Util.Control.Monad: liftM8 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m a6 -> m a7 -> m a8 -> m r
+ UHC.Util.Control.Monad: liftM8 :: (Monad m) => (a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m a6 -> m a7 -> m a8 -> m r
- UHC.Util.Control.Monad: liftM9 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m a6 -> m a7 -> m a8 -> m a9 -> m r
+ UHC.Util.Control.Monad: liftM9 :: (Monad m) => (a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m a6 -> m a7 -> m a8 -> m a9 -> m r
- UHC.Util.ParseUtils: pAnyFromMap :: IsParser p s => (k -> p a1) -> Map k v -> p v
+ UHC.Util.ParseUtils: pAnyFromMap :: (IsParser p s) => (k -> p a1) -> Map k v -> p v
- UHC.Util.ParseUtils: pAnyKey :: IsParser p s => (a1 -> p a) -> [a1] -> p a
+ UHC.Util.ParseUtils: pAnyKey :: (IsParser p s) => (a1 -> p a) -> [a1] -> p a
- UHC.Util.ParseUtils: pMaybe :: IsParser p s => a1 -> (a -> a1) -> p a -> p a1
+ UHC.Util.ParseUtils: pMaybe :: (IsParser p s) => a1 -> (a -> a1) -> p a -> p a1
- UHC.Util.ParseUtils: pMb :: IsParser p s => p a -> p (Maybe a)
+ UHC.Util.ParseUtils: pMb :: (IsParser p s) => p a -> p (Maybe a)
- UHC.Util.Pretty: ppBlockWithStrings :: PP a => String -> String -> String -> [a] -> PP_Doc
+ UHC.Util.Pretty: ppBlockWithStrings :: (PP a) => String -> String -> String -> [a] -> PP_Doc
- UHC.Util.Pretty: ppBlockWithStrings' :: PP a => String -> String -> String -> [a] -> [PP_Doc]
+ UHC.Util.Pretty: ppBlockWithStrings' :: (PP a) => String -> String -> String -> [a] -> [PP_Doc]
- UHC.Util.Pretty: ppBlockWithStringsH :: PP a => String -> String -> String -> [a] -> PP_Doc
+ UHC.Util.Pretty: ppBlockWithStringsH :: (PP a) => String -> String -> String -> [a] -> PP_Doc
- UHC.Util.Pretty: ppPackedWithStrings :: PP p => String -> String -> p -> PP_Doc
+ UHC.Util.Pretty: ppPackedWithStrings :: (PP p) => String -> String -> p -> PP_Doc
- UHC.Util.RelMap: apply :: Ord a => Rel a b -> a -> [b]
+ UHC.Util.RelMap: apply :: (Ord a) => Rel a b -> a -> [b]
- UHC.Util.RelMap: applyDom :: Ord a => Rel a b -> a -> Maybe b
+ UHC.Util.RelMap: applyDom :: (Ord a) => Rel a b -> a -> Maybe b
- UHC.Util.RelMap: applyDomMbSet :: Ord a => Rel a b -> a -> Maybe (Set b)
+ UHC.Util.RelMap: applyDomMbSet :: (Ord a) => Rel a b -> a -> Maybe (Set b)
- UHC.Util.RelMap: applyDomSet :: Ord a => Rel a b -> a -> Set b
+ UHC.Util.RelMap: applyDomSet :: (Ord a) => Rel a b -> a -> Set b
- UHC.Util.RelMap: applyInverse :: Ord b => Rel a b -> b -> [a]
+ UHC.Util.RelMap: applyInverse :: (Ord b) => Rel a b -> b -> [a]
- UHC.Util.RelMap: applyRng :: Ord b => Rel a b -> b -> Maybe a
+ UHC.Util.RelMap: applyRng :: (Ord b) => Rel a b -> b -> Maybe a
- UHC.Util.RelMap: applyRngMbSet :: Ord b => Rel a b -> b -> Maybe (Set a)
+ UHC.Util.RelMap: applyRngMbSet :: (Ord b) => Rel a b -> b -> Maybe (Set a)
- UHC.Util.RelMap: applyRngSet :: Ord b => Rel a b -> b -> Set a
+ UHC.Util.RelMap: applyRngSet :: (Ord b) => Rel a b -> b -> Set a
- UHC.Util.RelMap: lookup :: Ord a => a -> Rel a b -> Maybe b
+ UHC.Util.RelMap: lookup :: (Ord a) => a -> Rel a b -> Maybe b
- UHC.Util.RelMap: lookupDom :: Ord a => a -> Rel a b -> Maybe b
+ UHC.Util.RelMap: lookupDom :: (Ord a) => a -> Rel a b -> Maybe b
- UHC.Util.RelMap: lookupInverse :: Ord b => b -> Rel a b -> Maybe a
+ UHC.Util.RelMap: lookupInverse :: (Ord b) => b -> Rel a b -> Maybe a
- UHC.Util.RelMap: lookupRng :: Ord b => b -> Rel a b -> Maybe a
+ UHC.Util.RelMap: lookupRng :: (Ord b) => b -> Rel a b -> Maybe a
- UHC.Util.ScanUtils: InFilePos :: Int -> Int -> InFilePos
+ UHC.Util.ScanUtils: InFilePos :: Int -> InFilePos
- UHC.Util.ScopeMapGam: sgamFilterMapEltAccumWithKey :: Ord k' => (k -> SGamElt v -> Bool) -> (k -> SGamElt v -> acc -> (k', SGamElt v', acc)) -> (k -> SGamElt v -> acc -> acc) -> acc -> SGam k v -> (SGam k' v', acc)
+ UHC.Util.ScopeMapGam: sgamFilterMapEltAccumWithKey :: (Ord k') => (k -> SGamElt v -> Bool) -> (k -> SGamElt v -> acc -> (k', SGamElt v', acc)) -> (k -> SGamElt v -> acc -> acc) -> acc -> SGam k v -> (SGam k' v', acc)
- UHC.Util.Serialize: class Serialize x where sputNested = panic "not implemented (must be done by instance): Serialize.sputNested" sgetNested = panic "not implemented (must be done by instance): Serialize.sgetNested"
+ UHC.Util.Serialize: class Serialize x where sput = gsput . from sget = to <$> gsget sputNested = panic "not implemented (must be done by instance): Serialize.sputNested" sgetNested = panic "not implemented (must be done by instance): Serialize.sgetNested"

Files

src/UHC/Util/CompileRun.hs view
@@ -48,7 +48,8 @@ import           System.Exit import           Control.Monad import           Control.Applicative(Applicative(..))-import           Control.Monad.Error as ME+import           UHC.Util.Error as ME+-- import           Control.Monad.Error as ME import           Control.Monad.State import           System.IO import qualified Data.Map as Map@@ -489,13 +490,13 @@   :: ( Ord n      , FPATH n, FileLocatable u loc, Show loc      , CompileUnitState s,CompileRunError e p,CompileUnit u n loc s,CompileModName n,CompileRunStateInfo i n p-     ) => (loc -> n -> FPath -> [(loc,FPath,[e])])		-- ^ get the locations for a name, possibly with errors-       -> ((FPath,loc,[e]) -> res)						-- ^ construct a result given a found location-       -> Bool											-- ^ stop when first is found-       -> [(FileSuffix,s)]								-- ^ suffix info-       -> [loc]											-- ^ locations to search-       -> Maybe n										-- ^ possibly a module name-       -> Maybe FPath									-- ^ possibly a file path+     ) => (loc -> n -> FPath -> [(loc,FPath,[e])])      -- ^ get the locations for a name, possibly with errors+       -> ((FPath,loc,[e]) -> res)                      -- ^ construct a result given a found location+       -> Bool                                          -- ^ stop when first is found+       -> [(FileSuffix,s)]                              -- ^ suffix info+       -> [loc]                                         -- ^ locations to search+       -> Maybe n                                       -- ^ possibly a module name+       -> Maybe FPath                                   -- ^ possibly a file path        -> CompilePhase n u i e [res] cpFindFilesForFPathInLocations getfp putres stopAtFirst suffs locs mbModNm mbFp   = do { cr <- get
src/UHC/Util/CompileRun2.hs view
@@ -56,7 +56,8 @@ import           Control.Monad import           Control.Monad.Fix import           Control.Applicative(Applicative(..))-import           Control.Monad.Error as ME+import           UHC.Util.Error as ME+-- import           Control.Monad.Error as ME import           Control.Monad.State import qualified Control.Exception as CE import           Control.Monad.Identity@@ -429,13 +430,13 @@   :: ( Ord n      , FPATH n, FileLocatable u loc, Show loc      , CompileRunner s n p loc u i e m-     ) => (loc -> n -> FPath -> [(loc,FPath,[e])])		-- ^ get the locations for a name, possibly with errors-       -> ((FPath,loc,[e]) -> res)						-- ^ construct a result given a found location-       -> Bool											-- ^ stop when first is found-       -> [(FileSuffix,s)]								-- ^ suffix info-       -> [loc]											-- ^ locations to search-       -> Maybe n										-- ^ possibly a module name-       -> Maybe FPath									-- ^ possibly a file path+     ) => (loc -> n -> FPath -> [(loc,FPath,[e])])      -- ^ get the locations for a name, possibly with errors+       -> ((FPath,loc,s,[e]) -> res)                        -- ^ construct a result given a found location+       -> Bool                                          -- ^ stop when first is found+       -> [(FileSuffixWith s)]                          -- ^ suffix info+       -> [loc]                                         -- ^ locations to search+       -> Maybe n                                       -- ^ possibly a module name+       -> Maybe FPath                                   -- ^ possibly a file path        -> CompilePhaseT n u i e m [res] cpFindFilesForFPathInLocations getfp putres stopAtFirst suffs locs mbModNm mbFp   = do { cr <- get@@ -444,19 +445,17 @@           then do { let fp = maybe (mkFPath $ panicJust ("cpFindFileForFPath") $ mbModNm) id mbFp                         modNm = maybe (mkCMNm $ fpathBase $ fp) id mbModNm                         suffs' = map fst suffs-                  ; fpsFound <- liftIO (searchLocationsForReadableFiles (\l f -> getfp l modNm f)-                                                                        stopAtFirst locs suffs' fp-                                       )+                  ; fpsFound <- liftIO $ searchLocationsForReadableFilesWith (\l f -> getfp l modNm f) stopAtFirst locs suffs fp                   ; case fpsFound of                       []                         -> do { cpSetErrs (creMkNotFoundErrL (crsiImportPosOfCUKey modNm (_crStateInfo cr)) (fpathToStr fp) (map show locs) suffs')                               ; return []                               }-                      ((_,_,e@(_:_)):_)+                      ((_,_,_,e@(_:_)):_)                         -> do { cpSetErrs e                               ; return []                               }-                      ffs@((ff,loc,_):_)+                      ffs@((ff,loc,s,_):_)                         -> do { cpUpdCU modNm (cuUpdLocation loc . cuUpdFPath ff . cuUpdState cus . cuUpdKey modNm)                               ; return (map putres ffs)                               }@@ -466,7 +465,7 @@                                                    Just c  -> c                                                    Nothing -> cusUnk                   }-          else return (maybe [] (\nm -> [putres (crCUFPath nm cr,crCULocation nm cr,[])]) mbModNm)+          else return (maybe [] (\nm -> [putres (crCUFPath nm cr, crCULocation nm cr, crCUState nm cr, [])]) mbModNm)        }  cpFindFilesForFPath@@ -474,9 +473,9 @@      ( Ord n      , FPATH n, FileLocatable u String      , CompileRunner s n p String u i e m-     ) => Bool -> [(FileSuffix,s)] -> [String] -> Maybe n -> Maybe FPath -> CompilePhaseT n u i e m [FPath]+     ) => Bool -> [FileSuffixWith s] -> [String] -> Maybe n -> Maybe FPath -> CompilePhaseT n u i e m [FPath] cpFindFilesForFPath-  = cpFindFilesForFPathInLocations (\l n f -> map (tup12to123 ([]::[e])) $ cpFindFileForNameOrFPath l n f) tup123to1+  = cpFindFilesForFPathInLocations (\l n f -> map (tup12to123 ([]::[e])) $ cpFindFileForNameOrFPath l n f) tup1234to1  cpFindFileForFPath   :: ( Ord n
src/UHC/Util/CompileRun3.hs view
@@ -59,7 +59,8 @@ import           Control.Monad import           Control.Monad.Fix import           Control.Applicative(Applicative(..))-import           Control.Monad.Error as ME+import           UHC.Util.Error as ME+-- import           Control.Monad.Error as ME import           Control.Monad.State import qualified Control.Exception as CE import           Control.Monad.Identity@@ -184,8 +185,8 @@  data CompileRun nm unit info err   = CompileRun-      { _crCUCache       :: Map.Map nm unit		-- cached compile units-      , _crNmForward     :: Map.Map nm nm		-- Forwarding mechanism for name changes+      { _crCUCache       :: Map.Map nm unit     -- cached compile units+      , _crNmForward     :: Map.Map nm nm       -- Forwarding mechanism for name changes       , _crCompileOrder  :: [[nm]]       , _crTopModNm      :: nm       , _crState         :: CompileRunState err@@ -474,13 +475,13 @@   :: ( Ord n, Show n      , FPATH n, FileLocatable u loc, Show loc      , CompileRunner s n p loc u i e m-     ) => (loc -> n -> FPath -> [(loc,FPath,[e])])		-- ^ get the locations for a name, possibly with errors-       -> ((FPath,loc,[e]) -> res)						-- ^ construct a result given a found location-       -> Bool											-- ^ stop when first is found-       -> [(FileSuffix,s)]								-- ^ suffix info-       -> [loc]											-- ^ locations to search-       -> Maybe n										-- ^ possibly a module name-       -> Maybe FPath									-- ^ possibly a file path+     ) => (loc -> n -> FPath -> [(loc,FPath,[e])])      -- ^ get the locations for a name, possibly with errors+       -> ((FPath,loc,[e]) -> res)                      -- ^ construct a result given a found location+       -> Bool                                          -- ^ stop when first is found+       -> [(FileSuffix,s)]                              -- ^ suffix info+       -> [loc]                                         -- ^ locations to search+       -> Maybe n                                       -- ^ possibly a module name+       -> Maybe FPath                                   -- ^ possibly a file path        -> CompilePhaseT n u i e m [res] cpFindFilesForFPathInLocations getfp putres stopAtFirst suffs locs mbModNm mbFp   = do { cr <- get
src/UHC/Util/DependencyGraph.hs view
@@ -33,7 +33,7 @@   = DpdGr       { dgGr    :: Graph       , dgGrT   :: Graph-      , dgEdges	:: [(n, n, [n])]+      , dgEdges :: [(n, n, [n])]       , dgV2N   :: Vertex -> (n, [n])       , dgK2V   :: n -> Maybe Vertex       }
+ src/UHC/Util/Error.hs view
@@ -0,0 +1,57 @@+{-# LANGUAGE CPP, NoMonomorphismRestriction #-}++-- | Wrapper module around Control.Monad.Error, in order to be backwards compatible as far as UHC is concerned.++module UHC.Util.Error+  (+# if __GLASGOW_HASKELL__ >= 710+    module Control.Monad.Except+  -- , module Control.Monad.Error.Class+  , Error(..)+  , ErrorT+  +  , runErrorT +  , withErrorT+  , mapErrorT ++  , runError  +  , withError +  , mapError  +# else+    module Control.Monad.Error+# endif+  )+  where++#if __GLASGOW_HASKELL__ >= 710+import Control.Monad.Except+-- import Control.Monad.Error.Class (Error(..))+#else+import Control.Monad.Error+#endif++#if __GLASGOW_HASKELL__ >= 710+type ErrorT = ExceptT++runErrorT  = runExceptT+withErrorT = withExceptT+mapErrorT  = mapExceptT++runError  = runExcept+withError = withExcept+mapError  = mapExcept++-- | Copied/old/deprecated functionality from Control.Monad.Error.Class+class Error a where+    -- | Creates an exception without a message.+    -- The default implementation is @'strMsg' \"\"@.+    noMsg  :: a+    -- | Creates an exception with a message.+    -- The default implementation of @'strMsg' s@ is 'noMsg'.+    strMsg :: String -> a++    noMsg    = strMsg ""+    strMsg _ = noMsg++#else+#endif
src/UHC/Util/FPath.hs view
@@ -30,11 +30,15 @@    -- * SearchPath   , SearchPath-  , FileSuffixes, FileSuffix+  , FileSuffixes, FileSuffixesWith+  , FileSuffix, FileSuffixWith   , mkInitSearchPath, searchPathFromFPath, searchPathFromFPaths   , searchPathFromString   , searchFPathFromLoc-  , searchLocationsForReadableFiles, searchPathForReadableFiles, searchPathForReadableFile+  , searchLocationsForReadableFilesWith+  , searchLocationsForReadableFiles+  , searchPathForReadableFiles+  , searchPathForReadableFile    , fpathEnsureExists @@ -351,7 +355,11 @@  type SearchPath = [String] type FileSuffix   =  Maybe String+-- | FileSuffix with extra payload+type FileSuffixWith x =  (Maybe String, x) type FileSuffixes = [FileSuffix]+-- | FileSuffix with extra payload+type FileSuffixesWith x = [FileSuffixWith x]  searchPathFromFPaths :: [FPath] -> SearchPath searchPathFromFPaths fpL = nub [ d | (Just d) <- map fpathMbDir fpL ] ++ [""]@@ -376,14 +384,51 @@ searchFPathFromLoc loc fp = [(loc,fpathPrependDir loc fp)]  -- | Search for file in locations, with possible suffices+searchLocationsForReadableFilesWith+  ::    (loc -> FPath -> [(loc,FPath,[e])])             -- ^ get the locations for a name, possibly with errors+     -> Bool                                            -- ^ stop when first is found+     -> [loc]                                           -- ^ locations to search+     -> FileSuffixesWith s                              -- ^ suffixes to try, with associated info+     -> FPath                                           -- ^ search for a path+     -> IO [(FPath,loc,s,[e])]+searchLocationsForReadableFilesWith getfp stopAtFirst locs suffs fp+  = let select stop f fps+          = foldM chk [] fps+          where chk r fp+                  = case r of+                      (_:_) | stop -> return r+                      _            -> do r' <- f fp+                                         return (r ++ r')+        tryToOpen loc (mbSuff,suffinfo) fp+          = do { let fp' = maybe fp (\suff -> fpathSetNonEmptySuff suff fp) mbSuff+               ; fExists <- doesFileExist (fpathToStr fp')+               -- ; hPutStrLn stderr (show fp ++ " - " ++ show fp')+               ; if fExists+                 then return [(fp',loc,suffinfo)]+                 else return []+               }+        tryToOpenWithSuffs suffs (loc,fp,x)+          = fmap (map (tup123to1234 x)) $+            case suffs of+              [] -> tryToOpen loc (Nothing,panic "searchLocationsForReadableFilesWith.tryToOpenWithSuffs.tryToOpen") fp+              _  -> select stopAtFirst+                      (\(ms,f) -> tryToOpen loc ms f)+                      ({- (Nothing,fp) : -} zip suffs (repeat fp))+        tryToOpenInDir loc+          = select True (tryToOpenWithSuffs suffs) (getfp loc fp)+     in select True tryToOpenInDir locs++-- | Search for file in locations, with possible suffices searchLocationsForReadableFiles-  ::    (loc -> FPath -> [(loc,FPath,[e])])				-- ^ get the locations for a name, possibly with errors-     -> Bool											-- ^ stop when first is found-     -> [loc]											-- ^ locations to search-     -> FileSuffixes									-- ^ suffixes to try-     -> FPath											-- ^ search for a path+  ::    (loc -> FPath -> [(loc,FPath,[e])])             -- ^ get the locations for a name, possibly with errors+     -> Bool                                            -- ^ stop when first is found+     -> [loc]                                           -- ^ locations to search+     -> FileSuffixes                                    -- ^ suffixes to try+     -> FPath                                           -- ^ search for a path      -> IO [(FPath,loc,[e])] searchLocationsForReadableFiles getfp stopAtFirst locs suffs fp+  = fmap (map tup1234to124) $ searchLocationsForReadableFilesWith getfp stopAtFirst locs (map (flip (,) ()) suffs) fp+{-   = let select stop f fps           = foldM chk [] fps           where chk r fp@@ -409,6 +454,7 @@         tryToOpenInDir loc           = select True (tryToOpenWithSuffs suffs) (getfp loc fp)      in select True tryToOpenInDir locs+-}  searchPathForReadableFiles :: Bool -> SearchPath -> FileSuffixes -> FPath -> IO [FPath] searchPathForReadableFiles stopAtFirst locs suffs fp
src/UHC/Util/FastSeq.hs view
@@ -14,7 +14,7 @@  import           Prelude hiding (null,map) import           Data.Monoid-import qualified Data.ListLike as LL+-- import qualified Data.ListLike as LL import qualified Data.List as L import qualified UHC.Util.Utils as U 
src/UHC/Util/Pretty.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE RankNTypes, TypeSynonymInstances #-}  ------------------------------------------------------------------------- -- Wrapper module around pretty printing@@ -86,6 +86,7 @@ import UHC.Util.PrettySimple import UHC.Util.Utils import UHC.Util.FPath+import UHC.Util.Time import System.IO import Data.List @@ -411,6 +412,12 @@  instance PP Bool where   pp = pp . show++instance PP ClockTime where+  pp = pp . show++instance PP FPath where+  pp = pp . fpathToStr  instance (PP a, PP b) => PP (a,b) where   pp (a,b) = "(" >|< a >-|-< "," >|< b >-|-< ")"
src/UHC/Util/ScopeMapGam.hs view
@@ -75,7 +75,7 @@       { sgeScpId    :: !Int                         -- ^ scope ident       , sgeVal      :: v                            -- ^ the value       }-  deriving (Typeable, Data)+  deriving (Typeable, Data, Generic)  type SMap k v = VarMp' k [SGamElt v] @@ -88,7 +88,7 @@       , sgScp       :: !Scp                         -- ^ scope stack       , sgMap       :: SMap k v                     -- ^ map holding the values       }-  deriving (Typeable, Data)+  deriving (Typeable, Data, Generic)  mkSGam :: SMap k v -> SGam k v mkSGam = SGam 0 [0]@@ -286,12 +286,12 @@   = g {sgMap = mapFilterInScp' scp (\(e:_) -> [e]) m}  instance (Serialize v) => Serialize (SGamElt v) where-  sput (SGamElt a b) = sput a >> sput b-  sget = liftM2 SGamElt sget sget+  -- sput (SGamElt a b) = sput a >> sput b+  -- sget = liftM2 SGamElt sget sget  instance (Ord k, Serialize k, Serialize v) => Serialize (SGam k v) where-  sput (SGam a b c) = sput a >> sput b >> sput c-  sget = liftM3 SGam sget sget sget+  -- sput (SGam a b c) = sput a >> sput b >> sput c+  -- sget = liftM3 SGam sget sget sget  -- instance (Binary v) => Serialize (SGamElt v) -- instance (Ord k, Binary k, Binary v) => Serialize (SGam k v)
src/UHC/Util/Serialize.hs view
@@ -69,6 +69,12 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} +-- for generics+{-# LANGUAGE TypeOperators #-}+{-# LANGUAGE DefaultSignatures #-}+{-# LANGUAGE TypeSynonymInstances #-}+{-# LANGUAGE FlexibleInstances #-}+ module UHC.Util.Serialize     ( SPut     , SGet@@ -83,6 +89,7 @@     , serialize, unserialize     , putSPutFile, getSGetFile     , putSerializeFile, getSerializeFile+    , Generic     )   where import qualified UHC.Util.Binary as Bn@@ -102,6 +109,10 @@ import qualified Control.Monad.State as St import           Control.Monad.Trans +-- for generics+import           GHC.Generics+import           Control.Applicative+ {- | Serialization with state. Shared values are stored in a per type map, to keep all type correct. To make this work a double mapping is maintained, keyed by the type@@ -168,7 +179,12 @@  class Serialize x where   sput :: x -> SPut+  default sput :: (Generic x, GSerialize (Rep x)) => x -> SPut+  sput = gsput . from+   sget :: SGet x+  default sget :: (Generic x, GSerialize (Rep x)) => SGet x+  sget = to <$> gsget    sputNested :: x -> SPut   sgetNested :: SGet x@@ -368,12 +384,12 @@ -}  instance (Serialize a, Serialize b) => Serialize (a,b) where-    sput (a,b)           = sput a >> sput b-    sget                 = liftM2 (,) sget sget+    -- sput (a,b)           = sput a >> sput b+    -- sget                 = liftM2 (,) sget sget  instance (Serialize a, Serialize b, Serialize c) => Serialize (a,b,c) where-    sput (a,b,c)         = sput a >> sput b >> sput c-    sget                 = liftM3 (,,) sget sget sget+    -- sput (a,b,c)         = sput a >> sput b >> sput c+    -- sget                 = liftM3 (,,) sget sget sget  instance Serialize a => Serialize [a] where     sput l  = sput (length l) >> mapM_ sput l@@ -381,13 +397,13 @@                  replicateM n sget  instance (Serialize a) => Serialize (Maybe a) where-    sput Nothing  = sputWord8 0-    sput (Just x) = sputWord8 1 >> sput x-    sget = do-        w <- sgetWord8-        case w of-            0 -> return Nothing-            _ -> liftM Just sget+    -- sput Nothing  = sputWord8 0+    -- sput (Just x) = sputWord8 1 >> sput x+    -- sget = do+    --     w <- sgetWord8+    --     case w of+    --         0 -> return Nothing+    --         _ -> liftM Just sget  instance (Ord a, Serialize a) => Serialize (Set.Set a) where     sput = sput . Set.toAscList@@ -449,3 +465,73 @@        ; return b ;        } +-- generic serialize++class GSerialize x where+  gsget :: SGet (x y)+  gsput :: x y -> SPut++instance (Datatype d, SerializeSum x) => GSerialize (D1 d x) where+  --+  gsget = M1 <$> sumGetTagged+  --+  gsput (M1 x) = sumPutTagged x++class SerializeSum x where+  sumGetTagged :: SGet (x y)+  sumPutTagged :: x y -> SPut++instance (SerializeProduct x, Constructor c) => SerializeSum (C1 c x) where+  --+  sumGetTagged = M1 <$> productGetMVec+  {-# INLINE sumGetTagged #-}+  --+  sumPutTagged (M1 x) = productPutMVec x+  {-# INLINE sumPutTagged #-}++instance (SerializeSum a, SerializeSum b) => SerializeSum (a :+: b) where+  sumGetTagged = do+    x <- sgetWord8+    case x of+      0 -> L1 <$> sumGetTagged+      1 -> R1 <$> sumGetTagged+  {-# INLINE sumGetTagged #-}++  sumPutTagged (L1 x) = sputWord8 0 >> sumPutTagged x+  sumPutTagged (R1 x) = sputWord8 1 >> sumPutTagged x+  {-# INLINE sumPutTagged #-}++class SerializeProduct x where+  productGetMVec :: SGet (x y)+  productPutMVec :: x y -> SPut++instance (SerializeProduct a, SerializeProduct b) => SerializeProduct (a :*: b) where+  productGetMVec =+      (:*:) <$> productGetMVec+            <*> productGetMVec+  {-# INLINE productGetMVec #-}++  productPutMVec (a :*: b) = do+      productPutMVec a+      productPutMVec b+  {-# INLINE productPutMVec #-}++instance SerializeProduct x => SerializeProduct (S1 s x) where+  productGetMVec = M1 <$> productGetMVec+  {-# INLINE productGetMVec #-}++  productPutMVec (M1 x) = productPutMVec x+  {-# INLINE productPutMVec #-}++instance Serialize x => SerializeProduct (K1 i x) where+  productGetMVec = K1 <$> sget+  {-# INLINE productGetMVec #-}++  productPutMVec (K1 x) = sput x+  {-# INLINE productPutMVec #-}++instance SerializeProduct U1 where+  productGetMVec = return U1+  {-# INLINE productGetMVec #-}+  productPutMVec _ = return ()+  {-# INLINE productPutMVec #-}
src/UHC/Util/Utils.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE TypeOperators, TypeSynonymInstances, FlexibleInstances, DefaultSignatures, FlexibleContexts, UndecidableInstances #-}  module UHC.Util.Utils   ( -- * Set@@ -24,7 +25,38 @@   , tup123to1, tup123to2   , tup123to12, tup123to23   , tup12to123+  +  , fst3+  , snd3+  , thd3+  , thd +  +  , tup1234to1  +  , tup1234to2  +  , tup1234to3  +  , tup1234to4  +  +  , tup1234to12+  , tup1234to13+  , tup1234to14+  , tup1234to23+  , tup1234to24+  , tup1234to34+  +  , tup1234to123+  , tup1234to234+  +  , tup1234to124+  , tup1234to134+  +  , tup123to1234 +  , fst4+  , snd4+  , thd4+  , fth4+  , fth +       -- * String   , strWhite   , strPad@@ -34,8 +66,10 @@      , splitForQualified   -    -- * Show-  , showUnprefixedWithTypeable+    -- * Show utils+  , showUnprefixedWithShowTypeable+  , DataAndConName(..)+  , showUnprefixed        -- * Misc   , panic@@ -68,6 +102,7 @@        -- * Monad   , firstMaybeM+  , breakM   )   where @@ -75,6 +110,7 @@ import Data.Char import Data.List import Data.Typeable+import GHC.Generics import qualified Data.Set as Set import qualified Data.Map as Map import qualified Data.Graph as Graph@@ -186,18 +222,76 @@ -- Tupling, untupling ------------------------------------------------------------------------- -tup123to1  (a,_,_) = a          -- aka fst3-tup123to2  (_,a,_) = a          -- aka snd3-tup123to12 (a,b,_) = (a,b)-tup123to23 (_,a,b) = (a,b)-tup12to123 c (a,b) = (a,b,c)-+tup123to1  (a,_,_) = a+tup123to2  (_,a,_) = a+tup123to3  (_,_,a) = a {-# INLINE tup123to1  #-} {-# INLINE tup123to2  #-}+{-# INLINE tup123to3  #-}++tup123to12 (a,b,_) = (a,b)+tup123to23 (_,a,b) = (a,b) {-# INLINE tup123to12 #-} {-# INLINE tup123to23 #-}++tup12to123 c (a,b) = (a,b,c) {-# INLINE tup12to123 #-} +fst3 = tup123to1+snd3 = tup123to2+thd3 = tup123to3+thd  = thd3+{-# INLINE fst3 #-}+{-# INLINE snd3 #-}+{-# INLINE thd3 #-}+{-# INLINE thd  #-}++tup1234to1   (a,_,_,_) = a+tup1234to2   (_,a,_,_) = a+tup1234to3   (_,_,a,_) = a+tup1234to4   (_,_,_,a) = a+{-# INLINE tup1234to1   #-}+{-# INLINE tup1234to2   #-}+{-# INLINE tup1234to3   #-}+{-# INLINE tup1234to4   #-}++tup1234to12  (a,b,_,_) = (a,b)+tup1234to13  (a,_,b,_) = (a,b)+tup1234to14  (a,_,_,b) = (a,b)+tup1234to23  (_,a,b,_) = (a,b)+tup1234to24  (_,a,_,b) = (a,b)+tup1234to34  (_,_,a,b) = (a,b)+{-# INLINE tup1234to12 #-}+{-# INLINE tup1234to13 #-}+{-# INLINE tup1234to14 #-}+{-# INLINE tup1234to23 #-}+{-# INLINE tup1234to24 #-}+{-# INLINE tup1234to34 #-}++tup1234to123 (a,b,c,_) = (a,b,c)+tup1234to234 (_,a,b,c) = (a,b,c)+{-# INLINE tup1234to123 #-}+{-# INLINE tup1234to234 #-}++tup1234to124 (a,b,_,c) = (a,b,c)+tup1234to134 (a,_,b,c) = (a,b,c)+{-# INLINE tup1234to124 #-}+{-# INLINE tup1234to134 #-}++tup123to1234 d (a,b,c) = (a,b,c,d)+{-# INLINE tup123to1234 #-}++fst4 = tup1234to1+snd4 = tup1234to2+thd4 = tup1234to3+fth4 = tup1234to4+fth  = fth4+{-# INLINE fst4 #-}+{-# INLINE snd4 #-}+{-# INLINE thd4 #-}+{-# INLINE fth4 #-}+{-# INLINE fth  #-}+ ------------------------------------------------------------------------- -- String -------------------------------------------------------------------------@@ -232,10 +326,37 @@ -------------------------------------------------------------------------  -- | Show, additionally removing type name prefix, assuming constructor names are prefixed with type name, possibly with additional underscore (or something like that)-showUnprefixedWithTypeable :: (Show x, Typeable x) => Int -> x -> String-showUnprefixedWithTypeable extralen x = drop prelen $ show x+showUnprefixedWithShowTypeable :: (Show x, Typeable x) => Int -> x -> String+showUnprefixedWithShowTypeable extralen x = drop prelen $ show x   where prelen = (length $ show $ typeOf x) + extralen +-- | Generic constructor name, to be used by show variations+class GDataAndConName f where+  gDataAndConName :: f x -> (String,String)++class DataAndConName x where+  -- | Get datatype and constructor name for a datatype+  dataAndConName :: x -> (String,String)+  +  default dataAndConName :: (Generic x, GDataAndConName (Rep x)) => x -> (String,String)+  dataAndConName = gDataAndConName . from++instance (Datatype d, GDataAndConName x) => GDataAndConName (D1 d x) where+  gDataAndConName d@(M1 x) = let (_,c) = gDataAndConName x in (datatypeName d, c)++instance (GDataAndConName a, GDataAndConName b) => GDataAndConName (a :+: b) where+  gDataAndConName (L1 x) = gDataAndConName x+  gDataAndConName (R1 x) = gDataAndConName x++instance (Constructor c) => GDataAndConName (C1 c x) where+  gDataAndConName c = ("", conName c)++-- | Show, additionally removing type name prefix, assuming constructor names are prefixed with type name, possibly with additional underscore (or something like that)+showUnprefixed :: (DataAndConName x) => Int -> x -> String+showUnprefixed extralen x = drop prelen $ c+  where (d,c) = dataAndConName x+        prelen = (length d) + extralen+ ------------------------------------------------------------------------- -- Split for qualified name -------------------------------------------------------------------------@@ -396,3 +517,9 @@ firstMaybeM x []     = return x firstMaybeM x (s:ss) = do mx <- s x                           maybe (firstMaybeM x ss) return mx++-- | Monadic equivalent of break: evaluate monads until a predicate is True, returning what is yes/no evaluated and the split point+breakM :: Monad m => (a -> Bool) -> [m a] -> m ([a], Maybe (a,[m a]))+breakM p l = br [] l >>= \(acc,res) -> return (reverse acc, res)+  where br acc []     = return (acc, Nothing)+        br acc (m:ms) = m >>= \x -> if p x then return (acc, Just (x, ms)) else br (x:acc) ms
src/UHC/Util/VarMp.hs view
@@ -18,7 +18,8 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE OverlappingInstances #-}+-- {-# LANGUAGE OverlappingInstances #-}+{-# LANGUAGE DeriveGeneric #-}  module UHC.Util.VarMp     ( VarMp'(..)@@ -112,7 +113,7 @@       , varmpMpL        :: [Map.Map k v]        -- ^ for each level a map, starting at the base meta level       }   deriving ( Eq, Ord-           , Typeable, Data+           , Typeable, Data, Generic            )  -- get the base meta level map, ignore the others@@ -571,6 +572,6 @@ -}  instance (Ord k, Serialize k, Serialize v) => Serialize (VarMp' k v) where-  sput (VarMp a b) = sput a >> sput b-  sget = liftM2 VarMp sget sget+  -- sput (VarMp a b) = sput a >> sput b+  -- sget = liftM2 VarMp sget sget 
uhc-util.cabal view
@@ -1,5 +1,5 @@ Name:				uhc-util-Version:			0.1.6.0+Version:			0.1.6.2 cabal-version:      >= 1.6 License:			BSD3 Copyright:			Utrecht University, Department of Information and Computing Sciences, Software Technology group@@ -21,7 +21,7 @@  library   Build-Depends:-    base >= 4 && < 5,+    base >= 4.6 && < 5,     mtl >= 2,     fgl >= 5.4,     hashable >= 1.1,@@ -34,7 +34,6 @@     uulib >= 0.9.19,     time-compat >= 0.1.0.1,     time >= 1.2,-    ListLike >= 4.0.0,     fclabels >= 2.0.2,     syb  >= 0.3.6   Exposed-Modules:@@ -47,6 +46,7 @@     UHC.Util.Control.Monad,     UHC.Util.Debug,     UHC.Util.DependencyGraph,+    UHC.Util.Error,     UHC.Util.FastSeq,     UHC.Util.FPath,     UHC.Util.Hashable,