git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Fix Haddocks
6a8f962Phil Freeman
src/Language/PureScript/Sugar/Names.hs+4−2
@@ -41,10 +41,11 @@ type ExportEnvironment = M.Map ModuleName Exports
41-- The exported declarations from a module.
41-- The exported declarations from a module.
42--
42--
43data Exports = Exports
43data Exports = Exports
44+ {
44 -- |
45 -- |
45 -- The types exported from each module
46 -- The types exported from each module
46 --
47 --
47− { exportedTypes :: [(ProperName, [ProperName])]
48+ exportedTypes :: [(ProperName, [ProperName])]
48 -- |
49 -- |
49 -- The classes exported from each module
50 -- The classes exported from each module
50 --
51 --
@@ -59,10 +60,11 @@ data Exports = Exports
59-- An imported environment for a particular module. This also contains the module's own members.
60-- An imported environment for a particular module. This also contains the module's own members.
60--
61--
61data ImportEnvironment = ImportEnvironment
62data ImportEnvironment = ImportEnvironment
63+ {
62 -- |
64 -- |
63 -- Local names for types within a module mapped to to their qualified names
65 -- Local names for types within a module mapped to to their qualified names
64 --
66 --
65− { importedTypes :: M.Map (Qualified ProperName) (Qualified ProperName)
67+ importedTypes :: M.Map (Qualified ProperName) (Qualified ProperName)
66 -- |
68 -- |
67 -- Local names for data constructors within a module mapped to to their qualified names
69 -- Local names for data constructors within a module mapped to to their qualified names
68 --
70 --
src/Language/PureScript/Sugar/TypeClasses.hs+2−3
@@ -57,8 +57,7 @@ desugarModule (Module name decls (Just exps)) = do
57 return $ Module name (concat declss) $ Just (exps ++ catMaybes newExpss)
57 return $ Module name (concat declss) $ Just (exps ++ catMaybes newExpss)
58desugarModule _ = error "Exports should have been elaborated in name desugaring"
58desugarModule _ = error "Exports should have been elaborated in name desugaring"
59
59
60−-- |
61−-- Desugar type class and type class instance declarations
60+{- Desugar type class and type class instance declarations
62--
61--
63-- Type classes become type synonyms for their dictionaries, and type instances become dictionary declarations.
62-- Type classes become type synonyms for their dictionaries, and type instances become dictionary declarations.
64-- Additional values are generated to access individual members of a dictionary, with the appropriate type.
63-- 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"
109-- }
108-- }
110-- sub: ""
109-- sub: ""
111-- }
110-- }
112−--
111+-}
113desugarDecl :: ModuleName -> Declaration -> Desugar (Maybe DeclarationRef, [Declaration])
112desugarDecl :: ModuleName -> Declaration -> Desugar (Maybe DeclarationRef, [Declaration])
114desugarDecl mn d@(TypeClassDeclaration name args implies members) = do
113desugarDecl mn d@(TypeClassDeclaration name args implies members) = do
115 modify (M.insert (mn, name) d)
114 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
143getEnv = checkEnv <$> get
143getEnv = checkEnv <$> get
144
144
145-- |
145-- |
146−-- Update the @Environment#
146+-- Update the @Environment@
147--
147--
148putEnv :: (MonadState CheckState m) => Environment -> m ()
148putEnv :: (MonadState CheckState m) => Environment -> m ()
149putEnv env = modify (\s -> s { checkEnv = env })
149putEnv env = modify (\s -> s { checkEnv = env })
src/Language/PureScript/TypeChecker/Types.hs+2−2
@@ -888,7 +888,7 @@ check' v@(Var var) ty = do
888 Nothing -> throwError . strMsg $ "Unable to check type subsumption"
888 Nothing -> throwError . strMsg $ "Unable to check type subsumption"
889 Just v'' -> return $ TypedValue True v'' ty'
889 Just v'' -> return $ TypedValue True v'' ty'
890check' (SuperClassDictionary className tys) _ = do
890check' (SuperClassDictionary className tys) _ = do
891− -- |
891+ {-
892 -- Here, we replace a placeholder for a superclass dictionary with a regular
892 -- Here, we replace a placeholder for a superclass dictionary with a regular
893 -- TypeClassDictionary placeholder. The reason we do this is that it is necessary to have the
893 -- TypeClassDictionary placeholder. The reason we do this is that it is necessary to have the
894 -- correct super instance dictionaries in scope, and these are not available when the type class
894 -- correct super instance dictionaries in scope, and these are not available when the type class
@@ -897,7 +897,7 @@ check' (SuperClassDictionary className tys) _ = do
897 -- Note also that the first argument to TypeClassDictionary is False, meaning we _do not_ want
897 -- Note also that the first argument to TypeClassDictionary is False, meaning we _do not_ want
898 -- to consider superclass instances when searching for this dictionary - doing so might lead
898 -- to consider superclass instances when searching for this dictionary - doing so might lead
899 -- to traversing a cycle in the instance graph.
899 -- to traversing a cycle in the instance graph.
900− --
900+ -}
901 dicts <- getTypeClassDictionaries
901 dicts <- getTypeClassDictionaries
902 return $ TypeClassDictionary False (className, tys) dicts
902 return $ TypeClassDictionary False (className, tys) dicts
903check' (TypedValue checkType val ty1) ty2 = do
903check' (TypedValue checkType val ty1) ty2 = do