git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Fix Haddocks
commit6a8f962c289e1434b29dd849f8de10470d919036 authorPhil Freeman <paf31@cantab.net> dateTue 8 Apr 2014, 20:35 (13 years ago) parent25310f5
4 files changed+9−8
src/Language/PureScript/Sugar/Names.hs+4−2 src/Language/PureScript/Sugar/TypeClasses.hs+2−3 src/Language/PureScript/TypeChecker/Monad.hs+1−1 src/Language/PureScript/TypeChecker/Types.hs+2−2
src/Language/PureScript/Sugar/Names.hs+4−2
@@ -41,10 +41,11 @@ type ExportEnvironment = M.Map ModuleName Exports
4141-- The exported declarations from a module.
4242--
4343data Exports = Exports
44+ {
4445 -- |
4546 -- The types exported from each module
4647 --
47− { exportedTypes :: [(ProperName, [ProperName])]
48+ exportedTypes :: [(ProperName, [ProperName])]
4849 -- |
4950 -- The classes exported from each module
5051 --
@@ -59,10 +60,11 @@ data Exports = Exports
5960-- An imported environment for a particular module. This also contains the module's own members.
6061--
6162data ImportEnvironment = ImportEnvironment
63+ {
6264 -- |
6365 -- Local names for types within a module mapped to to their qualified names
6466 --
65− { importedTypes :: M.Map (Qualified ProperName) (Qualified ProperName)
67+ importedTypes :: M.Map (Qualified ProperName) (Qualified ProperName)
6668 -- |
6769 -- Local names for data constructors within a module mapped to to their qualified names
6870 --
src/Language/PureScript/Sugar/TypeClasses.hs+2−3
@@ -57,8 +57,7 @@ desugarModule (Module name decls (Just exps)) = do
5757 return $ Module name (concat declss) $ Just (exps ++ catMaybes newExpss)
5858desugarModule _ = error "Exports should have been elaborated in name desugaring"
5959
60−-- |
61−-- Desugar type class and type class instance declarations
60+{- Desugar type class and type class instance declarations
6261--
6362-- Type classes become type synonyms for their dictionaries, and type instances become dictionary declarations.
6463-- Additional values are generated to access individual members of a dictionary, with the appropriate type.
@@ -109,7 +108,7 @@ desugarModule _ = error "Exports should have been elaborated in name desugaring"
109108-- }
110109-- sub: ""
111110-- }
112−--
111+-}
113112desugarDecl :: ModuleName -> Declaration -> Desugar (Maybe DeclarationRef, [Declaration])
114113desugarDecl mn d@(TypeClassDeclaration name args implies members) = do
115114 modify (M.insert (mn, name) d)
src/Language/PureScript/TypeChecker/Monad.hs+1−1
@@ -143,7 +143,7 @@ getEnv :: (Functor m, MonadState CheckState m) => m Environment
143143getEnv = checkEnv <$> get
144144
145145-- |
146−-- Update the @Environment#
146+-- Update the @Environment@
147147--
148148putEnv :: (MonadState CheckState m) => Environment -> m ()
149149putEnv env = modify (\s -> s { checkEnv = env })
src/Language/PureScript/TypeChecker/Types.hs+2−2
@@ -888,7 +888,7 @@ check' v@(Var var) ty = do
888888 Nothing -> throwError . strMsg $ "Unable to check type subsumption"
889889 Just v'' -> return $ TypedValue True v'' ty'
890890check' (SuperClassDictionary className tys) _ = do
891− -- |
891+ {-
892892 -- Here, we replace a placeholder for a superclass dictionary with a regular
893893 -- TypeClassDictionary placeholder. The reason we do this is that it is necessary to have the
894894 -- correct super instance dictionaries in scope, and these are not available when the type class
@@ -897,7 +897,7 @@ check' (SuperClassDictionary className tys) _ = do
897897 -- Note also that the first argument to TypeClassDictionary is False, meaning we _do not_ want
898898 -- to consider superclass instances when searching for this dictionary - doing so might lead
899899 -- to traversing a cycle in the instance graph.
900− --
900+ -}
901901 dicts <- getTypeClassDictionaries
902902 return $ TypeClassDictionary False (className, tys) dicts
903903check' (TypedValue checkType val ty1) ty2 = do