Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Fredrik Wieczerkowski
curry-tools
Commits
835a9f79
Commit
835a9f79
authored
Apr 24, 2016
by
Michael Hanus
Browse files
Tools adapted to renamings of library Sort
parent
4be06e60
Changes
9
Hide whitespace changes
Inline
Side-by-side
CASS/Configuration.curry
View file @
835a9f79
...
...
@@ -6,7 +6,7 @@
--- the analysis server (which is implicitly started if necessary).
---
--- @author Michael Hanus
--- @version
May
201
3
--- @version
April
201
6
--------------------------------------------------------------------------
module Configuration
...
...
@@ -80,7 +80,7 @@ updateRCFile = do
distprops
rcKeys :: [(String, String)] -> [String]
rcKeys = mergeSort
(<=)
. map fst
rcKeys = mergeSort . map fst
--- Reads the user property file (which must be installed!)
--- and store the properties in a global variable for next access.
...
...
analysis/RequiredValue.curry
View file @
835a9f79
...
...
@@ -9,7 +9,7 @@
--- the argument `True` to compute the result `False`.
---
--- @author Michael Hanus
--- @version
May
201
5
--- @version
April
201
6
-----------------------------------------------------------------------------
module RequiredValue(AType(..),showAType,AFType(..),showAFType,lubAType,
...
...
@@ -21,7 +21,7 @@ import FlatCurry.Types
import FlatCurry.Goodies
import GenericProgInfo
import List
import Sort(mergeSort)
import Sort(mergeSort
By
)
import TotallyDefined(siblingCons)
import Unsafe(trace)
...
...
@@ -118,7 +118,7 @@ dropEnv n (env,rtype) = (drop n env, rtype)
-- Sorts a list of environment/type pairs by the type.
sortEnvTypes :: [(AEnv,AType)] -> [(AEnv,AType)]
sortEnvTypes = mergeSort (\ (e1,t1) (e2,t2) -> (t1,e1) <= (t2,e2))
sortEnvTypes = mergeSort
By
(\ (e1,t1) (e2,t2) -> (t1,e1) <= (t2,e2))
------------------------------------------------------------------------------
--- The maximum number of different constructors considered for the
...
...
analysis/RequiredValues.curry
View file @
835a9f79
...
...
@@ -9,7 +9,7 @@
--- the argument `True` to compute the result `False`.
---
--- @author Michael Hanus
--- @version
June
201
5
--- @version
April
201
6
-----------------------------------------------------------------------------
module RequiredValues(AType(..),showAType,AFType(..),showAFType,lubAType,
...
...
@@ -21,7 +21,7 @@ import FlatCurry.Types
import FlatCurry.Goodies
import GenericProgInfo
import List hiding (union,intersect)
import Sort(mergeSort)
import Sort(mergeSort
By
)
import TotallyDefined(siblingCons)
import Unsafe(trace)
...
...
@@ -118,7 +118,7 @@ dropEnv n (env,rtype) = (drop n env, rtype)
-- Sorts a list of environment/type pairs by the type.
sortEnvTypes :: [(AEnv,AType)] -> [(AEnv,AType)]
sortEnvTypes = mergeSort (\ (e1,t1) (e2,t2) -> (t1,e1) <= (t2,e2))
sortEnvTypes = mergeSort
By
(\ (e1,t1) (e2,t2) -> (t1,e1) <= (t2,e2))
------------------------------------------------------------------------------
--- The maximum number of different constructors considered for the
...
...
browser/BrowserGUI.curry
View file @
835a9f79
...
...
@@ -3,7 +3,7 @@
--- programs.
---
--- @author Michael Hanus
--- @version
January
201
5
--- @version
April
201
6
---------------------------------------------------------------------
module BrowserGUI where
...
...
@@ -203,7 +203,7 @@ getFuns gs = readIORef gs >>= \ (GS _ _ _ funs _ _ _) -> return funs
storeSelectedFunctions :: IORef GuiState -> [FuncDecl] -> IO ()
storeSelectedFunctions gs funs = do
(GS t mm ms _ ct flag fana) <- readIORef gs
writeIORef gs (GS t mm ms (mergeSort leqFunc funs) ct flag fana)
writeIORef gs (GS t mm ms (mergeSort
By
leqFunc funs) ct flag fana)
setMainContentsModule :: IORef GuiState -> String -> ContentsKind -> String
-> IO ()
...
...
@@ -580,7 +580,8 @@ browserGUI gstate rmod rtxt names =
if mod==Nothing || null self then done else
getFuns gstate >>= \funs ->
let mainfun = funs!!(readNat self)
qfnames = mergeSort leqQName (union [funcName mainfun] (callsDirectly mainfun))
qfnames = mergeSortBy leqQName
(union [funcName mainfun] (callsDirectly mainfun))
in getAllFunctions gstate (showDoing gp) (fromJust mod) >>= \allfuns ->
storeSelectedFunctions gstate (map (findDecl4name allfuns) qfnames) >>
setFunctionListKind gstate False >>
...
...
@@ -594,7 +595,7 @@ browserGUI gstate rmod rtxt names =
getFuns gstate >>= \funs ->
let mainfun = funcName (funs!!(readNat self)) in
getAllFunctions gstate (showDoing gp) (fromJust mod) >>= \allfuns ->
let qfnames = mergeSort leqQName
let qfnames = mergeSort
By
leqQName
(union [mainfun]
(fromJust (lookup mainfun (indirectlyDependent allfuns))))
in storeSelectedFunctions gstate (map (findDecl4name allfuns) qfnames) >>
...
...
browser/ShowFlatCurry.curry
View file @
835a9f79
...
...
@@ -9,7 +9,7 @@
--- generated from a FlatCurry program.
---
--- @author Michael Hanus, Bjoern Peemoeller
--- @version
June
201
5
--- @version
April
201
6
------------------------------------------------------------------------------
module ShowFlatCurry
...
...
@@ -22,7 +22,7 @@ module ShowFlatCurry
import Char (isAlpha)
import List (intercalate)
import Pretty (pPrint)
import Sort (mergeSort,leqString)
import Sort (mergeSort
By
,leqString)
import FlatCurry.Types
import FlatCurry.Files
...
...
@@ -41,12 +41,12 @@ showFlatCurry = pPrint . ppProg defaultOptions
showInterface :: Bool -> Prog -> String
showInterface genstub (Prog mod imports types funcs ops) =
concatMap showInterfaceImport imports ++ "\n" ++
concatMap showInterfaceOpDecl (mergeSort leqOp ops) ++
concatMap showInterfaceOpDecl (mergeSort
By
leqOp ops) ++
(if null ops then "" else "\n") ++
concatMap (showInterfaceType (showQNameInModule mod))
(mergeSort leqType types) ++ "\n" ++
(mergeSort
By
leqType types) ++ "\n" ++
concatMap (showInterfaceFunc (showQNameInModule mod) genstub)
(mergeSort leqFunc funcs) ++ "\n"
(mergeSort
By
leqFunc funcs) ++ "\n"
-- show import declaration
showInterfaceImport :: String -> String
...
...
currydoc/CurryDocHtml.curry
View file @
835a9f79
...
...
@@ -2,7 +2,7 @@
--- Operations to generate documentation in HTML format.
---
--- @author Michael Hanus, Jan Tikovsky
--- @version
January
2016
--- @version
April
2016
----------------------------------------------------------------------
module CurryDocHtml where
...
...
@@ -622,7 +622,8 @@ indexPage modnames =
(if length modnames == 1
then []
else [ulist (map (\m->[href (m++".html") [htxt (m++".curry ")]])
(mergeSort leqStringIgnoreCase modnames))]) ++ [explainIcons]
(mergeSortBy leqStringIgnoreCase modnames))])
++ [explainIcons]
-- Paragraph to explain the meaning of the icons:
explainIcons :: HtmlExp
...
...
@@ -667,7 +668,7 @@ showModNameRef (modname,name) =
)
sortNames :: [(a,String)] -> [(a,String)]
sortNames names = mergeSort (\(_,n1) (_,n2)->leqStringIgnoreCase n1 n2) names
sortNames names = mergeSort
By
(\(_,n1) (_,n2)->leqStringIgnoreCase n1 n2) names
--------------------------------------------------------------------------
...
...
@@ -888,7 +889,7 @@ opnameDoc = style "opname"
-- Sorts a list of strings.
sortStrings :: [String] -> [String]
sortStrings strings = mergeSort leqStringIgnoreCase strings
sortStrings strings = mergeSort
By
leqStringIgnoreCase strings
-- Returns the first sentence in a string:
firstSentence :: String -> String
...
...
genint/GenInt.curry
View file @
835a9f79
...
...
@@ -9,7 +9,7 @@
--- generated from a FlatCurry program.
---
--- @author Michael Hanus
--- @version
November
201
4
--- @version
April
201
6
------------------------------------------------------------------------------
{-# OPTIONS_CYMAKE -Wno-incomplete-patterns -Wno-missing-signatures #-}
...
...
@@ -23,7 +23,7 @@ import Char(isAlpha)
import System(getArgs,getEnviron,system)
import Directory
import FileGoodies
import Sort(mergeSort,leqString)
import Sort(mergeSort
By
,leqString)
import Distribution(stripCurrySuffix,modNameToPath
,lookupModuleSourceInLoadPath)
...
...
@@ -82,12 +82,12 @@ genInt genstub progname = do
(Prog mod imports types funcs ops) <- getFlatInt progname
return $ "module " ++ mod ++ " where\n" ++
concatMap showInterfaceImport imports ++ "\n" ++
concatMap showInterfaceOpDecl (mergeSort leqOp ops) ++
concatMap showInterfaceOpDecl (mergeSort
By
leqOp ops) ++
(if null ops then "" else "\n") ++
concatMap (showInterfaceType (showQNameInModule mod))
(mergeSort leqType types) ++ "\n" ++
(mergeSort
By
leqType types) ++ "\n" ++
concatMap (showInterfaceFunc (showQNameInModule mod) genstub)
(mergeSort leqFunc funcs) ++ "\n"
(mergeSort
By
leqFunc funcs) ++ "\n"
-- Get a FlatCurry program (parse only if necessary):
getFlatInt :: String -> IO Prog
...
...
importcalls/ImportCalls.curry
View file @
835a9f79
...
...
@@ -2,7 +2,7 @@
--- Show all calls to imported functions in a module
---
--- @author Michael Hanus
--- @version
September
201
5
--- @version
April
201
6
-----------------------------------------------------------------------------
module ImportCalls(main,showImportCalls) where
...
...
@@ -49,8 +49,8 @@ formatImpCalls impcalls =
getAllImpCalls :: Prog -> [(String,[String])]
getAllImpCalls (Prog mod imps _ funs _) =
calls2impCalls imps
(mergeSort (\ (_,n1) (_,n2) -> n1 <= n2)
(allFunCalls mod funs))
(mergeSort
By
(\ (_,n1) (_,n2) -> n1 <= n2)
(allFunCalls mod funs))
calls2impCalls :: [String] -> [QName] -> [(String,[String])]
calls2impCalls [] _ = []
...
...
spicey/scaffolding/ViewGeneration.curry
View file @
835a9f79
...
...
@@ -496,7 +496,7 @@ listView erdname (Entity entityName attrlist) _ _ =
],
applyF (pre "map") [
constF (viewModuleName entityName,"list"++entityName),
applyF ("Sort","mergeSort") [
applyF ("Sort","mergeSort
By
") [
constF (viewModuleName entityName,"leq"++entityName),
CVar entsvar
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment