;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\310\311\312\313\314\303\315\316&\207" [require haskell-mode haskell-process haskell haskell-utils inf-haskell imenu eldoc custom-declare-group haskell-doc nil "Show Haskell function types in echo area." :group :prefix "haskell-doc-"] 8) #@1247 *If non-nil, show the type of the function near point or a related comment. If the identifier near point is a Haskell keyword and the variable `haskell-doc-show-reserved' is non-nil show a one line summary of the syntax. If the identifier near point is a Prelude or one of the standard library functions and `haskell-doc-show-prelude' is non-nil show its type. If the identifier near point is local (i.e. defined in this module) check the `imenu' list of functions for the type. This obviously requires that your language mode uses `imenu'. If the identifier near point is global (i.e. defined in an imported module) and the variable `haskell-doc-show-global-types' is non-nil show the type of its function. If the identifier near point is a standard strategy or a function, type related related to strategies and `haskell-doc-show-strategy' is non-nil show the type of the function. Strategies are special to the parallel execution of Haskell. If you're not interested in that just turn it off. If the identifier near point is a user defined function that occurs as key in the alist `haskell-doc-user-defined-ids' and the variable `haskell-doc-show-user-defined' is non-nil show the type of the function. This variable is buffer-local. (defvar haskell-doc-mode nil (#$ . -431)) (make-variable-buffer-local 'haskell-doc-mode) #@48 Hook invoked when entering `haskell-doc-mode'. (defvar haskell-doc-mode-hook nil (#$ . 1772)) #@203 Variable holding an alist matching file names to fct-type alists. The function `haskell-doc-make-global-fct-index' rebuilds this variables (similar to an `imenu' rescan). This variable is buffer-local. (defvar haskell-doc-index nil (#$ . 1873)) (byte-code "\300\301!\210\302\303\304\305\306DD\307\310\311\312\313&\210\300\303!\210\302\314\304\305\315DD\316\310\311\312\313&\210\300\314!\210\302\317\304\305\320DD\321\310\311\312\313&\210\300\317!\210\302\322\304\305\323DD\324\310\311\312\313&\210\300\322!\210\302\325\304\305\326DD\327\310\311\312\313&\210\300\325!\210\302\330\304\305\331DD\332\310\311\312\313&\210\302\333\304\305\334DD\335\310\311\312\313&\210\302\336\304\305\337DD\340\310\311\312\313&\207" [make-variable-buffer-local haskell-doc-index custom-declare-variable haskell-doc-show-global-types funcall function #[0 "\300\207" [nil] 1] "If non-nil, search for the types of global functions by loading the files.\nThis variable is buffer-local." :group haskell-doc :type boolean haskell-doc-show-reserved #[0 "\300\207" [t] 1] "If non-nil, show a documentation string for reserved ids.\nThis variable is buffer-local." haskell-doc-show-prelude #[0 "\300\207" [t] 1] "If non-nil, show a documentation string for prelude functions.\nThis variable is buffer-local." haskell-doc-show-strategy #[0 "\300\207" [t] 1] "If non-nil, show a documentation string for strategies.\nThis variable is buffer-local." haskell-doc-show-user-defined #[0 "\300\207" [t] 1] "If non-nil, show a documentation string for user defined ids.\nThis variable is buffer-local." haskell-doc-chop-off-context #[0 "\300\207" [t] 1] "If non-nil eliminate the context part in a Haskell type." haskell-doc-chop-off-fctname #[0 "\300\207" [nil] 1] "If non-nil omit the function name and show only the type." haskell-doc-use-inf-haskell #[0 "\300\207" [nil] 1] "If non-nil use inf-haskell.el to get type and kind information."] 8) #@79 *How far to search when looking for the type declaration of fct under cursor. (defvar haskell-doc-search-distance 40 (#$ . -3798)) #@234 *Number of seconds of idle time to wait before printing. If user input arrives before this interval of time has elapsed after the last input, no documentation will be printed. If this variable is set to 0, no idle time is required. (defvar haskell-doc-idle-delay 0.5 (#$ . -3936)) #@234 Case in which to display argument names of functions, as a symbol. This has two preferred values: `upcase' or `downcase'. Actually, any name of a function which takes a string as an argument and returns another string is acceptable. (defvar haskell-doc-argument-case 'identity (#$ . 4225)) #@432 *Obarray of command names where it is appropriate to print in the echo area. This is not done for all commands since some print their own messages in the echo area, and these functions would instantly overwrite them. But `self-insert-command' as well as most motion commands are good candidates. It is probably best to manipulate this data structure with the commands `haskell-doc-add-command' and `haskell-doc-remove-command'. (defvar haskell-doc-mode-message-commands nil (#$ . -4522)) (defvar haskell-doc-last-data '(nil)) #@67 *String to display in mode line when Haskell-Doc Mode is enabled. (defvar haskell-doc-minor-mode-string '(haskell-doc-show-global-types " DOC" " Doc") (#$ . -5057)) #@207 An alist of reserved identifiers. Each element is of the form (ID . DOC) where both ID and DOC are strings. DOC should be a concise single-line string describing the construct in which the keyword is used. (defvar haskell-doc-reserved-ids '(("case" . "case exp of { alts [;] }") ("class" . "class [context =>] simpleclass [where { cbody [;] }]") ("data" . "data [context =>] simpletype = constrs [deriving]") ("default" . "default (type1 , ... , typen)") ("deriving" . "deriving (dclass | (dclass1, ... , dclassn))") ("do" . "do { stmts [;] } stmts -> exp [; stmts] | pat <- exp ; stmts | let decllist ; stmts") ("else" . "if exp then exp else exp") ("if" . "if exp then exp else exp") ("import" . "import [qualified] modid [as modid] [impspec]") ("in" . "let decllist in exp") ("infix" . "infix [digit] ops") ("infixl" . "infixl [digit] ops") ("infixr" . "infixr [digit] ops") ("instance" . "instance [context =>] qtycls inst [where { valdefs [;] }]") ("let" . "let { decl; ...; decl [;] } in exp") ("module" . "module modid [exports] where body") ("newtype" . "newtype [context =>] simpletype = con atype [deriving]") ("of" . "case exp of { alts [;] }") ("then" . "if exp then exp else exp") ("type" . "type simpletype = type") ("where" . "exp where { decl; ...; decl [;] }") ("as" . "import [qualified] modid [as modid] [impspec]") ("qualified" . "import [qualified] modid [as modid] [impspec]") ("hiding" . "hiding ( import1 , ... , importn [ , ] )") ("family" . "(type family type [kind] [= type_fam_equations]) | (data family type [kind])")) (#$ . 5229)) #@12 (fn URL) (defalias 'haskell-doc-extract-types #[257 "\300\301\302\"r\211q\210\303\304\"\216\305!\210eb\210\306\307\310\302#\203%\311\312\302\211#\210\202eb\210e\310\313\314\310\302#\203`\315\316!\211\235\204\\\211B\262`|\210\306\317!\210\320\321!\203Y\322\225b\210\306\317!\210\202H`\262\210\202*d|\210eb\210\306\323\310\302#\203x\311\324\302\211#\210\202geb\210\306\325\310\302#\203\214\311\326\302\211#\210\202{eb\210\306\327\310\302#\203\240\311\330\302\211#\210\202\217eb\210\306\331\310\302#\203\264\311\332\302\211#\210\202\243eb\210\313\333\310\302#\203\306\334\335\315\322!\"\210eb\210\306\336\310\302#\203\332\311\337\302\211#\210\202\311eb\210\310\340\341\342\343\310\313\203\354\202\355\310\302#\203)\316\225\203\315\316!\262\202\343\344\225\203\232\315\344!\315\345!\346\225\347\350\"\203\311\312\302\211$\262\347\351\"\203+\322\211\224O\262\211\203j\203m\347\352\"\203a\315\316\"\322\225\310O\262\347\353\"\203R\211\316\354O\262\355\356\357\260\262\210\202m\360Q\262\202m\310\262\361 \302#\211\203\225\211@\347\362\"\203\206\211\316\354O\262\211B B\262 A\266\202\202s\266\202\343\363\225\203 \310\262\315\363!\212\214\364\224\364\225}\210eb\210\313\310\302#\203\315\346!\315\345!\347\350\"\203\315\311\312\302\211$\262\347\351\"\203\333\211\322\211\224O\262\347\365\"\203\350\211\322\354O\262\366Q\262\361 \302#\211\203\211@\347\362\"\203\211\316\354O\262\211B B\262 A\266\202\202\364\266\202\260*\210\202\343\310\262\367 \210\202\343\370!@B\266\210*\207" [generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] insert-file-contents search-forward " " nil replace-match " " re-search-forward "^module +\\([[:alnum:]]+\\)" match-string 1 "" looking-at "\\(<[^<>]+>[ \n]*\\)*" 0 "
" "\n" ">" ">" "<" "<" "&" "&" "&[a-z]+;" error "Unexpected charref %s" " " " " " *,[ \n]*\\(?:--.*\n[ \n]*\\)*" "^\\( +\\)?\\([^< \n][^ \n]*\\(?: *,[ \n]*\\(?:--.*\n[ \n]*\\)*[^ \n]+\\)*\\)[ \n]*::[ \n]*\\(.*[^\n>]\\(?:>[ \n]+.*[^\n>]\\)*\\) *$" "^class \\(?:.*=>\\)? *\\(.*[^ \n]\\)[ \n]*where\\|^\\( +\\)?\\([^< \n][^ \n]*\\(?: *,[ \n]*\\(?:--.*\n[ \n]*\\)*[^ \n]+\\)*\\)[ \n]*::[ \n]*\\(.*[^\n>]\\(?:>[ \n]+.*[^\n>]\\)*\\) *$\\|^data +\\([[:alnum:]][[:alnum:] ]*[[:alnum:]]\\) *=.*{\\([^}]+\\)}" "^[^ \n]\\|^class \\(?:.*=>\\)? *\\(.*[^ \n]\\)[ \n]*where\\|^\\( +\\)?\\([^< \n][^ \n]*\\(?: *,[ \n]*\\(?:--.*\n[ \n]*\\)*[^ \n]+\\)*\\)[ \n]*::[ \n]*\\(.*[^\n>]\\(?:>[ \n]+.*[^\n>]\\)*\\) *$\\|^data +\\([[:alnum:]][[:alnum:] ]*[[:alnum:]]\\) *=.*{\\([^}]+\\)}" 4 3 2 string-match "[ \n][ \n]+" " *\\(--.*\\)?\\'" "\\`\\(.*[^ \n]\\) *=> *" "\\`(.*)\\'" -1 "(" ", " ") => " " => " split-string "(.*)" 5 6 ",\\'" " -> " beginning-of-line last] 20 (#$ . 6797)]) #@17 (fn BASE-URL) (defalias 'haskell-doc-fetch-lib-urls #[257 "\300\301\302\"r\211q\210\303\304\"\216\305!\210eb\210\306\307!\210e`|\210\306\310!\210`d|\210eb\210\311C\312\313\314\302#\203;\315\316!B\262\202)\317\303\320\"\237\"\262*\207" [generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] insert-file-contents search-forward "Part II: Libraries" "" "standard-prelude.html" re-search-forward "" nil match-string 1 mapcar #[257 "\301\302\300!\"\207" [V0 expand-file-name file-name-directory] 5 "\n\n(fn S)"]] 7 (#$ . 9705)]) #@107 Fetch the types from the online doc and insert them at point. URL is the URL of the online doc. (fn URL) (defalias 'haskell-doc-extract-and-insert-types #[257 "\300!\211\211\205B\211@\301!\302\211A\262\242\261\210\303 \210\304 \210\305\306\"\211\2039\211@\307p\"\210\303 \210\304 \210A\266\202\202!\266A\266\202\202\207" [haskell-doc-fetch-lib-urls haskell-doc-extract-types ";; " indent-according-to-mode newline sort #[514 "@@\231\207" [] 4 "\n\n(fn X Y)"] prin1] 10 (#$ . 10339) (byte-code "\203\301\302!\207\303C\207" [current-prefix-arg read-file-name "URL: " "http://www.haskell.org/onlinereport/"] 2)]) #@45 Alist of prelude functions and their types. (defvar haskell-doc-prelude-types '(("!!" . "[a] -> Int -> a") ("$" . "(a -> b) -> a -> b") ("$!" . "(a -> b) -> a -> b") ("&&" . "Bool -> Bool -> Bool") ("*" . "Num a => a -> a -> a") ("**" . "Floating a => a -> a -> a") ("+" . "Num a => a -> a -> a") ("++" . "[a] -> [a] -> [a]") ("-" . "Num a => a -> a -> a") ("." . "(b -> c) -> (a -> b) -> a -> c") ("/" . "Fractional a => a -> a -> a") ("/=" . "Eq a => a -> a -> Bool") ("<" . "Ord a => a -> a -> Bool") ("<=" . "Ord a => a -> a -> Bool") ("=<<" . "Monad m => (a -> m b) -> m a -> m b") ("==" . "Eq a => a -> a -> Bool") (">" . "Ord a => a -> a -> Bool") (">=" . "Ord a => a -> a -> Bool") (">>" . "Monad m => m a -> m b -> m b") (">>=" . "Monad m => m a -> (a -> m b) -> m b") ("^" . "(Num a, Integral b) => a -> b -> a") ("^^" . "(Fractional a, Integral b) => a -> b -> a") ("abs" . "Num a => a -> a") ("acos" . "Floating a => a -> a") ("acosh" . "Floating a => a -> a") ("all" . "(a -> Bool) -> [a] -> Bool") ("and" . "[Bool] -> Bool") ("any" . "(a -> Bool) -> [a] -> Bool") ("appendFile" . "FilePath -> String -> IO ()") ("asTypeOf" . "a -> a -> a") ("asin" . "Floating a => a -> a") ("asinh" . "Floating a => a -> a") ("atan" . "Floating a => a -> a") ("atan2" . "RealFloat a => a -> a -> a") ("atanh" . "Floating a => a -> a") ("break" . "(a -> Bool) -> [a] -> ([a],[a])") ("catch" . "IO a -> (IOError -> IO a) -> IO a") ("ceiling" . "(RealFrac a, Integral b) => a -> b") ("compare" . "Ord a => a -> a -> Ordering") ("concat" . "[[a]] -> [a]") ("concatMap" . "(a -> [b]) -> [a] -> [b]") ("const" . "a -> b -> a") ("cos" . "Floating a => a -> a") ("cosh" . "Floating a => a -> a") ("curry" . "((a, b) -> c) -> a -> b -> c") ("cycle" . "[a] -> [a]") ("decodeFloat" . "RealFloat a => a -> (Integer,Int)") ("div" . "Integral a => a -> a -> a") ("divMod" . "Integral a => a -> a -> (a,a)") ("drop" . "Int -> [a] -> [a]") ("dropWhile" . "(a -> Bool) -> [a] -> [a]") ("either" . "(a -> c) -> (b -> c) -> Either a b -> c") ("elem" . "(Eq a) => a -> [a] -> Bool") ("encodeFloat" . "RealFloat a => Integer -> Int -> a") ("enumFrom" . "Enum a => a -> [a]") ("enumFromThen" . "Enum a => a -> a -> [a]") ("enumFromThenTo" . "Enum a => a -> a -> a -> [a]") ("enumFromTo" . "Enum a => a -> a -> [a]") ("error" . "String -> a") ("even" . "(Integral a) => a -> Bool") ("exp" . "Floating a => a -> a") ("exponent" . "RealFloat a => a -> Int") ("fail" . "Monad m => String -> m a") ("filter" . "(a -> Bool) -> [a] -> [a]") ("flip" . "(a -> b -> c) -> b -> a -> c") ("floatDigits" . "RealFloat a => a -> Int") ("floatRadix" . "RealFloat a => a -> Integer") ("floatRange" . "RealFloat a => a -> (Int,Int)") ("floor" . "(RealFrac a, Integral b) => a -> b") ("fmap" . "Functor f => (a -> b) -> f a -> f b") ("foldl" . "(a -> b -> a) -> a -> [b] -> a") ("foldl1" . "(a -> a -> a) -> [a] -> a") ("foldr" . "(a -> b -> b) -> b -> [a] -> b") ("foldr1" . "(a -> a -> a) -> [a] -> a") ("fromEnum" . "Enum a => a -> Int") ("fromInteger" . "Num a => Integer -> a") ("fromIntegral" . "(Integral a, Num b) => a -> b") ("fromRational" . "Fractional a => Rational -> a") ("fst" . "(a,b) -> a") ("gcd" . "(Integral a) => a -> a -> a") ("getChar" . "IO Char") ("getContents" . "IO String") ("getLine" . "IO String") ("head" . "[a] -> a") ("id" . "a -> a") ("init" . "[a] -> [a]") ("interact" . "(String -> String) -> IO ()") ("ioError" . "IOError -> IO a") ("isDenormalized" . "RealFloat a => a -> Bool") ("isIEEE" . "RealFloat a => a -> Bool") ("isInfinite" . "RealFloat a => a -> Bool") ("isNaN" . "RealFloat a => a -> Bool") ("isNegativeZero" . "RealFloat a => a -> Bool") ("iterate" . "(a -> a) -> a -> [a]") ("last" . "[a] -> a") ("lcm" . "(Integral a) => a -> a -> a") ("length" . "[a] -> Int") ("lex" . "ReadS String") ("lines" . "String -> [String]") ("log" . "Floating a => a -> a") ("logBase" . "Floating a => a -> a -> a") ("lookup" . "(Eq a) => a -> [(a,b)] -> Maybe b") ("map" . "(a -> b) -> [a] -> [b]") ("mapM" . "Monad m => (a -> m b) -> [a] -> m [b]") ("mapM_" . "Monad m => (a -> m b) -> [a] -> m ()") ("max" . "Ord a => a -> a -> a") ("maxBound" . "Bounded a => a") ("maximum" . "(Ord a) => [a] -> a") ("maybe" . "b -> (a -> b) -> Maybe a -> b") ("min" . "Ord a => a -> a -> a") ("minBound" . "Bounded a => a") ("minimum" . "(Ord a) => [a] -> a") ("mod" . "Integral a => a -> a -> a") ("negate" . "Num a => a -> a") ("not" . "Bool -> Bool") ("notElem" . "(Eq a) => a -> [a] -> Bool") ("null" . "[a] -> Bool") ("numericEnumFrom" . "(Fractional a) => a -> [a]") ("numericEnumFromThen" . "(Fractional a) => a -> a -> [a]") ("numericEnumFromThenTo" . "(Fractional a, Ord a) => a -> a -> a -> [a]") ("numericEnumFromTo" . "(Fractional a, Ord a) => a -> a -> [a]") ("odd" . "(Integral a) => a -> Bool") ("or" . "[Bool] -> Bool") ("otherwise" . "Bool") ("pi" . "Floating a => a") ("pred" . "Enum a => a -> a") ("print" . "Show a => a -> IO ()") ("product" . "(Num a) => [a] -> a") ("properFraction" . "(RealFrac a, Integral b) => a -> (b,a)") ("putChar" . "Char -> IO ()") ("putStr" . "String -> IO ()") ("putStrLn" . "String -> IO ()") ("quot" . "Integral a => a -> a -> a") ("quotRem" . "Integral a => a -> a -> (a,a)") ("read" . "(Read a) => String -> a") ("readFile" . "FilePath -> IO String") ("readIO" . "Read a => String -> IO a") ("readList" . "Read a => ReadS [a]") ("readLn" . "Read a => IO a") ("readParen" . "Bool -> ReadS a -> ReadS a") ("reads" . "(Read a) => ReadS a") ("readsPrec" . "Read a => Int -> ReadS a") ("realToFrac" . "(Real a, Fractional b) => a -> b") ("recip" . "Fractional a => a -> a") ("rem" . "Integral a => a -> a -> a") ("repeat" . "a -> [a]") ("replicate" . "Int -> a -> [a]") ("return" . "Monad m => a -> m a") ("reverse" . "[a] -> [a]") ("round" . "(RealFrac a, Integral b) => a -> b") ("scaleFloat" . "RealFloat a => Int -> a -> a") ("scanl" . "(a -> b -> a) -> a -> [b] -> [a]") ("scanl1" . "(a -> a -> a) -> [a] -> [a]") ("scanr" . "(a -> b -> b) -> b -> [a] -> [b]") ("scanr1" . "(a -> a -> a) -> [a] -> [a]") ("seq" . "a -> b -> b") ("sequence" . "Monad m => [m a] -> m [a]") ("sequence_" . "Monad m => [m a] -> m ()") ("show" . "Show a => a -> String") ("showChar" . "Char -> ShowS") ("showList" . "Show a => [a] -> ShowS") ("showParen" . "Bool -> ShowS -> ShowS") ("showString" . "String -> ShowS") ("shows" . "(Show a) => a -> ShowS") ("showsPrec" . "Show a => Int -> a -> ShowS") ("significand" . "RealFloat a => a -> a") ("signum" . "Num a => a -> a") ("sin" . "Floating a => a -> a") ("sinh" . "Floating a => a -> a") ("snd" . "(a,b) -> b") ("span" . "(a -> Bool) -> [a] -> ([a],[a])") ("splitAt" . "Int -> [a] -> ([a],[a])") ("sqrt" . "Floating a => a -> a") ("subtract" . "(Num a) => a -> a -> a") ("succ" . "Enum a => a -> a") ("sum" . "(Num a) => [a] -> a") ("tail" . "[a] -> [a]") ("take" . "Int -> [a] -> [a]") ("takeWhile" . "(a -> Bool) -> [a] -> [a]") ("tan" . "Floating a => a -> a") ("tanh" . "Floating a => a -> a") ("toEnum" . "Enum a => Int -> a") ("toInteger" . "Integral a => a -> Integer") ("toRational" . "Real a => a -> Rational") ("truncate" . "(RealFrac a, Integral b) => a -> b") ("uncurry" . "(a -> b -> c) -> ((a, b) -> c)") ("undefined" . "a") ("unlines" . "[String] -> String") ("until" . "(a -> Bool) -> (a -> a) -> a -> a") ("unwords" . "[String] -> String") ("unzip" . "[(a,b)] -> ([a],[b])") ("unzip3" . "[(a,b,c)] -> ([a],[b],[c])") ("userError" . "String -> IOError") ("words" . "String -> [String]") ("writeFile" . "FilePath -> String -> IO ()") ("zip" . "[a] -> [b] -> [(a,b)]") ("zip3" . "[a] -> [b] -> [c] -> [(a,b,c)]") ("zipWith" . "(a->b->c) -> [a]->[b]->[c]") ("zipWith3" . "(a->b->c->d) -> [a]->[b]->[c]->[d]") ("||" . "Bool -> Bool -> Bool") ("%" . "(Integral a) => a -> a -> Ratio a") ("approxRational" . "(RealFrac a) => a -> a -> Rational") ("denominator" . "(Integral a) => Ratio a -> a") ("numerator" . "(Integral a) => Ratio a -> a") ("cis" . "(RealFloat a) => a -> Complex a") ("conjugate" . "(RealFloat a) => Complex a -> Complex a") ("imagPart" . "(RealFloat a) => Complex a -> a") ("magnitude" . "(RealFloat a) => Complex a -> a") ("mkPolar" . "(RealFloat a) => a -> a -> Complex a") ("phase" . "(RealFloat a) => Complex a -> a") ("polar" . "(RealFloat a) => Complex a -> (a,a)") ("realPart" . "(RealFloat a) => Complex a -> a") ("floatToDigits" . "(RealFloat a) => Integer -> a -> ([Int], Int)") ("fromRat" . "(RealFloat a) => Rational -> a") ("lexDigits" . "ReadS String") ("readDec" . "(Integral a) => ReadS a") ("readFloat" . "(RealFrac a) => ReadS a") ("readHex" . "(Integral a) => ReadS a") ("readInt" . "(Integral a) => a -> (Char -> Bool) -> (Char -> Int) -> ReadS a") ("readOct" . "(Integral a) => ReadS a") ("readSigned" . "(Real a) => ReadS a -> ReadS a") ("showEFloat" . "(RealFloat a) => Maybe Int -> a -> ShowS") ("showFFloat" . "(RealFloat a) => Maybe Int -> a -> ShowS") ("showFloat" . "(RealFloat a) => a -> ShowS") ("showGFloat" . "(RealFloat a) => Maybe Int -> a -> ShowS") ("showHex" . "Integral a => a -> ShowS") ("showInt" . "Integral a => a -> ShowS") ("showIntAtBase" . "Integral a => a -> (Int -> Char) -> a -> ShowS") ("showOct" . "Integral a => a -> ShowS") ("showSigned" . "(Real a) => (a -> ShowS) -> Int -> a -> ShowS") ("inRange" . "Ix a => (a,a) -> a -> Bool") ("index" . "Ix a => (a,a) -> a -> Int") ("range" . "Ix a => (a,a) -> [a]") ("rangeSize" . "Ix a => (a,a) -> Int") ("!" . "(Ix a) => Array a b -> a -> b") ("//" . "(Ix a) => Array a b -> [(a,b)] -> Array a b") ("accum" . "(Ix a) => (b -> c -> b) -> Array a b -> [(a,c)]") ("accumArray" . "(Ix a) => (b -> c -> b) -> b -> (a,a) -> [(a,c)]") ("array" . "(Ix a) => (a,a) -> [(a,b)] -> Array a b") ("assocs" . "(Ix a) => Array a b -> [(a,b)]") ("bounds" . "(Ix a) => Array a b -> (a,a)") ("elems" . "(Ix a) => Array a b -> [b]") ("indices" . "(Ix a) => Array a b -> [a]") ("ixmap" . "(Ix a, Ix b) => (a,a) -> (a -> b) -> Array b c") ("listArray" . "(Ix a) => (a,a) -> [b] -> Array a b") ("\\\\" . "Eq a => [a] -> [a] -> [a]") ("delete" . "Eq a => a -> [a] -> [a]") ("deleteBy" . "(a -> a -> Bool) -> a -> [a] -> [a]") ("deleteFirstsBy" . "(a -> a -> Bool) -> [a] -> [a] -> [a]") ("elemIndex" . "Eq a => a -> [a] -> Maybe Int") ("elemIndices" . "Eq a => a -> [a] -> [Int]") ("find" . "(a -> Bool) -> [a] -> Maybe a") ("findIndex" . "(a -> Bool) -> [a] -> Maybe Int") ("findIndices" . "(a -> Bool) -> [a] -> [Int]") ("genericDrop" . "Integral a => a -> [b] -> [b]") ("genericIndex" . "Integral a => [b] -> a -> b") ("genericLength" . "Integral a => [b] -> a") ("genericReplicate" . "Integral a => a -> b -> [b]") ("genericSplitAt" . "Integral a => a -> [b] -> ([b],[b])") ("genericTake" . "Integral a => a -> [b] -> [b]") ("group" . "Eq a => [a] -> [[a]]") ("groupBy" . "(a -> a -> Bool) -> [a] -> [[a]]") ("inits" . "[a] -> [[a]]") ("insert" . "Ord a => a -> [a] -> [a]") ("insertBy" . "(a -> a -> Ordering) -> a -> [a] -> [a]") ("intersect" . "Eq a => [a] -> [a] -> [a]") ("intersectBy" . "(a -> a -> Bool) -> [a] -> [a] -> [a]") ("intersperse" . "a -> [a] -> [a]") ("isPrefixOf" . "Eq a => [a] -> [a] -> Bool") ("isSuffixOf" . "Eq a => [a] -> [a] -> Bool") ("mapAccumL" . "(a -> b -> (a, c)) -> a -> [b] -> (a, [c])") ("mapAccumR" . "(a -> b -> (a, c)) -> a -> [b] -> (a, [c])") ("maximumBy" . "(a -> a -> Ordering) -> [a] -> a") ("minimumBy" . "(a -> a -> Ordering) -> [a] -> a") ("nub" . "Eq a => [a] -> [a]") ("nubBy" . "(a -> a -> Bool) -> [a] -> [a]") ("partition" . "(a -> Bool) -> [a] -> ([a],[a])") ("sort" . "Ord a => [a] -> [a]") ("sortBy" . "(a -> a -> Ordering) -> [a] -> [a]") ("tails" . "[a] -> [[a]]") ("transpose" . "[[a]] -> [[a]]") ("unfoldr" . "(b -> Maybe (a,b)) -> b -> [a]") ("union" . "Eq a => [a] -> [a] -> [a]") ("unionBy" . "(a -> a -> Bool) -> [a] -> [a] -> [a]") ("unzip4" . "[(a,b,c,d)] -> ([a],[b],[c],[d])") ("unzip5" . "[(a,b,c,d,e)] -> ([a],[b],[c],[d],[e])") ("unzip6" . "[(a,b,c,d,e,f)] -> ([a],[b],[c],[d],[e],[f])") ("unzip7" . "[(a,b,c,d,e,f,g)] -> ([a],[b],[c],[d],[e],[f],[g])") ("zip4" . "[a] -> [b] -> [c] -> [d] -> [(a,b,c,d)]") ("zip5" . "[a] -> [b] -> [c] -> [d] -> [e] -> [(a,b,c,d,e)]") ("zip6" . "[a] -> [b] -> [c] -> [d] -> [e] -> [f]") ("zip7" . "[a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g]") ("zipWith4" . "(a->b->c->d->e) -> [a]->[b]->[c]->[d]->[e]") ("zipWith5" . "(a->b->c->d->e->f) ->") ("zipWith6" . "(a->b->c->d->e->f->g) -> [a]->[b]->[c]->[d]->[e]->[f]->[g]") ("zipWith7" . "(a->b->c->d->e->f->g->h) -> [a]->[b]->[c]->[d]->[e]->[f]->[g]->[h]") ("catMaybes" . "[Maybe a] -> [a]") ("fromJust" . "Maybe a -> a") ("fromMaybe" . "a -> Maybe a -> a") ("isJust" . "Maybe a -> Bool") ("isNothing" . "Maybe a -> Bool") ("listToMaybe" . "[a] -> Maybe a") ("mapMaybe" . "(a -> Maybe b) -> [a] -> [b]") ("maybeToList" . "Maybe a -> [a]") ("chr" . "Int -> Char") ("digitToInt" . "Char -> Int") ("intToDigit" . "Int -> Char") ("isAlpha" . "Char -> Bool") ("isAlphaNum" . "Char -> Bool") ("isAscii" . "Char -> Bool") ("isControl" . "Char -> Bool") ("isDigit" . "Char -> Bool") ("isHexDigit" . "Char -> Bool") ("isLatin1" . "Char -> Bool") ("isLower" . "Char -> Bool") ("isOctDigit" . "Char -> Bool") ("isPrint" . "Char -> Bool") ("isSpace" . "Char -> Bool") ("isUpper" . "Char -> Bool") ("lexLitChar" . "ReadS String") ("ord" . "Char -> Int") ("readLitChar" . "ReadS Char") ("showLitChar" . "Char -> ShowS") ("toLower" . "Char -> Char") ("toUpper" . "Char -> Char") ("ap" . "Monad m => m (a -> b) -> m a -> m b") ("filterM" . "Monad m => (a -> m Bool) -> [a] -> m [a]") ("foldM" . "Monad m => (a -> b -> m a) -> a -> [b] -> m a") ("guard" . "MonadPlus m => Bool -> m ()") ("join" . "Monad m => m (m a) -> m a") ("liftM" . "Monad m => (a -> b) -> (m a -> m b)") ("liftM2" . "Monad m => (a -> b -> c) -> (m a -> m b -> m c)") ("liftM3" . "Monad m => (a -> b -> c -> d) -> (m a -> m b -> m c -> m d)") ("liftM4" . "Monad m => (a -> b -> c -> d -> e) -> (m a -> m b -> m c -> m d -> m e)") ("liftM5" . "Monad m => (a -> b -> c -> d -> e -> f) -> (m a -> m b -> m c -> m d -> m e -> m f)") ("mapAndUnzipM" . "Monad m => (a -> m (b,c)) -> [a] -> m ([b], [c])") ("mplus" . "MonadPlus m => m a -> m a -> m a") ("msum" . "MonadPlus m => [m a] -> m a") ("mzero" . "MonadPlus m => m a") ("unless" . "Monad m => Bool -> m () -> m ()") ("when" . "Monad m => Bool -> m () -> m ()") ("zipWithM" . "Monad m => (a -> b -> m c) -> [a] -> [b] -> m [c]") ("zipWithM_" . "Monad m => (a -> b -> m c) -> [a] -> [b] -> m ()") ("bracket" . "IO a -> (a -> IO b) -> (a -> IO c) -> IO c") ("bracket_" . "IO a -> (a -> IO b) -> IO c -> IO c") ("hClose" . "Handle -> IO ()") ("hFileSize" . "Handle -> IO Integer") ("hFlush" . "Handle -> IO ()") ("hGetBuffering" . "Handle -> IO BufferMode") ("hGetChar" . "Handle -> IO Char") ("hGetContents" . "Handle -> IO String") ("hGetLine" . "Handle -> IO String") ("hGetPosn" . "Handle -> IO HandlePosn") ("hIsClosed" . "Handle -> IO Bool") ("hIsEOF" . "Handle -> IO Bool") ("hIsOpen" . "Handle -> IO Bool") ("hIsReadable" . "Handle -> IO Bool") ("hIsSeekable" . "Handle -> IO Bool") ("hIsWritable" . "Handle -> IO Bool") ("hLookAhead" . "Handle -> IO Char") ("hPrint" . "Show a => Handle -> a -> IO ()") ("hPutChar" . "Handle -> Char -> IO ()") ("hPutStr" . "Handle -> String -> IO ()") ("hPutStrLn" . "Handle -> String -> IO ()") ("hReady" . "Handle -> IO Bool") ("hSeek" . "Handle -> SeekMode -> Integer -> IO ()") ("hSetBuffering" . "Handle -> BufferMode -> IO ()") ("hSetPosn" . "HandlePosn -> IO ()") ("hWaitForInput" . "Handle -> Int -> IO Bool") ("ioeGetErrorString" . "IOError -> String") ("ioeGetFileName" . "IOError -> Maybe FilePath") ("ioeGetHandle" . "IOError -> Maybe Handle") ("isAlreadyExistsError" . "IOError -> Bool") ("isAlreadyInUseError" . "IOError -> Bool") ("isDoesNotExistError" . "IOError -> Bool") ("isEOF" . "IO Bool") ("isEOFError" . "IOError -> Bool") ("isFullError" . "IOError -> Bool") ("isIllegalOperation" . "IOError -> Bool") ("isPermissionError" . "IOError -> Bool") ("isUserError" . "IOError -> Bool") ("openFile" . "FilePath -> IOMode -> IO Handle") ("stderr" . "Handle") ("stdin" . "Handle") ("stdout" . "Handle") ("try" . "IO a -> IO (Either IOError a)") ("createDirectory" . "FilePath -> IO ()") ("doesDirectoryExist" . "FilePath -> IO Bool") ("doesFileExist" . "FilePath -> IO Bool") ("executable" . "Permissions -> Bool") ("getCurrentDirectory" . "IO FilePath") ("getDirectoryContents" . "FilePath -> IO [FilePath]") ("getModificationTime" . "FilePath -> IO ClockTime") ("getPermissions" . "FilePath -> IO Permissions") ("readable" . "Permissions -> Bool") ("removeDirectory" . "FilePath -> IO ()") ("removeFile" . "FilePath -> IO ()") ("renameDirectory" . "FilePath -> FilePath -> IO ()") ("renameFile" . "FilePath -> FilePath -> IO ()") ("searchable" . "Permissions -> Bool") ("setCurrentDirectory" . "FilePath -> IO ()") ("setPermissions" . "FilePath -> Permissions -> IO ()") ("writable" . "Permissions -> Bool") ("exitFailure" . "IO a") ("exitWith" . "ExitCode -> IO a") ("getArgs" . "IO [String]") ("getEnv" . "String -> IO String") ("getProgName" . "IO String") ("system" . "String -> IO ExitCode") ("addToClockTime" . "TimeDiff -> ClockTime -> ClockTime") ("calendarTimeToString" . "CalendarTime -> String") ("ctDay" . "CalendarTime -> Int") ("ctHour" . "CalendarTime -> Int") ("ctIsDST" . "CalendarTime -> Bool") ("ctMin" . "CalendarTime -> Int") ("ctMonth" . "CalendarTime -> Month") ("ctPicosec" . "CalendarTime -> Integer") ("ctSec" . "CalendarTime -> Int") ("ctTZ" . "CalendarTime -> Int") ("ctTZName" . "CalendarTime -> String") ("ctWDay" . "CalendarTime -> Day") ("ctYDay" . "CalendarTime -> Int") ("ctYear" . "CalendarTime -> Int") ("diffClockTimes" . "ClockTime -> ClockTime -> TimeDiff") ("formatCalendarTime" . "TimeLocale -> String -> CalendarTime -> String") ("getClockTime" . "IO ClockTime") ("tdDay" . "TimeDiff -> Int") ("tdHour" . "TimeDiff -> Int") ("tdMin" . "TimeDiff -> Int") ("tdMonth" . "TimeDiff -> Int") ("tdPicosec" . "TimeDiff -> Integer") ("tdSec" . "TimeDiff -> Int") ("tdYear" . "TimeDiff -> Int") ("toCalendarTime" . "ClockTime -> IO CalendarTime") ("toClockTime" . "CalendarTime -> ClockTime") ("toUTCTime" . "ClockTime -> CalendarTime") ("amPm" . "TimeLocale -> (String, String)") ("dateFmt" . "TimeLocale -> String") ("dateTimeFmt" . "TimeLocale -> String") ("defaultTimeLocale" . "TimeLocale") ("months" . "TimeLocale -> [(String, String)]") ("time12Fmt" . "TimeLocale -> String") ("timeFmt" . "TimeLocale -> String") ("wDays" . "TimeLocale -> [(String, String)]") ("cpuTimePrecision" . "Integer") ("getCPUTime" . "IO Integer") ("genRange" . "RandomGen g => g -> (Int, Int)") ("getStdGen" . "IO StdGen") ("getStdRandom" . "(StdGen -> (a, StdGen)) -> IO a") ("mkStdGen" . "Int -> StdGen") ("newStdGen" . "IO StdGen") ("next" . "RandomGen g => g -> (Int, g)") ("random" . "(Random a, RandomGen g) => g -> (a, g)") ("randomIO" . "Random a => IO a") ("randomR" . "(Random a, RandomGen g) => (a, a) -> g -> (a, g)") ("randomRIO" . "Random a => (a,a) -> IO a") ("randomRs" . "(Random a, RandomGen g) => (a, a) -> g -> [a]") ("randoms" . "(Random a, RandomGen g) => g -> [a]") ("setStdGen" . "StdGen -> IO ()") ("split" . "RandomGen g => g -> (g, g)")) (#$ . 10976)) #@75 Alist of strategy functions and their types as defined in Strategies.lhs. (defvar haskell-doc-strategy-ids (list '("par" . "Done -> Done -> Done ; [infixr 0]") '("seq" . "Done -> Done -> Done ; [infixr 1]") '("using" . "a -> Strategy a -> a ; [infixl 0]") '("demanding" . "a -> Done -> a ; [infixl 0]") '("sparking" . "a -> Done -> a ; [infixl 0]") '(">||" . "Done -> Done -> Done ; [infixr 2]") '(">|" . "Done -> Done -> Done ; [infixr 3]") '("$||" . "(a -> b) -> Strategy a -> a -> b ; [infixl 6]") '("$|" . "(a -> b) -> Strategy a -> a -> b ; [infixl 6]") '(".|" . "(b -> c) -> Strategy b -> (a -> b) -> (a -> c) ; [infixl 9]") '(".||" . "(b -> c) -> Strategy b -> (a -> b) -> (a -> c) ; [infixl 9]") '("-|" . "(a -> b) -> Strategy b -> (b -> c) -> (a -> c) ; [infixl 9]") '("-||" . "(a -> b) -> Strategy b -> (b -> c) -> (a -> c) ; [infixl 9]") '("Done" . "type Done = ()") '("Strategy" . "type Strategy a = a -> Done") '("r0" . "Strategy a") '("rwhnf" . "Eval a => Strategy a") '("rnf" . "Strategy a") '("NFData" . "class Eval a => NFData a where rnf :: Strategy a") '("NFDataIntegral" . "class (NFData a, Integral a) => NFDataIntegral a") '("NFDataOrd" . "class (NFData a, Ord a) => NFDataOrd a") '("markStrat" . "Int -> Strategy a -> Strategy a") '("seqPair" . "Strategy a -> Strategy b -> Strategy (a,b)") '("parPair" . "Strategy a -> Strategy b -> Strategy (a,b)") '("seqTriple" . "Strategy a -> Strategy b -> Strategy c -> Strategy (a,b,c)") '("parTriple" . "Strategy a -> Strategy b -> Strategy c -> Strategy (a,b,c)") '("parList" . "Strategy a -> Strategy [a]") '("parListN" . "(Integral b) => b -> Strategy a -> Strategy [a]") '("parListNth" . "Int -> Strategy a -> Strategy [a]") '("parListChunk" . "Int -> Strategy a -> Strategy [a]") '("parMap" . "Strategy b -> (a -> b) -> [a] -> [b]") '("parFlatMap" . "Strategy [b] -> (a -> [b]) -> [a] -> [b]") '("parZipWith" . "Strategy c -> (a -> b -> c) -> [a] -> [b] -> [c]") '("seqList" . "Strategy a -> Strategy [a]") '("seqListN" . "(Integral a) => a -> Strategy b -> Strategy [b]") '("seqListNth" . "Int -> Strategy b -> Strategy [b]") '("parBuffer" . "Int -> Strategy a -> [a] -> [a]") '("seqArr" . "(Ix b) => Strategy a -> Strategy (Array b a)") '("parArr" . "(Ix b) => Strategy a -> Strategy (Array b a)") '("fstPairFstList" . "(NFData a) => Strategy [(a,b)]") '("force" . "(NFData a) => a -> a ") '("sforce" . "(NFData a) => a -> b -> b")) (#$ . 30153)) #@53 Alist of functions and strings defined by the user. (defvar haskell-doc-user-defined-ids nil (#$ . 32578)) #@97 Check whether FN is one of the functions in the alist TYPES and return the type. (fn FN TYPES) (defalias 'haskell-doc-is-of #[514 "\300\"\207" [assoc] 5 (#$ . 32691)]) (byte-code "\300\301\302\303#\304\301\305\306#\210\307\310\311!\236\204\312\311\313\310\311!\314\"\"\210\300\207" [function-put haskell-doc-is-of speed -1 put byte-optimizer byte-compile-inline-expand haskell-doc-mode default-value minor-mode-alist set-default append ((haskell-doc-mode haskell-doc-minor-mode-string))] 6) (defvar haskell-doc-keymap (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311#\210\301\312\313#\210\301\314\315#\210\301\316\317#\210\301\320\321#\210\301\322\323#\210\301\324\325#\210\207" [make-sparse-keymap define-key [visit] ("Visit FTP home site" . haskell-doc-visit-home) [submit] ("Submit bug report" . haskell-doc-submit-bug-report) [dummy] ("---") [make-index] ("Make global fct index" . haskell-doc-make-global-fct-index) [global-types-on] ("Toggle display of global types" . haskell-doc-show-global-types) [strategy-on] ("Toggle display of strategy ids" . haskell-doc-show-strategy) [user-defined-on] ("Toggle display of user defined ids" . haskell-doc-show-user-defined) [prelude-on] ("Toggle display of prelude functions" . haskell-doc-show-prelude) [reserved-ids-on] ("Toggle display of reserved ids" . haskell-doc-show-reserved) [haskell-doc-on] ("Toggle haskell-doc mode" . haskell-doc-mode)] 5)) #@63 Install a menu for `haskell-doc-mode' as a submenu of "Hugs". (defalias 'haskell-doc-install-keymap #[0 "\301\302 \303\"\304!\203!\301\305\"\204!\306\307!\203!\307\310\311B\312$\210\210\313\314\315\"\210\313\316\317\"\207" [haskell-doc-keymap lookup-key current-local-map [menu-bar Hugs] keymapp [haskell-doc] functionp define-key-after [haskell-doc] "Haskell-doc" [Haskell-doc mode] local-set-key "/" haskell-doc-check-active [(control shift meta mouse-3)] haskell-doc-ask-mouse-for-type] 6 (#$ . 34146) nil]) (defvar haskell-doc-timer nil) (defvar haskell-doc-buffers nil) #@110 Enter `haskell-doc-mode' for showing fct types in the echo area. See variable docstring. (fn &optional ARG) (defalias 'haskell-doc-mode #[256 "\211\305=\203 ?\202\211\203\306!\307V\202\310\311p \"\211\211\203@\211@\312!\2034r\211q\210)\2049\311 \"A\266\202\202\210\n\203O \204O\313\n!\210\314\315\316\317\320#\210\203\205p B\321\322!\203p\n\204w\322 \310\317#\202w\323\316\317\314\320$\210\f\203~\324 \210\325 \210\326\327!\210\330\331!\203\230\332\333\203\225\334\202\226\335\"\210\207" [haskell-doc-mode haskell-doc-buffers haskell-doc-timer haskell-doc-idle-delay haskell-doc-show-global-types toggle prefix-numeric-value 0 t delq buffer-live-p cancel-timer nil remove-hook post-command-hook haskell-doc-mode-print-current-symbol-info local fboundp run-with-idle-timer add-hook haskell-doc-make-global-fct-index haskell-doc-install-keymap run-hooks haskell-doc-mode-hook called-interactively-p any message "haskell-doc-mode is %s" "enabled" "disabled"] 7 (#$ . 34737) (byte-code "\206\301C\207" [current-prefix-arg toggle] 1)]) #@18 (fn ID PREFIX) (defalias 'haskell-doc-toggle-var '(macro . #[514 "\300\301\302\303D\304BB\305DFE\207" [setq if >= prefix-numeric-value (0) not] 9 (#$ . 35815)])) #@80 Turn on global types information in `haskell-doc-mode'. (fn &optional PREFIX) (defalias 'haskell-doc-show-global-types #[256 "\211\203\f\301!\302Y\202?\211\205\303 \207" [haskell-doc-show-global-types prefix-numeric-value 0 haskell-doc-make-global-fct-index] 4 (#$ . 35991) "P"]) #@87 Toggle the automatic display of a doc string for reserved ids. (fn &optional PREFIX) (defalias 'haskell-doc-show-reserved #[256 "\211\203\f\301!\302Y\202?\211\207" [haskell-doc-show-reserved prefix-numeric-value 0] 3 (#$ . 36286) "P"]) #@87 Toggle the automatic display of a doc string for reserved ids. (fn &optional PREFIX) (defalias 'haskell-doc-show-prelude #[256 "\211\203\f\301!\302Y\202?\211\207" [haskell-doc-show-prelude prefix-numeric-value 0] 3 (#$ . 36535) "P"]) #@87 Toggle the automatic display of a doc string for strategy ids. (fn &optional PREFIX) (defalias 'haskell-doc-show-strategy #[256 "\211\203\f\301!\302Y\202?\211\207" [haskell-doc-show-strategy prefix-numeric-value 0] 3 (#$ . 36782) "P"]) #@91 Toggle the automatic display of a doc string for user defined ids. (fn &optional PREFIX) (defalias 'haskell-doc-show-user-defined #[256 "\211\203\f\301!\302Y\202?\211\207" [haskell-doc-show-user-defined prefix-numeric-value 0] 3 (#$ . 37031) "P"]) (byte-code "\300\301\302\"\210\303\301\302\304#\210\300\305\302\"\210\303\305\302\304#\210\300\306\307\"\207" [defalias turn-on-haskell-doc-mode haskell-doc-mode make-obsolete "2015-07-23" turn-on-haskell-doc turn-off-haskell-doc-mode turn-off-haskell-doc] 4) #@56 Unequivocally turn off `haskell-doc-mode' (which see). (defalias 'turn-off-haskell-doc #[0 "\300\301!\207" [haskell-doc-mode 0] 2 (#$ . 37552)]) #@132 Check whether the print function is hooked in. Should be the same as the value of `haskell-doc-mode' but alas currently it is not. (defalias 'haskell-doc-check-active #[0 "\303\304\203\n \204\305\n>\203\306\202\307\310!\"\207" [haskell-doc-mode haskell-doc-timer post-command-hook message "%s" haskell-doc-mode-print-current-symbol-info "haskell-doc is ACTIVE" substitute-command-keys "haskell-doc is not ACTIVE (Use \\[haskell-doc-mode] to turn it on)"] 4 (#$ . 37704) nil]) #@156 Print the type of the symbol under the cursor. This function is run by an idle timer to print the type automatically if `haskell-doc-mode' is turned on. (defalias 'haskell-doc-mode-print-current-symbol-info #[0 "\205/\304 \205/ ?\205/m?\205/\n?\205/\305 \306 =?\205/\307\310!\204-\311 !\205/\312 \207" [haskell-doc-mode haskell-mode-interactive-prompt-state executing-kbd-macro haskell-doc-idle-delay haskell-doc-in-code-p selected-window minibuffer-window fboundp run-with-idle-timer sit-for haskell-doc-show-type] 2 (#$ . 38195)]) #@82 Return the info about symbol at point. Meant for `eldoc-documentation-function'. (defalias 'haskell-doc-current-info #[0 "\300 \205\301 \206\302\303 !\2119?\205\211\262\207" [haskell-doc-in-code-p haskell-doc-current-info--interaction haskell-doc-sym-doc haskell-ident-at-point] 2 (#$ . 38745)]) #@194 Read the identifier under the mouse and echo its type. This uses the same underlying function `haskell-doc-show-type' as the hooked function. Only the user interface is different. (fn EVENT) (defalias 'haskell-doc-ask-mouse-for-type #[257 "\212\300\301!\211@\262!\210\302\301!!b\210\303 )\207" [select-window event-end posn-point haskell-doc-show-type] 4 (#$ . 39055) "e"]) #@52 A predicate indicating suitable case to show docs. (defalias 'haskell-doc-in-code-p #[0 "\301=\203i\302X\203\303 f\304=\206\305\306 8?\207" [haskell-literate bird 2 line-beginning-position 62 8 syntax-ppss] 2 (#$ . 39440)]) #@307 Show the type of the function near point or given symbol SYM. For the function under point, show the type in the echo area. This information is extracted from the `haskell-doc-prelude-types' alist of prelude functions and their types, or from the local functions in the current buffer. (fn &optional SYM) (defalias 'haskell-doc-show-type #[256 "\211\204\302 \262\211@\230?\205+\303\304!\206\305!\211\205)\306 \205)\307\310\311\")\262\207" [haskell-doc-last-data message-log-max haskell-ident-at-point haskell-doc-current-info--interaction t haskell-doc-sym-doc haskell-doc-in-code-p nil message "%s"] 5 (#$ . 39678) nil]) #@111 Async message stack. If non-nil, a previous eldoc message from an async call, that hasn't been displayed yet. (defvar haskell-doc-current-info--interaction-last nil (#$ . 40321)) #@293 Asynchronous call to `haskell-process-get-type'. Suitable for use in the eldoc function `haskell-doc-current-info'. If SYNC is non-nil, the call will be synchronous instead, and instead of calling `eldoc-print-current-symbol-info', the result will be returned directly. (fn &optional SYNC) (defalias 'haskell-doc-current-info--interaction #[256 "\301 \2059\302\211\211\262\203\302\211A\207\303 \203!\304\305 \306 \"\202#\307 \211\262\2057\2033\310\311\312#\207\310\313\"\266\202\207" [haskell-doc-current-info--interaction-last haskell-doc-in-code-p nil use-region-p buffer-substring-no-properties region-beginning region-end haskell-ident-at-point haskell-process-get-type identity t #[257 "\301B\302 \207" [haskell-doc-current-info--interaction-last async eldoc-print-current-symbol-info] 3 "\n\n(fn RESPONSE)"]] 7 (#$ . 40507)]) #@265 Asynchronously get the type of a given string. EXPR-STRING should be an expression passed to :type in ghci. CALLBACK will be called with a formatted type string. If SYNC is non-nil, make the call synchronously instead. (fn EXPR-STRING &optional CALLBACK SYNC) (defalias 'haskell-process-get-type #[769 "C\211\242\204 \211\301\240\210\302 \205\303\302 !\304\305\306\307#)\266\203?\2053\310\305\306\307#)\266\203?\311P\312\205g\205g\203O\313\"\242!!\207\314\315\316\305\317\320\n #\305\317\321 \n#%\"\210\322\207" [inhibit-changing-match-data #[257 "\300\301\"\207" [message "%s"] 4 "\n\n(fn RESPONSE)"] haskell-session-maybe haskell-session-process "\\`[[:space:]]*\\'" nil t string-match "\n" ":type " #[257 "\302\303\304\305#)\266\203\203\303\211\262\207\306\307\310#\262\311 \312\313\"\216\305\314\"\203?\315\211\225O\316\315\225\303O\317\320#P\262\266)\210 \203]\321\211\203\\\211@\306@A#\262A\266\202\202F\210\207" [inhibit-changing-match-data haskell-doc-prettify-types "\\`$" nil t string-match replace-regexp-in-string "\n\\'" "" match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] " :: " 0 propertize face eldoc-highlight-function-argument (("::" . "∷") ("=>" . "⇒") ("->" . "→"))] 8 "\n\n(fn RESPONSE)"] haskell-process-queue-sync-request haskell-process-queue-command record haskell-command make-closure #[257 "\302\300\301\"\207" [V0 V1 haskell-process-send-string] 4 "\n\n(fn _)"] #[514 "\300\242\301!!\207" [V0 V1] 5 "\n\n(fn _ RESPONSE)"] async] 19 (#$ . 41364)]) #@442 Show the type of given symbol SYM. For the function under point, show the type in the echo area. This information is extracted from the `haskell-doc-prelude-types' alist of prelude functions and their types, or from the local functions in the current buffer. If `haskell-doc-use-inf-haskell' is non-nil, this function will consult the inferior Haskell process for type/kind information, rather than using the haskell-doc database. (fn SYM) (defalias 'haskell-doc-sym-doc #[257 "\203G\211?\206\f\211\306\230?\2053\307\3101 \311\216\312!)0\202\"\210\307\211\2031\313\314\"\2031\211\202E\315\216\316!)\262\211\205E\313\314\"\205E\211)\207\307\211\211\n\317\"\266\202 \317\"\266\202\f\317\"\266\202 \317\"\266\202\203\200\203\200A\262\241\210\202\203\247\203\247A\262G\320U\203\231A@\262\321\262\321\262\241\210\202\203\277\203\277\321\262A\262\241\210\202\203\324\211\203\324\211A\262\241\210\202\322!\211\204\345\307\241\266\202\211@\262\211A\323\230\262 \203\376\204\376\324 !\262\241\266\2051\203!\204\325\326 #\202!\325\327\"\203.\330\331G\332$\210\211\262\266\207\207" [haskell-doc-use-inf-haskell message-log-max haskell-doc-reserved-ids haskell-doc-prelude-types haskell-doc-strategy-ids haskell-doc-user-defined-ids #1="" nil (error) #[0 "\300\301!\207" [message #1#] 2] inferior-haskell-type string-match " :: " #[0 "\300\301!\207" [message #1#] 2] inferior-haskell-kind assoc 2 t haskell-doc-get-and-format-fct-type "Variables" haskell-doc-get-global-fct-type format "%s :: %s" "%s" add-text-properties 0 (face bold) haskell-doc-show-reserved haskell-doc-last-data haskell-doc-show-prelude haskell-doc-show-strategy haskell-doc-show-user-defined haskell-doc-show-global-types haskell-doc-chop-off-fctname] 14 (#$ . 42951)]) #@83 Get the type of an (FCT POSITION) pair from the current buffer. (fn FCT-AND-POS) (defalias 'haskell-doc-grab-line #[257 "\302Ab\210\303 \210\304\305`\\\306#\204\302\207\307 \262\310 \2030\311y\210\303 \210\312\313w\210\211\307 P\262\202\314 \203;\301!\202<!\207" [haskell-doc-search-distance haskell-doc-chop-off-context "" beginning-of-line search-forward "::" t haskell-doc-grab haskell-doc-wrapped-type-p 1 " " nil haskell-doc-string-nub-ws] 6 (#$ . 44813)]) #@349 Check whether the type under the cursor is wrapped over several lines. The cursor must be at the end of a line, which contains the type. Currently, only the following is checked: If this line ends with a `->' or the next starts with an `->' it is a multi-line type (same for `=>'). `--' comments are ignored. ToDo: Check for matching parenthesis!. (defalias 'haskell-doc-wrapped-type-p #[0 "\212`\300 \210`\301b\210\302\303\304#\210\305\301x\210n\203%\306y\210\301\210\307 \262\202\204\310u\210\311h\312\"\2046\311h\313\"\203=\311g\314\"\204D\311g\315\"\203J\304\262\202\204\301y\210`\211b\210\305\301w\210\316\303!\203h\306y\210\301\210\307 \266\202\202\204\306u\210\311h\312\"\204y\311h\313\"\203\203\311g\314\"\203\203\304\262\210\266\202)\207" [beginning-of-line nil search-backward "--" t " " 1 haskell-doc-wrapped-type-p -1 char-equal 45 61 62 44 looking-at] 7 (#$ . 45297)]) #@104 Return the text from point to the end of the line, chopping off comments. Leaves point at end of line. (defalias 'haskell-doc-grab #[0 "\300`\301\210`\"\302\303\"\203\211\304\211\224O\207\207" [buffer-substring-no-properties nil string-match "--" 0] 4 (#$ . 46206)]) #@127 Replace all sequences of whitespace in STR by just one space. ToDo: Also eliminate leading and trailing whitespace. (fn STR) (defalias 'haskell-doc-string-nub-ws #[257 "\300\301\302T#\211\262\203\303\304\305\211$\262\202\207" [-1 string-match " [ \n]+\\|[ \n]+" replace-match " " t] 7 (#$ . 46484)]) #@74 Eliminate the context in a type represented by the string STR. (fn STR) (defalias 'haskell-doc-chop-off-context #[257 "\300\301\"\211\204\n\207\302\\\303O\207" [string-match "=>" 2 nil] 5 (#$ . 46802)]) #@81 Return a string describing OBJ of KIND (Variables, Types, Data). (fn OBJ KIND) (defalias 'haskell-doc-get-imenu-info #[514 "\302=\203\303 \"A\303\"\211\205\304!\207\305\207" [major-mode imenu--index-alist haskell-mode assoc haskell-doc-grab-line nil] 6 (#$ . 47017)]) #@58 Return a list of the imported modules in current buffer. (defalias 'haskell-doc-imported-list #[0 "\205C~\210eb\210\301\302\303\304#\2038\305\306!\307\211\2033\211@P\310!\203+\211B\262\210A\266\202\202\266\202 \211\237\207" [buffer-file-name re-search-forward "^\\s-*import\\s-+\\([^ \n]+\\)" nil t match-string 1 (".hs" ".lhs") file-exists-p] 7 (#$ . 47301) "fName of outer `include' file: "]) #@150 Do an `imenu' rescan on every file in FILELIST and return the fct-list. This function switches to and potentially loads many buffers. (fn FILELIST) (defalias 'haskell-doc-rescan-files #[257 "r\300\301\")\207" [mapcar #[257 "\301!q\210\302\303!\210\211\304\305\306\307\"A\"B\207" [imenu--index-alist find-file-noselect imenu--make-index-alist t mapcar #[257 "\211@\300!B\207" [haskell-doc-grab-line] 4 "\n\n(fn X)"] assoc "Variables"] 7 "\n\n(fn F)"]] 4 (#$ . 47721)]) #@78 Scan imported files for types of global fcts and update `haskell-doc-index'. (defalias 'haskell-doc-make-global-fct-index #[0 "\301\302 !\211\207" [haskell-doc-index haskell-doc-rescan-files haskell-doc-imported-list] 2 (#$ . 48200) nil]) #@88 Get type for function symbol SYM by examining `haskell-doc-index'. (fn &optional SYM) (defalias 'haskell-doc-get-global-fct-type #[256 "\212\211\204\301 \210\211\302\203C@\211@\303A\"\211\203:\211A\304\305\"\211\204*\2020\306\\\307O\310\311#\262\266A\262\266\202 \266\202)\207" [haskell-doc-index current-word "" assoc string-match "::" 2 nil format "[%s] %s"] 14 (#$ . 48446) nil]) #@78 Get the type and kind of FN by checking local and global functions. (fn FN) (defalias 'haskell-doc-get-and-format-fct-type #[257 "\212\300 \301\302\"\216\303\304\305\306\"\262\203\306B\262\305\307\"\262\203(\307B\262\2031\310B\262\262)\262)\207" [match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] "" nil haskell-doc-get-imenu-info "Variables" "Types" "Data"] 7 (#$ . 48860)]) #@59 Find the kind of SYM with `:kind' ghci feature. (fn SYM) (defalias 'inferior-haskell-kind #[257 "\300\301\302\"!\207" [inferior-haskell-get-result format ":kind %s"] 5 (#$ . 49295)]) #@59 Find the type of SYM with `:type' ghci feature. (fn SYM) (defalias 'inferior-haskell-type #[257 "\300\301\302\"!\207" [inferior-haskell-get-result format ":type (%s)"] 5 (#$ . 49486)]) (provide 'haskell-doc)