Search is not available for this dataset
repo_name string | path string | license string | full_code string | full_size int64 | uncommented_code string | uncommented_size int64 | function_only_code string | function_only_size int64 | is_commented bool | is_signatured bool | n_ast_errors int64 | ast_max_depth int64 | n_whitespaces int64 | n_ast_nodes int64 | n_ast_terminals int64 | n_ast_nonterminals int64 | loc int64 | cycloplexity int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
klazuka/thrift | test/hs/TestClient.hs | apache-2.0 | parseFlags [] opts = Just opts | 30 | parseFlags [] opts = Just opts | 30 | parseFlags [] opts = Just opts | 30 | false | false | 0 | 6 | 5 | 16 | 7 | 9 | null | null |
mitsuji/bingo | app/Bingo.hs | bsd-3-clause | testl = do
print $ filterLT2RB [1,2,3,4,5,6,7,8,9]
print $ filterLT2RB [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25] | 145 | testl = do
print $ filterLT2RB [1,2,3,4,5,6,7,8,9]
print $ filterLT2RB [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25] | 145 | testl = do
print $ filterLT2RB [1,2,3,4,5,6,7,8,9]
print $ filterLT2RB [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25] | 145 | false | false | 1 | 10 | 17 | 132 | 79 | 53 | null | null |
leshchevds/ganeti | src/Ganeti/Query/Network.hs | bsd-2-clause | -- TODO: the following fields are not implemented yet: external_reservations
-- | Given a network's UUID, this function lists all connections from
-- the network to nodegroups including the respective mode and links.
getGroupConnections ::
ConfigData -> String -> [(String, String, String, String)]
getGroupConnections cfg network_uuid =
mapMaybe (getGroupConnection network_uuid)
((Map.elems . fromContainer . configNodegroups) cfg) | 440 | getGroupConnections ::
ConfigData -> String -> [(String, String, String, String)]
getGroupConnections cfg network_uuid =
mapMaybe (getGroupConnection network_uuid)
((Map.elems . fromContainer . configNodegroups) cfg) | 222 | getGroupConnections cfg network_uuid =
mapMaybe (getGroupConnection network_uuid)
((Map.elems . fromContainer . configNodegroups) cfg) | 138 | true | true | 0 | 11 | 62 | 79 | 41 | 38 | null | null |
iqsf/HFitUI | src/WebUI/Scripts/JavaScript/HJSVars.hs | bsd-3-clause | eqlMT :: (BuilderHSL n)
=> n
-> HSL HLangJS HLangJS
-> HSL HLangJS HLangJS
eqlMT name val = do
c <- ask
s <- get
var <- return $ HL $ HJsEql name $ upjs val c s
modify (:> var)
return $ HL name
-- | Данные имени связи переменных | 272 | eqlMT :: (BuilderHSL n)
=> n
-> HSL HLangJS HLangJS
-> HSL HLangJS HLangJS
eqlMT name val = do
c <- ask
s <- get
var <- return $ HL $ HJsEql name $ upjs val c s
modify (:> var)
return $ HL name
-- | Данные имени связи переменных | 272 | eqlMT name val = do
c <- ask
s <- get
var <- return $ HL $ HJsEql name $ upjs val c s
modify (:> var)
return $ HL name
-- | Данные имени связи переменных | 177 | false | true | 0 | 10 | 94 | 107 | 50 | 57 | null | null |
ciderpunx/project_euler_in_haskell | euler040.hs | gpl-2.0 | -- let's try the simplest thing that could possibly work. no maths involved!
main :: IO ()
main = print answer | 111 | main :: IO ()
main = print answer | 33 | main = print answer | 19 | true | true | 1 | 6 | 21 | 23 | 10 | 13 | null | null |
brendanhay/gogol | gogol-iam/gen/Network/Google/IAM/Types/Product.hs | mpl-2.0 | -- | The list of matching roles.
qgrrRoles :: Lens' QueryGrantableRolesResponse [Role]
qgrrRoles
= lens _qgrrRoles (\ s a -> s{_qgrrRoles = a}) .
_Default
. _Coerce | 178 | qgrrRoles :: Lens' QueryGrantableRolesResponse [Role]
qgrrRoles
= lens _qgrrRoles (\ s a -> s{_qgrrRoles = a}) .
_Default
. _Coerce | 145 | qgrrRoles
= lens _qgrrRoles (\ s a -> s{_qgrrRoles = a}) .
_Default
. _Coerce | 91 | true | true | 2 | 10 | 40 | 57 | 28 | 29 | null | null |
jspahrsummers/network | Network/URI.hs | bsd-3-clause | -- RFC3986, section 3
--
-- URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
--
-- hier-part = "//" authority path-abempty
-- / path-abs
-- / path-rootless
-- / path-empty
uri :: URIParser URI
uri =
do { us <- try uscheme
-- ; ua <- option Nothing ( do { try (string "//") ; uauthority } )
-- ; up <- upath
; (ua,up) <- hierPart
; uq <- option "" ( do { char '?' ; uquery } )
; uf <- option "" ( do { char '#' ; ufragment } )
; return $ URI
{ uriScheme = us
, uriAuthority = ua
, uriPath = up
, uriQuery = uq
, uriFragment = uf
}
} | 747 | uri :: URIParser URI
uri =
do { us <- try uscheme
-- ; ua <- option Nothing ( do { try (string "//") ; uauthority } )
-- ; up <- upath
; (ua,up) <- hierPart
; uq <- option "" ( do { char '?' ; uquery } )
; uf <- option "" ( do { char '#' ; ufragment } )
; return $ URI
{ uriScheme = us
, uriAuthority = ua
, uriPath = up
, uriQuery = uq
, uriFragment = uf
}
} | 508 | uri =
do { us <- try uscheme
-- ; ua <- option Nothing ( do { try (string "//") ; uauthority } )
-- ; up <- upath
; (ua,up) <- hierPart
; uq <- option "" ( do { char '?' ; uquery } )
; uf <- option "" ( do { char '#' ; ufragment } )
; return $ URI
{ uriScheme = us
, uriAuthority = ua
, uriPath = up
, uriQuery = uq
, uriFragment = uf
}
} | 487 | true | true | 1 | 13 | 332 | 150 | 84 | 66 | null | null |
sirikid/arith | src/Arith/Parser.hs | bsd-3-clause | lookForElseBranch :: MonadError String ex => [Token] -> ex ([Token], Term)
lookForElseBranch = lookUntil (`elem` [KwThen, KwElse, EndOfExpression]) | 147 | lookForElseBranch :: MonadError String ex => [Token] -> ex ([Token], Term)
lookForElseBranch = lookUntil (`elem` [KwThen, KwElse, EndOfExpression]) | 147 | lookForElseBranch = lookUntil (`elem` [KwThen, KwElse, EndOfExpression]) | 72 | false | true | 0 | 9 | 17 | 57 | 33 | 24 | null | null |
jamshidh/ethereum-data-sql | src/Blockchain/DBM.hs | bsd-3-clause | connStr = "host=localhost dbname=eth user=postgres password=api port=5432" | 74 | connStr = "host=localhost dbname=eth user=postgres password=api port=5432" | 74 | connStr = "host=localhost dbname=eth user=postgres password=api port=5432" | 74 | false | false | 1 | 5 | 6 | 10 | 3 | 7 | null | null |
zeniuseducation/poly-euler | Alfa/haskell/impure/common.hs | epl-1.0 | maxBy f (x: []) = x | 19 | maxBy f (x: []) = x | 19 | maxBy f (x: []) = x | 19 | false | false | 0 | 8 | 5 | 20 | 10 | 10 | null | null |
lovasko/goat | test/Prop/Unique.hs | bsd-2-clause | uniqueEncValueFrame :: [Float]
-> [Float]
-> Bool
uniqueEncValueFrame xs ys
| xs == ys = valueEncode xs == valueEncode ys
| otherwise = valueEncode xs /= valueEncode ys | 213 | uniqueEncValueFrame :: [Float]
-> [Float]
-> Bool
uniqueEncValueFrame xs ys
| xs == ys = valueEncode xs == valueEncode ys
| otherwise = valueEncode xs /= valueEncode ys | 213 | uniqueEncValueFrame xs ys
| xs == ys = valueEncode xs == valueEncode ys
| otherwise = valueEncode xs /= valueEncode ys | 123 | false | true | 0 | 8 | 72 | 76 | 34 | 42 | null | null |
andrey013/pluginstest | Main.hs | mit | main :: IO ()
main = realMain | 29 | main :: IO ()
main = realMain | 29 | main = realMain | 15 | false | true | 0 | 6 | 6 | 16 | 8 | 8 | null | null |
cocreature/leksah | data/leksah-welcome/src/Main.hs | gpl-2.0 | -- | Executable Entry Point
--
-- Here is the entry point for the leksah-welcome executable
--
-- To run it
-- * Select Leksah menu item Package -> Run (or the cogs on the toolbar)
-- * Select "exeMain" and press Ctrl+Enter to run them in ghci
-- * Run "leksah-wellcome" from the command line
main :: IO ()
main = putStrLn (hello "World") | 344 | main :: IO ()
main = putStrLn (hello "World") | 45 | main = putStrLn (hello "World") | 31 | true | true | 0 | 7 | 70 | 33 | 20 | 13 | null | null |
jonaprieto/athena | src/Athena/Utils/PrettyPrint.hs | mit | -- | The document @squote@ contains a single quote, \"'\".
squote ∷ Doc
squote = char '\'' | 90 | squote ∷ Doc
squote = char '\'' | 31 | squote = char '\'' | 18 | true | true | 0 | 6 | 16 | 22 | 9 | 13 | null | null |
yliu120/K3 | src/Language/K3/Analysis/SEffects/Inference.hs | apache-2.0 | filkupep :: FIEnv -> Identifier -> Either Text (K3 Provenance)
filkupep env x = fpblkup (fpbenv env) x | 102 | filkupep :: FIEnv -> Identifier -> Either Text (K3 Provenance)
filkupep env x = fpblkup (fpbenv env) x | 102 | filkupep env x = fpblkup (fpbenv env) x | 39 | false | true | 0 | 9 | 17 | 46 | 22 | 24 | null | null |
LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Atomic/HandleAtomicWrite.hs | bsd-3-clause | updDiscover :: MonadStateWrite m
=> Container -> ItemId -> ContentId ItemKind -> IA.AspectRecord
-> m ()
updDiscover _c iid ik arItem = do
itemD <- getsState sitemD
COps{coItemSpeedup} <- getsState scops
let kmIsConst = IA.kmConst $ getKindMean ik coItemSpeedup
discoKind <- getsState sdiscoKind
let discoverAtMostAspect = do
discoAspect <- getsState sdiscoAspect
if kmIsConst || iid `EM.member` discoAspect
then atomicFail "item already fully discovered"
else discoverAspect iid arItem
case EM.lookup iid itemD of
Nothing -> atomicFail "discovered item unheard of"
Just item -> case jkind item of
IdentityObvious _ -> discoverAtMostAspect
IdentityCovered ix _ik -> case EM.lookup ix discoKind of
Just{} -> discoverAtMostAspect
Nothing -> do
discoverKind ix ik
unless kmIsConst $ discoverAspect iid arItem
resetActorMaxSkills | 951 | updDiscover :: MonadStateWrite m
=> Container -> ItemId -> ContentId ItemKind -> IA.AspectRecord
-> m ()
updDiscover _c iid ik arItem = do
itemD <- getsState sitemD
COps{coItemSpeedup} <- getsState scops
let kmIsConst = IA.kmConst $ getKindMean ik coItemSpeedup
discoKind <- getsState sdiscoKind
let discoverAtMostAspect = do
discoAspect <- getsState sdiscoAspect
if kmIsConst || iid `EM.member` discoAspect
then atomicFail "item already fully discovered"
else discoverAspect iid arItem
case EM.lookup iid itemD of
Nothing -> atomicFail "discovered item unheard of"
Just item -> case jkind item of
IdentityObvious _ -> discoverAtMostAspect
IdentityCovered ix _ik -> case EM.lookup ix discoKind of
Just{} -> discoverAtMostAspect
Nothing -> do
discoverKind ix ik
unless kmIsConst $ discoverAspect iid arItem
resetActorMaxSkills | 951 | updDiscover _c iid ik arItem = do
itemD <- getsState sitemD
COps{coItemSpeedup} <- getsState scops
let kmIsConst = IA.kmConst $ getKindMean ik coItemSpeedup
discoKind <- getsState sdiscoKind
let discoverAtMostAspect = do
discoAspect <- getsState sdiscoAspect
if kmIsConst || iid `EM.member` discoAspect
then atomicFail "item already fully discovered"
else discoverAspect iid arItem
case EM.lookup iid itemD of
Nothing -> atomicFail "discovered item unheard of"
Just item -> case jkind item of
IdentityObvious _ -> discoverAtMostAspect
IdentityCovered ix _ik -> case EM.lookup ix discoKind of
Just{} -> discoverAtMostAspect
Nothing -> do
discoverKind ix ik
unless kmIsConst $ discoverAspect iid arItem
resetActorMaxSkills | 822 | false | true | 0 | 19 | 240 | 271 | 122 | 149 | null | null |
ddssff/lens | src/Language/Haskell/TH/Lens.hs | bsd-3-clause | _ParS :: Prism' Stmt [[Stmt]]
_ParS
= prism' reviewer remitter
where
reviewer = ParS
remitter (ParS x) = Just x
remitter _ = Nothing
#if MIN_VERSION_template_haskell(2,15,0) | 196 | _ParS :: Prism' Stmt [[Stmt]]
_ParS
= prism' reviewer remitter
where
reviewer = ParS
remitter (ParS x) = Just x
remitter _ = Nothing
#if MIN_VERSION_template_haskell(2,15,0) | 196 | _ParS
= prism' reviewer remitter
where
reviewer = ParS
remitter (ParS x) = Just x
remitter _ = Nothing
#if MIN_VERSION_template_haskell(2,15,0) | 166 | false | true | 2 | 8 | 48 | 63 | 31 | 32 | null | null |
bennofs/cabal | Cabal/Distribution/PackageDescription/Check.hs | bsd-3-clause | checkSetupExists :: Monad m => CheckPackageContentOps m
-> PackageDescription
-> m (Maybe PackageCheck)
checkSetupExists ops pkg = do
let simpleBuild = buildType pkg == Just Simple
hsexists <- doesFileExist ops "Setup.hs"
lhsexists <- doesFileExist ops "Setup.lhs"
return $ check (not simpleBuild && not hsexists && not lhsexists) $
PackageDistInexcusable $
"The package is missing a Setup.hs or Setup.lhs script." | 467 | checkSetupExists :: Monad m => CheckPackageContentOps m
-> PackageDescription
-> m (Maybe PackageCheck)
checkSetupExists ops pkg = do
let simpleBuild = buildType pkg == Just Simple
hsexists <- doesFileExist ops "Setup.hs"
lhsexists <- doesFileExist ops "Setup.lhs"
return $ check (not simpleBuild && not hsexists && not lhsexists) $
PackageDistInexcusable $
"The package is missing a Setup.hs or Setup.lhs script." | 467 | checkSetupExists ops pkg = do
let simpleBuild = buildType pkg == Just Simple
hsexists <- doesFileExist ops "Setup.hs"
lhsexists <- doesFileExist ops "Setup.lhs"
return $ check (not simpleBuild && not hsexists && not lhsexists) $
PackageDistInexcusable $
"The package is missing a Setup.hs or Setup.lhs script." | 329 | false | true | 0 | 14 | 111 | 124 | 55 | 69 | null | null |
Motions/motions | Setup.hs | apache-2.0 | removeDirectoryIfExists :: FilePath -> IO ()
removeDirectoryIfExists dirName = catchIOError (removeDirectory dirName) $
unless <$> isDoesNotExistError <*> ioError | 166 | removeDirectoryIfExists :: FilePath -> IO ()
removeDirectoryIfExists dirName = catchIOError (removeDirectory dirName) $
unless <$> isDoesNotExistError <*> ioError | 166 | removeDirectoryIfExists dirName = catchIOError (removeDirectory dirName) $
unless <$> isDoesNotExistError <*> ioError | 121 | false | true | 0 | 10 | 21 | 44 | 21 | 23 | null | null |
nevrenato/Hets_Fork | CSL/Keywords.hs | gpl-2.0 | subS :: String
subS = "sub" | 28 | subS :: String
subS = "sub" | 27 | subS = "sub" | 12 | false | true | 0 | 6 | 6 | 18 | 7 | 11 | null | null |
adamflott/scotty | Web/Scotty/Action.hs | bsd-3-clause | body :: (ScottyError e, MonadIO m) => ActionT e m BL.ByteString
body = ActionT ask >>= (liftIO . getBody) | 106 | body :: (ScottyError e, MonadIO m) => ActionT e m BL.ByteString
body = ActionT ask >>= (liftIO . getBody) | 106 | body = ActionT ask >>= (liftIO . getBody) | 41 | false | true | 0 | 7 | 19 | 49 | 25 | 24 | null | null |
elfeck/elfeckcom | src/Web/BetterMdParser.hs | mit | procL4Col (e : d) doc = procL4Col d (e : doc) | 45 | procL4Col (e : d) doc = procL4Col d (e : doc) | 45 | procL4Col (e : d) doc = procL4Col d (e : doc) | 45 | false | false | 0 | 7 | 10 | 30 | 15 | 15 | null | null |
md5/hs-zenfolio | Web/Zenfolio/RPC.hs | bsd-3-clause | zfAgentHeaders :: [H.Header]
zfAgentHeaders = [ H.Header H.HdrUserAgent zfUserAgent
, H.Header (H.HdrCustom "X-Zenfolio-User-Agent") zfUserAgent
] | 180 | zfAgentHeaders :: [H.Header]
zfAgentHeaders = [ H.Header H.HdrUserAgent zfUserAgent
, H.Header (H.HdrCustom "X-Zenfolio-User-Agent") zfUserAgent
] | 180 | zfAgentHeaders = [ H.Header H.HdrUserAgent zfUserAgent
, H.Header (H.HdrCustom "X-Zenfolio-User-Agent") zfUserAgent
] | 151 | false | true | 0 | 9 | 48 | 46 | 24 | 22 | null | null |
TomMD/cryptol | sbv/Data/SBV/Compilers/C.hs | bsd-3-clause | -- | The printf specifier for the type
specifier :: CgConfig -> SW -> Doc
specifier cfg sw = case kindOf sw of
KBool -> spec (False, 1)
KBounded b i -> spec (b, i)
KUnbounded -> spec (True, fromJust (cgInteger cfg))
KReal -> specF (fromJust (cgReal cfg))
KFloat -> specF CgFloat
KDouble -> specF CgDouble
KUninterpreted s -> die $ "uninterpreted sort: " ++ s
where spec :: (Bool, Int) -> Doc
spec (False, 1) = text "%d"
spec (False, 8) = text "%\"PRIu8\""
spec (True, 8) = text "%\"PRId8\""
spec (False, 16) = text "0x%04\"PRIx16\"U"
spec (True, 16) = text "%\"PRId16\""
spec (False, 32) = text "0x%08\"PRIx32\"UL"
spec (True, 32) = text "%\"PRId32\"L"
spec (False, 64) = text "0x%016\"PRIx64\"ULL"
spec (True, 64) = text "%\"PRId64\"LL"
spec (s, sz) = die $ "Format specifier at type " ++ (if s then "SInt" else "SWord") ++ show sz
specF :: CgSRealType -> Doc
specF CgFloat = text "%f"
specF CgDouble = text "%f"
specF CgLongDouble = text "%Lf"
-- | Make a constant value of the given type. We don't check for out of bounds here, as it should not be needed.
-- There are many options here, using binary, decimal, etc. We simply
-- 8-bit or less constants using decimal; otherwise we use hex.
-- Note that this automatically takes care of the boolean (1-bit) value problem, since it
-- shows the result as an integer, which is OK as far as C is concerned. | 1,696 | specifier :: CgConfig -> SW -> Doc
specifier cfg sw = case kindOf sw of
KBool -> spec (False, 1)
KBounded b i -> spec (b, i)
KUnbounded -> spec (True, fromJust (cgInteger cfg))
KReal -> specF (fromJust (cgReal cfg))
KFloat -> specF CgFloat
KDouble -> specF CgDouble
KUninterpreted s -> die $ "uninterpreted sort: " ++ s
where spec :: (Bool, Int) -> Doc
spec (False, 1) = text "%d"
spec (False, 8) = text "%\"PRIu8\""
spec (True, 8) = text "%\"PRId8\""
spec (False, 16) = text "0x%04\"PRIx16\"U"
spec (True, 16) = text "%\"PRId16\""
spec (False, 32) = text "0x%08\"PRIx32\"UL"
spec (True, 32) = text "%\"PRId32\"L"
spec (False, 64) = text "0x%016\"PRIx64\"ULL"
spec (True, 64) = text "%\"PRId64\"LL"
spec (s, sz) = die $ "Format specifier at type " ++ (if s then "SInt" else "SWord") ++ show sz
specF :: CgSRealType -> Doc
specF CgFloat = text "%f"
specF CgDouble = text "%f"
specF CgLongDouble = text "%Lf"
-- | Make a constant value of the given type. We don't check for out of bounds here, as it should not be needed.
-- There are many options here, using binary, decimal, etc. We simply
-- 8-bit or less constants using decimal; otherwise we use hex.
-- Note that this automatically takes care of the boolean (1-bit) value problem, since it
-- shows the result as an integer, which is OK as far as C is concerned. | 1,657 | specifier cfg sw = case kindOf sw of
KBool -> spec (False, 1)
KBounded b i -> spec (b, i)
KUnbounded -> spec (True, fromJust (cgInteger cfg))
KReal -> specF (fromJust (cgReal cfg))
KFloat -> specF CgFloat
KDouble -> specF CgDouble
KUninterpreted s -> die $ "uninterpreted sort: " ++ s
where spec :: (Bool, Int) -> Doc
spec (False, 1) = text "%d"
spec (False, 8) = text "%\"PRIu8\""
spec (True, 8) = text "%\"PRId8\""
spec (False, 16) = text "0x%04\"PRIx16\"U"
spec (True, 16) = text "%\"PRId16\""
spec (False, 32) = text "0x%08\"PRIx32\"UL"
spec (True, 32) = text "%\"PRId32\"L"
spec (False, 64) = text "0x%016\"PRIx64\"ULL"
spec (True, 64) = text "%\"PRId64\"LL"
spec (s, sz) = die $ "Format specifier at type " ++ (if s then "SInt" else "SWord") ++ show sz
specF :: CgSRealType -> Doc
specF CgFloat = text "%f"
specF CgDouble = text "%f"
specF CgLongDouble = text "%Lf"
-- | Make a constant value of the given type. We don't check for out of bounds here, as it should not be needed.
-- There are many options here, using binary, decimal, etc. We simply
-- 8-bit or less constants using decimal; otherwise we use hex.
-- Note that this automatically takes care of the boolean (1-bit) value problem, since it
-- shows the result as an integer, which is OK as far as C is concerned. | 1,622 | true | true | 15 | 12 | 586 | 395 | 210 | 185 | null | null |
alphaHeavy/cabal | Cabal/Distribution/Simple/Setup.hs | bsd-3-clause | installCommand :: CommandUI InstallFlags
installCommand = makeCommand name shortDesc longDesc defaultInstallFlags options
where
name = "install"
shortDesc = "Copy the files into the install locations. Run register."
longDesc = Just $ \_ ->
"Unlike the copy command, install calls the register command.\n"
++ "If you want to install into a location that is not what was\n"
++ "specified in the configure step, use the copy command.\n"
options showOrParseArgs =
[optionVerbosity installVerbosity (\v flags -> flags { installVerbosity = v })
,optionDistPref
installDistPref (\d flags -> flags { installDistPref = d })
showOrParseArgs
,option "" ["inplace"]
"install the package in the install subdirectory of the dist prefix, so it can be used without being installed"
installInPlace (\v flags -> flags { installInPlace = v })
trueArg
,option "" ["shell-wrappers"]
"using shell script wrappers around executables"
installUseWrapper (\v flags -> flags { installUseWrapper = v })
(boolOpt [] [])
,option "" ["package-db"] ""
installPackageDB (\v flags -> flags { installPackageDB = v })
(choiceOpt [ (Flag UserPackageDB, ([],["user"]),
"upon configuration register this package in the user's local package database")
, (Flag GlobalPackageDB, ([],["global"]),
"(default) upon configuration register this package in the system-wide package database")])
] | 1,588 | installCommand :: CommandUI InstallFlags
installCommand = makeCommand name shortDesc longDesc defaultInstallFlags options
where
name = "install"
shortDesc = "Copy the files into the install locations. Run register."
longDesc = Just $ \_ ->
"Unlike the copy command, install calls the register command.\n"
++ "If you want to install into a location that is not what was\n"
++ "specified in the configure step, use the copy command.\n"
options showOrParseArgs =
[optionVerbosity installVerbosity (\v flags -> flags { installVerbosity = v })
,optionDistPref
installDistPref (\d flags -> flags { installDistPref = d })
showOrParseArgs
,option "" ["inplace"]
"install the package in the install subdirectory of the dist prefix, so it can be used without being installed"
installInPlace (\v flags -> flags { installInPlace = v })
trueArg
,option "" ["shell-wrappers"]
"using shell script wrappers around executables"
installUseWrapper (\v flags -> flags { installUseWrapper = v })
(boolOpt [] [])
,option "" ["package-db"] ""
installPackageDB (\v flags -> flags { installPackageDB = v })
(choiceOpt [ (Flag UserPackageDB, ([],["user"]),
"upon configuration register this package in the user's local package database")
, (Flag GlobalPackageDB, ([],["global"]),
"(default) upon configuration register this package in the system-wide package database")])
] | 1,588 | installCommand = makeCommand name shortDesc longDesc defaultInstallFlags options
where
name = "install"
shortDesc = "Copy the files into the install locations. Run register."
longDesc = Just $ \_ ->
"Unlike the copy command, install calls the register command.\n"
++ "If you want to install into a location that is not what was\n"
++ "specified in the configure step, use the copy command.\n"
options showOrParseArgs =
[optionVerbosity installVerbosity (\v flags -> flags { installVerbosity = v })
,optionDistPref
installDistPref (\d flags -> flags { installDistPref = d })
showOrParseArgs
,option "" ["inplace"]
"install the package in the install subdirectory of the dist prefix, so it can be used without being installed"
installInPlace (\v flags -> flags { installInPlace = v })
trueArg
,option "" ["shell-wrappers"]
"using shell script wrappers around executables"
installUseWrapper (\v flags -> flags { installUseWrapper = v })
(boolOpt [] [])
,option "" ["package-db"] ""
installPackageDB (\v flags -> flags { installPackageDB = v })
(choiceOpt [ (Flag UserPackageDB, ([],["user"]),
"upon configuration register this package in the user's local package database")
, (Flag GlobalPackageDB, ([],["global"]),
"(default) upon configuration register this package in the system-wide package database")])
] | 1,547 | false | true | 10 | 13 | 433 | 319 | 170 | 149 | null | null |
comonoidial/ALFIN | Backend/Assemble.hs | mit | asmTag _ cs nb (BoxCon c) = (singlePrimK , Box (snd $ fromJust $ lookup c cs) ) | 124 | asmTag _ cs nb (BoxCon c) = (singlePrimK , Box (snd $ fromJust $ lookup c cs) ) | 124 | asmTag _ cs nb (BoxCon c) = (singlePrimK , Box (snd $ fromJust $ lookup c cs) ) | 124 | false | false | 1 | 10 | 62 | 51 | 23 | 28 | null | null |
bergmark/hlint | src/Parallel.hs | bsd-3-clause | parallel1 (x:xs) = do
x2 <- x
xs2 <- unsafeInterleaveIO $ parallel1 xs
return $ x2:xs2 | 98 | parallel1 (x:xs) = do
x2 <- x
xs2 <- unsafeInterleaveIO $ parallel1 xs
return $ x2:xs2 | 98 | parallel1 (x:xs) = do
x2 <- x
xs2 <- unsafeInterleaveIO $ parallel1 xs
return $ x2:xs2 | 98 | false | false | 0 | 9 | 27 | 48 | 22 | 26 | null | null |
SeanRBurton/aeson | Data/Aeson/Types/Generic.hs | bsd-3-clause | gbuilder :: GToJSON f => Options -> f a -> Builder
gbuilder opts = fromEncoding . gToEncoding opts | 98 | gbuilder :: GToJSON f => Options -> f a -> Builder
gbuilder opts = fromEncoding . gToEncoding opts | 98 | gbuilder opts = fromEncoding . gToEncoding opts | 47 | false | true | 0 | 8 | 17 | 39 | 18 | 21 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrelNames.hs | bsd-3-clause | rootMainKey, runMainKey :: Unique
rootMainKey = mkPreludeMiscIdUnique 101 | 91 | rootMainKey, runMainKey :: Unique
rootMainKey = mkPreludeMiscIdUnique 101 | 91 | rootMainKey = mkPreludeMiscIdUnique 101 | 57 | false | true | 0 | 5 | 25 | 16 | 9 | 7 | null | null |
andreagenso/java2scala | test/J2s/Parser/Test.hs | apache-2.0 | tspj5 = parser (path ++ "workspaceclipse_haskell/java2scala/test/J2s/Parser/java/AbstractListableBeanFactoryTests.java") | 120 | tspj5 = parser (path ++ "workspaceclipse_haskell/java2scala/test/J2s/Parser/java/AbstractListableBeanFactoryTests.java") | 120 | tspj5 = parser (path ++ "workspaceclipse_haskell/java2scala/test/J2s/Parser/java/AbstractListableBeanFactoryTests.java") | 120 | false | false | 0 | 7 | 5 | 16 | 8 | 8 | null | null |
DavidAlphaFox/darcs | harness/Darcs/Test/Patch/Examples/Set2Unwitnessed.hs | gpl-2.0 | w_commuteExamples :: (FromPrim p, Merge p, PrimPatchBase p, PrimOf p ~ Prim) => [Sealed2 (p W.:> p)]
w_commuteExamples = [
commutePairFromTWFP seal2 $
WithStartState (makeSimpleRepo "file" [])
(TWFP 3
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "h"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "b"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "f"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "v"]))
(SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack "f"] [])) NilTree)))))),
commutePairFromTWFP seal2 $
WithStartState
(makeSimpleRepo "file" [BC.pack "f",BC.pack "s",BC.pack "d"])
(TWFP 3
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack "d"] [])) NilTree)
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "f"] [])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "f"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "s",BC.pack "d"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "v"])) NilTree)))))),
{- commutePairFromTWFP seal2 $
WithStartState
(makeSimpleRepo "file" [BC.pack "f",BC.pack "u",
BC.pack "s",BC.pack "d"])
(TWFP 5
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 5 [] [BC.pack "x"]))
(SeqTree (FP (fp2fn "./file") (Hunk 4 [BC.pack "d"] [])) NilTree))
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "f",BC.pack "u"] [])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "f"] []))
(SeqTree (FP(fp2fn "./file") (Hunk 1 [BC.pack "u",BC.pack "s",BC.pack "d"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "a"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "a"] [])) NilTree))))))),-}
commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [BC.pack "n",BC.pack "t",BC.pack "h"])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "n",BC.pack "t",BC.pack "h"] []))
NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack "h"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "n"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "t"] [])) NilTree)))),
commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "n"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "i"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "i"])) NilTree))),
commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "c"]))
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "c"] [BC.pack "r"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "h"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "d"])) NilTree))))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "f"])) NilTree)),
commutePairFromTWFP seal2 $
WithStartState (makeSimpleRepo "file" [])
(TWFP 1
(ParTree
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "t"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "t"])) NilTree))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "f"])) NilTree))),
commutePairFromTWFP seal2 $
WithStartState (makeSimpleRepo "file" [BC.pack "f",BC.pack " r",
BC.pack "c",BC.pack "v"])
(TWFP 4
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack "c",BC.pack "v"] []))
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack "r"] []))
(SeqTree (FP (fp2fn "fi le") (Hunk 1 [BC.pack "f"] [])) NilTree))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "f",BC.pack "r"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "y"])) NilTree))))
(SeqTree (FP (fp2fn "./file") (Hunk 4 [BC.pack "v"] [])) NilTree))),
commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "z"])) NilTree)
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "f"])) NilTree)
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "r"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "d"])) NilTree))))
, commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [BC.pack "t",BC.pack "r",BC.pack "h"])
(ParTree
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "t",BC.pack "r",BC.pack "h"] []))
NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "o"])) NilTree))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "t"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack "h"] [])) NilTree)))
, commutePairFromTWFP seal2 $
WithStartState (makeSimpleRepo "file" []) $
TWFP 2
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "h"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "y"]))
(SeqTree (FP (fp2fn "./file") (Hunk 2 [] [BC.pack "m"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "v"])) NilTree))))
, commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "p"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "p"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "c"])) NilTree)))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "z"])) NilTree))
, commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "j" ]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "j"] [])) NilTree))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "v"])) NilTree))
, commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "v"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "j" ]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "j"] [])) NilTree)))
, commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [BC.pack "x",BC.pack "c"])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "h"]))
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack "c"] [])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack "x"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "j"])) NilTree))))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "l"])) NilTree))
, commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] (packStringLetters "s"))) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] (packStringLetters "k")))
(SeqTree (FP (fp2fn "./file") (Hunk 1 (packStringLetters "k") []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] (packStringLetters "m")))
(SeqTree (FP (fp2fn "./file") (Hunk 1 (packStringLetters "m") [])) NilTree)))))
] | 9,234 | w_commuteExamples :: (FromPrim p, Merge p, PrimPatchBase p, PrimOf p ~ Prim) => [Sealed2 (p W.:> p)]
w_commuteExamples = [
commutePairFromTWFP seal2 $
WithStartState (makeSimpleRepo "file" [])
(TWFP 3
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "h"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "b"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "f"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "v"]))
(SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack "f"] [])) NilTree)))))),
commutePairFromTWFP seal2 $
WithStartState
(makeSimpleRepo "file" [BC.pack "f",BC.pack "s",BC.pack "d"])
(TWFP 3
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack "d"] [])) NilTree)
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "f"] [])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "f"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "s",BC.pack "d"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "v"])) NilTree)))))),
{- commutePairFromTWFP seal2 $
WithStartState
(makeSimpleRepo "file" [BC.pack "f",BC.pack "u",
BC.pack "s",BC.pack "d"])
(TWFP 5
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 5 [] [BC.pack "x"]))
(SeqTree (FP (fp2fn "./file") (Hunk 4 [BC.pack "d"] [])) NilTree))
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "f",BC.pack "u"] [])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "f"] []))
(SeqTree (FP(fp2fn "./file") (Hunk 1 [BC.pack "u",BC.pack "s",BC.pack "d"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "a"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "a"] [])) NilTree))))))),-}
commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [BC.pack "n",BC.pack "t",BC.pack "h"])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "n",BC.pack "t",BC.pack "h"] []))
NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack "h"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "n"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "t"] [])) NilTree)))),
commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "n"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "i"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "i"])) NilTree))),
commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "c"]))
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "c"] [BC.pack "r"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "h"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "d"])) NilTree))))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "f"])) NilTree)),
commutePairFromTWFP seal2 $
WithStartState (makeSimpleRepo "file" [])
(TWFP 1
(ParTree
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "t"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "t"])) NilTree))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "f"])) NilTree))),
commutePairFromTWFP seal2 $
WithStartState (makeSimpleRepo "file" [BC.pack "f",BC.pack " r",
BC.pack "c",BC.pack "v"])
(TWFP 4
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack "c",BC.pack "v"] []))
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack "r"] []))
(SeqTree (FP (fp2fn "fi le") (Hunk 1 [BC.pack "f"] [])) NilTree))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "f",BC.pack "r"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "y"])) NilTree))))
(SeqTree (FP (fp2fn "./file") (Hunk 4 [BC.pack "v"] [])) NilTree))),
commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "z"])) NilTree)
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "f"])) NilTree)
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "r"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "d"])) NilTree))))
, commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [BC.pack "t",BC.pack "r",BC.pack "h"])
(ParTree
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "t",BC.pack "r",BC.pack "h"] []))
NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "o"])) NilTree))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "t"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack "h"] [])) NilTree)))
, commutePairFromTWFP seal2 $
WithStartState (makeSimpleRepo "file" []) $
TWFP 2
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "h"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "y"]))
(SeqTree (FP (fp2fn "./file") (Hunk 2 [] [BC.pack "m"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "v"])) NilTree))))
, commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "p"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "p"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "c"])) NilTree)))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "z"])) NilTree))
, commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "j" ]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "j"] [])) NilTree))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "v"])) NilTree))
, commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "v"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "j" ]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "j"] [])) NilTree)))
, commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [BC.pack "x",BC.pack "c"])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "h"]))
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack "c"] [])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack "x"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "j"])) NilTree))))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "l"])) NilTree))
, commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] (packStringLetters "s"))) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] (packStringLetters "k")))
(SeqTree (FP (fp2fn "./file") (Hunk 1 (packStringLetters "k") []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] (packStringLetters "m")))
(SeqTree (FP (fp2fn "./file") (Hunk 1 (packStringLetters "m") [])) NilTree)))))
] | 9,234 | w_commuteExamples = [
commutePairFromTWFP seal2 $
WithStartState (makeSimpleRepo "file" [])
(TWFP 3
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "h"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "b"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "f"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "v"]))
(SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack "f"] [])) NilTree)))))),
commutePairFromTWFP seal2 $
WithStartState
(makeSimpleRepo "file" [BC.pack "f",BC.pack "s",BC.pack "d"])
(TWFP 3
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack "d"] [])) NilTree)
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "f"] [])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "f"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "s",BC.pack "d"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "v"])) NilTree)))))),
{- commutePairFromTWFP seal2 $
WithStartState
(makeSimpleRepo "file" [BC.pack "f",BC.pack "u",
BC.pack "s",BC.pack "d"])
(TWFP 5
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 5 [] [BC.pack "x"]))
(SeqTree (FP (fp2fn "./file") (Hunk 4 [BC.pack "d"] [])) NilTree))
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "f",BC.pack "u"] [])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "f"] []))
(SeqTree (FP(fp2fn "./file") (Hunk 1 [BC.pack "u",BC.pack "s",BC.pack "d"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "a"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "a"] [])) NilTree))))))),-}
commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [BC.pack "n",BC.pack "t",BC.pack "h"])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "n",BC.pack "t",BC.pack "h"] []))
NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack "h"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "n"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "t"] [])) NilTree)))),
commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "n"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "i"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "i"])) NilTree))),
commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "c"]))
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "c"] [BC.pack "r"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "h"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "d"])) NilTree))))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "f"])) NilTree)),
commutePairFromTWFP seal2 $
WithStartState (makeSimpleRepo "file" [])
(TWFP 1
(ParTree
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "t"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "t"])) NilTree))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "f"])) NilTree))),
commutePairFromTWFP seal2 $
WithStartState (makeSimpleRepo "file" [BC.pack "f",BC.pack " r",
BC.pack "c",BC.pack "v"])
(TWFP 4
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack "c",BC.pack "v"] []))
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack "r"] []))
(SeqTree (FP (fp2fn "fi le") (Hunk 1 [BC.pack "f"] [])) NilTree))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "f",BC.pack "r"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "y"])) NilTree))))
(SeqTree (FP (fp2fn "./file") (Hunk 4 [BC.pack "v"] [])) NilTree))),
commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "z"])) NilTree)
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "f"])) NilTree)
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "r"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "d"])) NilTree))))
, commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [BC.pack "t",BC.pack "r",BC.pack "h"])
(ParTree
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "t",BC.pack "r",BC.pack "h"] []))
NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "o"])) NilTree))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "t"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack "h"] [])) NilTree)))
, commutePairFromTWFP seal2 $
WithStartState (makeSimpleRepo "file" []) $
TWFP 2
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "h"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "y"]))
(SeqTree (FP (fp2fn "./file") (Hunk 2 [] [BC.pack "m"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "v"])) NilTree))))
, commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "p"]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "p"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "c"])) NilTree)))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "z"])) NilTree))
, commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "j" ]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "j"] [])) NilTree))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "v"])) NilTree))
, commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "v"])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "j" ]))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "j"] [])) NilTree)))
, commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [BC.pack "x",BC.pack "c"])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "h"]))
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack "c"] [])) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack "x"] []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "j"])) NilTree))))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "l"])) NilTree))
, commutePairFromTree seal2 $
WithStartState (makeSimpleRepo "file" [])
(ParTree
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] (packStringLetters "s"))) NilTree)
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] (packStringLetters "k")))
(SeqTree (FP (fp2fn "./file") (Hunk 1 (packStringLetters "k") []))
(SeqTree (FP (fp2fn "./file") (Hunk 1 [] (packStringLetters "m")))
(SeqTree (FP (fp2fn "./file") (Hunk 1 (packStringLetters "m") [])) NilTree)))))
] | 9,133 | false | true | 0 | 26 | 3,749 | 3,465 | 1,726 | 1,739 | null | null |
bno1/adventofcode_2016 | d14/main.hs | mit | -- compute the ith md5 hash
-- the second argument (count) is the number of times the salt+nounce is rehasehd
md5key :: Int -> Int -> String
md5key i count = let
helper :: String -> Int -> String
helper s 0 = s
helper s c = helper (show . md5 $ pack s) (c - 1)
in
helper (salt ++ show i) count | 329 | md5key :: Int -> Int -> String
md5key i count = let
helper :: String -> Int -> String
helper s 0 = s
helper s c = helper (show . md5 $ pack s) (c - 1)
in
helper (salt ++ show i) count | 219 | md5key i count = let
helper :: String -> Int -> String
helper s 0 = s
helper s c = helper (show . md5 $ pack s) (c - 1)
in
helper (salt ++ show i) count | 188 | true | true | 0 | 12 | 100 | 106 | 53 | 53 | null | null |
pparkkin/eta | compiler/ETA/DeSugar/DsBinds.hs | bsd-3-clause | specOnInline :: Name -> MsgDoc
specOnInline f = ptext (sLit "SPECIALISE pragma on INLINE function probably won't fire:")
<+> quotes (ppr f) | 156 | specOnInline :: Name -> MsgDoc
specOnInline f = ptext (sLit "SPECIALISE pragma on INLINE function probably won't fire:")
<+> quotes (ppr f) | 156 | specOnInline f = ptext (sLit "SPECIALISE pragma on INLINE function probably won't fire:")
<+> quotes (ppr f) | 125 | false | true | 2 | 7 | 38 | 46 | 20 | 26 | null | null |
omefire/megaparsec | old-tests/Bugs/Bug9.hs | bsd-2-clause | lexeme :: Stream s m Char => ParsecT s u m a -> ParsecT s u m a
lexeme = L.lexeme sc | 84 | lexeme :: Stream s m Char => ParsecT s u m a -> ParsecT s u m a
lexeme = L.lexeme sc | 84 | lexeme = L.lexeme sc | 20 | false | true | 0 | 7 | 21 | 49 | 23 | 26 | null | null |
forste/haReFork | tools/base/tests/HaskellLibraries/PreludeList.hs | bsd-3-clause | ast (_:xs) = last xs
| 27 | last (_:xs) = last xs | 27 | last (_:xs) = last xs | 27 | false | false | 0 | 6 | 11 | 20 | 9 | 11 | null | null |
Cahu/krpc-hs | src/KRPCHS/SpaceCenter.hs | gpl-3.0 | vesselRotationStream :: KRPCHS.SpaceCenter.Vessel -> KRPCHS.SpaceCenter.ReferenceFrame -> RPCContext (KRPCStream ((Double, Double, Double, Double)))
vesselRotationStream thisArg referenceFrameArg = requestStream $ vesselRotationStreamReq thisArg referenceFrameArg | 263 | vesselRotationStream :: KRPCHS.SpaceCenter.Vessel -> KRPCHS.SpaceCenter.ReferenceFrame -> RPCContext (KRPCStream ((Double, Double, Double, Double)))
vesselRotationStream thisArg referenceFrameArg = requestStream $ vesselRotationStreamReq thisArg referenceFrameArg | 263 | vesselRotationStream thisArg referenceFrameArg = requestStream $ vesselRotationStreamReq thisArg referenceFrameArg | 114 | false | true | 0 | 11 | 20 | 67 | 35 | 32 | null | null |
jacekszymanski/wxHaskell | wxcore/Setup.hs | lgpl-2.1 | - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
wxcoreDirectory :: FilePath
wxcoreDirectory = "src" </> "haskell" </> "Graphics" </> "UI" </> "WXCore"
| 168 | wxcoreDirectory :: FilePath
wxcoreDirectory = "src" </> "haskell" </> "Graphics" </> "UI" </> "WXCore" | 104 | wxcoreDirectory = "src" </> "haskell" </> "Graphics" </> "UI" </> "WXCore" | 75 | true | true | 0 | 8 | 40 | 33 | 16 | 17 | null | null |
seinokatsuhiro/koshu-java-tool | koshu-java-class.hs | bsd-3-clause | dumpInstDetail (n, J.CHECKCAST i) = dumpInstClass n i "checkcast" | 75 | dumpInstDetail (n, J.CHECKCAST i) = dumpInstClass n i "checkcast" | 75 | dumpInstDetail (n, J.CHECKCAST i) = dumpInstClass n i "checkcast" | 75 | false | false | 0 | 8 | 18 | 27 | 13 | 14 | null | null |
vladimir-ipatov/ganeti | src/Ganeti/OpParams.hs | gpl-2.0 | pRebootType :: Field
pRebootType =
withDoc "How to reboot the instance" $
simpleField "reboot_type" [t| RebootType |] | 121 | pRebootType :: Field
pRebootType =
withDoc "How to reboot the instance" $
simpleField "reboot_type" [t| RebootType |] | 121 | pRebootType =
withDoc "How to reboot the instance" $
simpleField "reboot_type" [t| RebootType |] | 100 | false | true | 0 | 6 | 20 | 27 | 15 | 12 | null | null |
xmonad/xmonad | src/XMonad/Config.hs | bsd-3-clause | -- | Perform an arbitrary action at xmonad startup.
startupHook :: X ()
startupHook = return () | 95 | startupHook :: X ()
startupHook = return () | 43 | startupHook = return () | 23 | true | true | 0 | 7 | 16 | 27 | 12 | 15 | null | null |
sviperll/LambdaInterpreter | src/Lambda/Eval.hs | gpl-3.0 | eliminateEta :: (MonadWriter [(String, Zipper)] m, MonadReader (Map.Map String Term) m) => (Zipper -> m Zipper)
eliminateEta z@(Zipper (Zip zs (Term (Lam x (Term (App a (Term (Var y)))))))) | x == y && not (y `Set.member` freeVars a) =
do tell [("η", z)]
return $ mkZip zs a | 281 | eliminateEta :: (MonadWriter [(String, Zipper)] m, MonadReader (Map.Map String Term) m) => (Zipper -> m Zipper)
eliminateEta z@(Zipper (Zip zs (Term (Lam x (Term (App a (Term (Var y)))))))) | x == y && not (y `Set.member` freeVars a) =
do tell [("η", z)]
return $ mkZip zs a | 281 | eliminateEta z@(Zipper (Zip zs (Term (Lam x (Term (App a (Term (Var y)))))))) | x == y && not (y `Set.member` freeVars a) =
do tell [("η", z)]
return $ mkZip zs a | 169 | false | true | 0 | 22 | 55 | 177 | 90 | 87 | null | null |
mettekou/ghc | compiler/prelude/TysPrim.hs | bsd-3-clause | realWorldTy :: Type
realWorldTy = mkTyConTy realWorldTyCon | 67 | realWorldTy :: Type
realWorldTy = mkTyConTy realWorldTyCon | 67 | realWorldTy = mkTyConTy realWorldTyCon | 47 | false | true | 1 | 5 | 15 | 17 | 7 | 10 | null | null |
nahiluhmot/hasqueue | src/Control/Concurrent/STM/TMap.hs | mit | -- | Get thie size of the given 'TMap'.
size :: TMap k v -> STM Int
size = liftM M.size . toMap | 95 | size :: TMap k v -> STM Int
size = liftM M.size . toMap | 55 | size = liftM M.size . toMap | 27 | true | true | 0 | 7 | 22 | 39 | 17 | 22 | null | null |
pniedzielski/fowlie-mga | src/Main.hs | gpl-3.0 | modifyFirst ∷ (α → Bool) → (α → α) → [α] → [α]
modifyFirst _ _ [] = [] | 71 | modifyFirst ∷ (α → Bool) → (α → α) → [α] → [α]
modifyFirst _ _ [] = [] | 71 | modifyFirst _ _ [] = [] | 24 | false | true | 0 | 8 | 19 | 54 | 29 | 25 | null | null |
rueshyna/gogol | gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs | mpl-2.0 | -- | The visitorId identifies the visitor.
slrVisitorId :: Lens' SearchListResponse (Maybe Text)
slrVisitorId
= lens _slrVisitorId (\ s a -> s{_slrVisitorId = a}) | 164 | slrVisitorId :: Lens' SearchListResponse (Maybe Text)
slrVisitorId
= lens _slrVisitorId (\ s a -> s{_slrVisitorId = a}) | 121 | slrVisitorId
= lens _slrVisitorId (\ s a -> s{_slrVisitorId = a}) | 67 | true | true | 0 | 9 | 25 | 48 | 25 | 23 | null | null |
dmjio/stripe | stripe-core/src/Web/Stripe/Customer.hs | mit | deleteCustomer
:: CustomerId -- ^ The `CustomerId` of the `Customer` to delete
-> StripeRequest DeleteCustomer
deleteCustomer customerid = request
where request = mkStripeRequest DELETE url params
url = "customers" </> getCustomerId customerid
params = []
------------------------------------------------------------------------------
-- | Retrieve up to 100 customers at a time | 411 | deleteCustomer
:: CustomerId -- ^ The `CustomerId` of the `Customer` to delete
-> StripeRequest DeleteCustomer
deleteCustomer customerid = request
where request = mkStripeRequest DELETE url params
url = "customers" </> getCustomerId customerid
params = []
------------------------------------------------------------------------------
-- | Retrieve up to 100 customers at a time | 411 | deleteCustomer customerid = request
where request = mkStripeRequest DELETE url params
url = "customers" </> getCustomerId customerid
params = []
------------------------------------------------------------------------------
-- | Retrieve up to 100 customers at a time | 292 | false | true | 2 | 7 | 78 | 60 | 30 | 30 | null | null |
badp/ganeti | src/Ganeti/BasicTypes.hs | gpl-2.0 | withError :: (MonadError e m) => (e' -> e) -> GenericResult e' a -> m a
withError f = genericResult (throwError . f) return | 123 | withError :: (MonadError e m) => (e' -> e) -> GenericResult e' a -> m a
withError f = genericResult (throwError . f) return | 123 | withError f = genericResult (throwError . f) return | 51 | false | true | 0 | 8 | 23 | 60 | 30 | 30 | null | null |
possiblywrong/linear-generic-tries | trie.hs | bsd-3-clause | ordUnit :: Order ()
ordUnit = TrivO | 35 | ordUnit :: Order ()
ordUnit = TrivO | 35 | ordUnit = TrivO | 15 | false | true | 0 | 6 | 6 | 16 | 8 | 8 | null | null |
AlexanderPankiv/ghc | compiler/specialise/Rules.hs | bsd-3-clause | match renv subst (Type ty1) (Type ty2)
= match_ty renv subst ty1 ty2 | 70 | match renv subst (Type ty1) (Type ty2)
= match_ty renv subst ty1 ty2 | 70 | match renv subst (Type ty1) (Type ty2)
= match_ty renv subst ty1 ty2 | 70 | false | false | 0 | 6 | 14 | 43 | 17 | 26 | null | null |
shayan-najd/HsParser | OutputableInstances.hs | gpl-3.0 | matchSeparator PatBindRhs = text "=" | 38 | matchSeparator PatBindRhs = text "=" | 38 | matchSeparator PatBindRhs = text "=" | 38 | false | false | 0 | 5 | 6 | 13 | 5 | 8 | null | null |
int-index/singletons | tests/compile-and-dump/Singletons/Sections.hs | bsd-3-clause | foo1a :: Proxy Foo1
foo1a = Proxy | 33 | foo1a :: Proxy Foo1
foo1a = Proxy | 33 | foo1a = Proxy | 13 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
tpsinnem/Idris-dev | src/Idris/Apropos.hs | bsd-3-clause | defType (Operator t _ _) = t | 28 | defType (Operator t _ _) = t | 28 | defType (Operator t _ _) = t | 28 | false | false | 0 | 7 | 6 | 19 | 9 | 10 | null | null |
nevrenato/Hets_Fork | OWL2/XMLKeywords.hs | gpl-2.0 | anonymousIndividualK :: String
anonymousIndividualK = "AnonymousIndividual" | 75 | anonymousIndividualK :: String
anonymousIndividualK = "AnonymousIndividual" | 75 | anonymousIndividualK = "AnonymousIndividual" | 44 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
volodyakavaler/tic-tac-toe | app/Main.hs | bsd-3-clause | -- | main.
main :: IO ()
main =
play display bgColor fps initWorld renderWorld handleWorld updateWorld
where
display = InWindow "Tic-Tac-Toe" winSize winOffset
bgColor = white
fps = 60
winSize = (180, 180)
winOffset = (100, 100) | 252 | main :: IO ()
main =
play display bgColor fps initWorld renderWorld handleWorld updateWorld
where
display = InWindow "Tic-Tac-Toe" winSize winOffset
bgColor = white
fps = 60
winSize = (180, 180)
winOffset = (100, 100) | 241 | main =
play display bgColor fps initWorld renderWorld handleWorld updateWorld
where
display = InWindow "Tic-Tac-Toe" winSize winOffset
bgColor = white
fps = 60
winSize = (180, 180)
winOffset = (100, 100) | 227 | true | true | 0 | 6 | 61 | 79 | 43 | 36 | null | null |
Lysxia/unparse-attoparsec | src/Data/Attoparsec/Unparse/Printer.hs | mit | tell :: (Maybe Word8 -> Bool) -> TellAhead
tell p = Tell $ \w_ ->
if p w_ then
Just TellTrue
else
Nothing | 117 | tell :: (Maybe Word8 -> Bool) -> TellAhead
tell p = Tell $ \w_ ->
if p w_ then
Just TellTrue
else
Nothing | 117 | tell p = Tell $ \w_ ->
if p w_ then
Just TellTrue
else
Nothing | 74 | false | true | 0 | 8 | 34 | 51 | 26 | 25 | null | null |
bennofs/hdevtools | src/CommandLoop.hs | mit | runCommand (CmdModuleFile moduleName) = do
let status = respond . ClientLog "ModuleFile"
status "Initialize cabal"
liftP (view cabalFile) >>= traverse_ setAllCabalImportDirs
status "Load target"
target <- lift $ GHC.guessTarget moduleName Nothing
lift $ GHC.setTargets [target]
-- TODO: This currently fails, need to figure out why (when cabal support enabled)
status "Build module graph"
moduleGraph <- lift $ GHC.depanal [] False `GHC.gcatch` \(SomeException _) -> return []
status "Find module"
case find (moduleSummaryMatchesModuleName moduleName) moduleGraph of
Nothing -> do
respond $ ClientStderr "Module not found"
return $ ExitFailure 1
Just modSummary ->
case GHC.ml_hs_file (GHC.ms_location modSummary) of
Nothing -> do
respond $ ClientStderr "Module does not have a source file"
return $ ExitFailure 1
Just file -> do
respond $ ClientStdout file
return ExitSuccess
where moduleSummaryMatchesModuleName modName modSummary = modName == (GHC.moduleNameString . GHC.moduleName . GHC.ms_mod) modSummary | 1,209 | runCommand (CmdModuleFile moduleName) = do
let status = respond . ClientLog "ModuleFile"
status "Initialize cabal"
liftP (view cabalFile) >>= traverse_ setAllCabalImportDirs
status "Load target"
target <- lift $ GHC.guessTarget moduleName Nothing
lift $ GHC.setTargets [target]
-- TODO: This currently fails, need to figure out why (when cabal support enabled)
status "Build module graph"
moduleGraph <- lift $ GHC.depanal [] False `GHC.gcatch` \(SomeException _) -> return []
status "Find module"
case find (moduleSummaryMatchesModuleName moduleName) moduleGraph of
Nothing -> do
respond $ ClientStderr "Module not found"
return $ ExitFailure 1
Just modSummary ->
case GHC.ml_hs_file (GHC.ms_location modSummary) of
Nothing -> do
respond $ ClientStderr "Module does not have a source file"
return $ ExitFailure 1
Just file -> do
respond $ ClientStdout file
return ExitSuccess
where moduleSummaryMatchesModuleName modName modSummary = modName == (GHC.moduleNameString . GHC.moduleName . GHC.ms_mod) modSummary | 1,209 | runCommand (CmdModuleFile moduleName) = do
let status = respond . ClientLog "ModuleFile"
status "Initialize cabal"
liftP (view cabalFile) >>= traverse_ setAllCabalImportDirs
status "Load target"
target <- lift $ GHC.guessTarget moduleName Nothing
lift $ GHC.setTargets [target]
-- TODO: This currently fails, need to figure out why (when cabal support enabled)
status "Build module graph"
moduleGraph <- lift $ GHC.depanal [] False `GHC.gcatch` \(SomeException _) -> return []
status "Find module"
case find (moduleSummaryMatchesModuleName moduleName) moduleGraph of
Nothing -> do
respond $ ClientStderr "Module not found"
return $ ExitFailure 1
Just modSummary ->
case GHC.ml_hs_file (GHC.ms_location modSummary) of
Nothing -> do
respond $ ClientStderr "Module does not have a source file"
return $ ExitFailure 1
Just file -> do
respond $ ClientStdout file
return ExitSuccess
where moduleSummaryMatchesModuleName modName modSummary = modName == (GHC.moduleNameString . GHC.moduleName . GHC.ms_mod) modSummary | 1,209 | false | false | 0 | 16 | 335 | 311 | 138 | 173 | null | null |
DanielSchuessler/hstri | Math/SparseVector.hs | gpl-3.0 | zero :: Num a => a
zero = 0 | 27 | zero :: Num a => a
zero = 0 | 27 | zero = 0 | 8 | false | true | 0 | 7 | 8 | 25 | 10 | 15 | null | null |
juodaspaulius/clafer-old-customBNFC | src/Language/Clafer.hs | mit | -- | Parses the model into AST. Adding more fragments beyond this point will have no effect.
parse :: Monad m => ClaferT m ()
parse =
do
env <- getEnv
astsErr <- mapM (parseFrag $ args env) $ modelFrags env
asts <- liftParseErrs astsErr
-- We need to somehow combine all the ASTS together into a complete AST
-- However, the source positions inside the ASTs are relative to their
-- fragments.
--
-- For example
-- Frag1: "A\nB\n"
-- Frag2: "C\n"
-- The "C" clafer in Frag2 has position (1, 1) because it is at the start of the fragment.
-- However, it should have position (3, 1) since that is its position in the complete model.
--
-- We can
-- 1. Traverse the model and update the positions so that they are relative to model rather
-- than the fragment.
-- 2. Reparse the model as a complete model rather in fragments.
--
-- The second one is easier so that's we'll do for now. There shouldn't be any errors since
-- each individual fragment already passed.
ast <- case asts of
-- Special case: if there is only one fragment, then the complete model is contained within it.
-- Don't need to reparse. This is the common case.
[oneFrag] -> {- trace ("AST:\n" ++ show oneFrag) $ -} return oneFrag
_ -> do
-- Combine all the fragment syntaxes
let completeModel = concat $ modelFrags env
completeAst <- (parseFrag $ args env) completeModel
liftParseErr completeAst
-- No need to map AST to Positional AST
-- let ast = mapModule ast'
let env' = env{ cAst = Just ast, astModuleTrace = traceAstModule ast }
putEnv env'
where
parseFrag :: (Monad m) => ClaferArgs -> String -> ClaferT m (Err Module)
parseFrag args' =
(>>= (return . pModule)) .
(if not
((new_layout args') ||
(no_layout args'))
then
resolveLayout
else
return)
. myLexer .
(if (not $ no_layout args') &&
(new_layout args')
then
resLayout
else
id)
-- | Compiles the AST into IR. | 2,099 | parse :: Monad m => ClaferT m ()
parse =
do
env <- getEnv
astsErr <- mapM (parseFrag $ args env) $ modelFrags env
asts <- liftParseErrs astsErr
-- We need to somehow combine all the ASTS together into a complete AST
-- However, the source positions inside the ASTs are relative to their
-- fragments.
--
-- For example
-- Frag1: "A\nB\n"
-- Frag2: "C\n"
-- The "C" clafer in Frag2 has position (1, 1) because it is at the start of the fragment.
-- However, it should have position (3, 1) since that is its position in the complete model.
--
-- We can
-- 1. Traverse the model and update the positions so that they are relative to model rather
-- than the fragment.
-- 2. Reparse the model as a complete model rather in fragments.
--
-- The second one is easier so that's we'll do for now. There shouldn't be any errors since
-- each individual fragment already passed.
ast <- case asts of
-- Special case: if there is only one fragment, then the complete model is contained within it.
-- Don't need to reparse. This is the common case.
[oneFrag] -> {- trace ("AST:\n" ++ show oneFrag) $ -} return oneFrag
_ -> do
-- Combine all the fragment syntaxes
let completeModel = concat $ modelFrags env
completeAst <- (parseFrag $ args env) completeModel
liftParseErr completeAst
-- No need to map AST to Positional AST
-- let ast = mapModule ast'
let env' = env{ cAst = Just ast, astModuleTrace = traceAstModule ast }
putEnv env'
where
parseFrag :: (Monad m) => ClaferArgs -> String -> ClaferT m (Err Module)
parseFrag args' =
(>>= (return . pModule)) .
(if not
((new_layout args') ||
(no_layout args'))
then
resolveLayout
else
return)
. myLexer .
(if (not $ no_layout args') &&
(new_layout args')
then
resLayout
else
id)
-- | Compiles the AST into IR. | 2,006 | parse =
do
env <- getEnv
astsErr <- mapM (parseFrag $ args env) $ modelFrags env
asts <- liftParseErrs astsErr
-- We need to somehow combine all the ASTS together into a complete AST
-- However, the source positions inside the ASTs are relative to their
-- fragments.
--
-- For example
-- Frag1: "A\nB\n"
-- Frag2: "C\n"
-- The "C" clafer in Frag2 has position (1, 1) because it is at the start of the fragment.
-- However, it should have position (3, 1) since that is its position in the complete model.
--
-- We can
-- 1. Traverse the model and update the positions so that they are relative to model rather
-- than the fragment.
-- 2. Reparse the model as a complete model rather in fragments.
--
-- The second one is easier so that's we'll do for now. There shouldn't be any errors since
-- each individual fragment already passed.
ast <- case asts of
-- Special case: if there is only one fragment, then the complete model is contained within it.
-- Don't need to reparse. This is the common case.
[oneFrag] -> {- trace ("AST:\n" ++ show oneFrag) $ -} return oneFrag
_ -> do
-- Combine all the fragment syntaxes
let completeModel = concat $ modelFrags env
completeAst <- (parseFrag $ args env) completeModel
liftParseErr completeAst
-- No need to map AST to Positional AST
-- let ast = mapModule ast'
let env' = env{ cAst = Just ast, astModuleTrace = traceAstModule ast }
putEnv env'
where
parseFrag :: (Monad m) => ClaferArgs -> String -> ClaferT m (Err Module)
parseFrag args' =
(>>= (return . pModule)) .
(if not
((new_layout args') ||
(no_layout args'))
then
resolveLayout
else
return)
. myLexer .
(if (not $ no_layout args') &&
(new_layout args')
then
resLayout
else
id)
-- | Compiles the AST into IR. | 1,973 | true | true | 1 | 17 | 596 | 333 | 175 | 158 | null | null |
ssaavedra/liquidhaskell | src/Language/Haskell/Liquid/Types.hs | bsd-3-clause | rPropP τ r = RProp τ (RHole r) | 30 | rPropP τ r = RProp τ (RHole r) | 30 | rPropP τ r = RProp τ (RHole r) | 30 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
Newlifer/libstep | src/Data/EXPRESS/Parsers.hs | mit | -- nteger_literal | ( digits ' . ' [ digits ] [ ' e ' [ sign ] digits ] ) .
pRealLiteral :: Parser RealLiteral
pRealLiteral = undefined | 135 | pRealLiteral :: Parser RealLiteral
pRealLiteral = undefined | 59 | pRealLiteral = undefined | 24 | true | true | 0 | 5 | 28 | 15 | 8 | 7 | null | null |
hvr/jhc | src/Grin/Show.hs | mit | prettyExp vl NewRegion { expLam = (r :-> body)} = vl <> keyword "region" <+> text "\\" <> prettyVals r <+> text "-> do" <$> indent 2 (prettyExp empty body) | 155 | prettyExp vl NewRegion { expLam = (r :-> body)} = vl <> keyword "region" <+> text "\\" <> prettyVals r <+> text "-> do" <$> indent 2 (prettyExp empty body) | 155 | prettyExp vl NewRegion { expLam = (r :-> body)} = vl <> keyword "region" <+> text "\\" <> prettyVals r <+> text "-> do" <$> indent 2 (prettyExp empty body) | 155 | false | false | 0 | 10 | 29 | 72 | 34 | 38 | null | null |
kolmodin/cabal | cabal-install/Distribution/Client/InstallPlan.hs | bsd-3-clause | showPlanPackageTag (Configured _) = "Configured" | 51 | showPlanPackageTag (Configured _) = "Configured" | 51 | showPlanPackageTag (Configured _) = "Configured" | 51 | false | false | 0 | 7 | 7 | 15 | 7 | 8 | null | null |
tgrospic/advent-of-code | src/AoC2016/Day09.hs | mit | mkSubP :: (Int, Int) -> Parser String
mkSubP (x, y) = foldl (<>) mempty <$> replicate y <$> anyString x | 103 | mkSubP :: (Int, Int) -> Parser String
mkSubP (x, y) = foldl (<>) mempty <$> replicate y <$> anyString x | 103 | mkSubP (x, y) = foldl (<>) mempty <$> replicate y <$> anyString x | 65 | false | true | 0 | 7 | 19 | 54 | 28 | 26 | null | null |
beni55/haste-compiler | libraries/ghc-7.10/base/Data/Data.hs | bsd-3-clause | tuple3Constr :: Constr
tuple3Constr = mkConstr tuple3DataType "(,,)" [] Infix | 77 | tuple3Constr :: Constr
tuple3Constr = mkConstr tuple3DataType "(,,)" [] Infix | 77 | tuple3Constr = mkConstr tuple3DataType "(,,)" [] Infix | 54 | false | true | 0 | 6 | 9 | 22 | 11 | 11 | null | null |
samscott89/tamarin-prover | lib/term/src/Term/Term.hs | gpl-3.0 | -- | @lits t@ returns all literals that occur in term @t@. List can contain duplicates.
lits :: Ord a => Term a -> [a]
lits = foldMap return | 140 | lits :: Ord a => Term a -> [a]
lits = foldMap return | 52 | lits = foldMap return | 21 | true | true | 0 | 9 | 28 | 39 | 17 | 22 | null | null |
zuoqin/hackerrank | src/ShashankAndList.hs | bsd-3-clause | powMod :: Integer -> Integer -> Integer -> Integer
powMod n exp res
| exp > 0 = powMod ((n * n) `mod` 1000000007) (exp `div` 2) (if (exp `mod` 2) == 1 then ( (res * n) `mod` 1000000007) else res )
| otherwise = res | 218 | powMod :: Integer -> Integer -> Integer -> Integer
powMod n exp res
| exp > 0 = powMod ((n * n) `mod` 1000000007) (exp `div` 2) (if (exp `mod` 2) == 1 then ( (res * n) `mod` 1000000007) else res )
| otherwise = res | 218 | powMod n exp res
| exp > 0 = powMod ((n * n) `mod` 1000000007) (exp `div` 2) (if (exp `mod` 2) == 1 then ( (res * n) `mod` 1000000007) else res )
| otherwise = res | 167 | false | true | 1 | 12 | 50 | 120 | 67 | 53 | null | null |
f1u77y/xmonad-contrib | XMonad/Hooks/ManageDocks.hs | bsd-3-clause | manageDocks :: ManageHook
manageDocks = checkDock --> (doIgnore <+> setDocksMask)
where setDocksMask = do
ask >>= \win -> liftX $ withDisplay $ \dpy -> do
io $ selectInput dpy win (propertyChangeMask .|. structureNotifyMask)
mempty
-- | Checks if a window is a DOCK or DESKTOP window | 328 | manageDocks :: ManageHook
manageDocks = checkDock --> (doIgnore <+> setDocksMask)
where setDocksMask = do
ask >>= \win -> liftX $ withDisplay $ \dpy -> do
io $ selectInput dpy win (propertyChangeMask .|. structureNotifyMask)
mempty
-- | Checks if a window is a DOCK or DESKTOP window | 328 | manageDocks = checkDock --> (doIgnore <+> setDocksMask)
where setDocksMask = do
ask >>= \win -> liftX $ withDisplay $ \dpy -> do
io $ selectInput dpy win (propertyChangeMask .|. structureNotifyMask)
mempty
-- | Checks if a window is a DOCK or DESKTOP window | 302 | false | true | 0 | 18 | 90 | 79 | 41 | 38 | null | null |
alexbaluta/courseography | dependencies/HaXml-1.25.3/src/Text/XML/HaXml/XmlContent/Parser.hs | gpl-3.0 | str2attr :: String -> AttValue
str2attr s =
let f t =
let (l,r) = span (\c-> not (elem c "\"&<>'")) t
in if null r then [Left l]
else Left l: Right (g (head r)): f (tail r)
g '"' = RefEntity "quot"
g '&' = RefEntity "amp"
g '<' = RefEntity "lt"
g '>' = RefEntity "gt"
g '\'' = RefEntity "apos"
in AttValue (f s) | 396 | str2attr :: String -> AttValue
str2attr s =
let f t =
let (l,r) = span (\c-> not (elem c "\"&<>'")) t
in if null r then [Left l]
else Left l: Right (g (head r)): f (tail r)
g '"' = RefEntity "quot"
g '&' = RefEntity "amp"
g '<' = RefEntity "lt"
g '>' = RefEntity "gt"
g '\'' = RefEntity "apos"
in AttValue (f s) | 396 | str2attr s =
let f t =
let (l,r) = span (\c-> not (elem c "\"&<>'")) t
in if null r then [Left l]
else Left l: Right (g (head r)): f (tail r)
g '"' = RefEntity "quot"
g '&' = RefEntity "amp"
g '<' = RefEntity "lt"
g '>' = RefEntity "gt"
g '\'' = RefEntity "apos"
in AttValue (f s) | 365 | false | true | 0 | 18 | 152 | 196 | 91 | 105 | null | null |
karamellpelle/grid | designer/source/Game/Values.hs | gpl-3.0 | valueModePathRadius :: Float
valueModePathRadius =
0.3 | 58 | valueModePathRadius :: Float
valueModePathRadius =
0.3 | 58 | valueModePathRadius =
0.3 | 29 | false | true | 0 | 4 | 9 | 11 | 6 | 5 | null | null |
spechub/Hets | COL/AS_COL.der.hs | gpl-2.0 | observersS = observerS ++ "s" | 29 | observersS = observerS ++ "s" | 29 | observersS = observerS ++ "s" | 29 | false | false | 0 | 5 | 4 | 10 | 5 | 5 | null | null |
pairyo/elm-compiler | src/Parse/Expression.hs | bsd-3-clause | accessor :: IParser Source.Expr'
accessor =
do (start, lbl, end) <- located (try (string "." >> rLabel))
let ann value =
A.at start end value
return $
E.Lambda
(ann (P.Var "_"))
(ann (E.Access (ann (E.rawVar "_")) lbl)) | 280 | accessor :: IParser Source.Expr'
accessor =
do (start, lbl, end) <- located (try (string "." >> rLabel))
let ann value =
A.at start end value
return $
E.Lambda
(ann (P.Var "_"))
(ann (E.Access (ann (E.rawVar "_")) lbl)) | 280 | accessor =
do (start, lbl, end) <- located (try (string "." >> rLabel))
let ann value =
A.at start end value
return $
E.Lambda
(ann (P.Var "_"))
(ann (E.Access (ann (E.rawVar "_")) lbl)) | 247 | false | true | 0 | 17 | 97 | 130 | 63 | 67 | null | null |
sinjar666/fbthrift | thrift/compiler/test/fixtures/service-fuzzer/gen-hs/TestService_Fuzzer.hs | apache-2.0 | handleOptions :: ([Options -> Options], [String], [String]) -> Options
handleOptions (transformers, (serviceName:[]), []) | serviceName `P.elem` serviceNames
= (P.foldl (P.flip ($)) defaultOptions transformers) { opt_service = serviceName } | 244 | handleOptions :: ([Options -> Options], [String], [String]) -> Options
handleOptions (transformers, (serviceName:[]), []) | serviceName `P.elem` serviceNames
= (P.foldl (P.flip ($)) defaultOptions transformers) { opt_service = serviceName } | 244 | handleOptions (transformers, (serviceName:[]), []) | serviceName `P.elem` serviceNames
= (P.foldl (P.flip ($)) defaultOptions transformers) { opt_service = serviceName } | 173 | false | true | 0 | 11 | 31 | 104 | 59 | 45 | null | null |
OpenXT/manager | xenmgr/XenMgr/Expose/VmObject.hs | gpl-2.0 | setDomstoreReadAccess uuid = saveConfigProperty uuid vmDomstoreReadAccess | 73 | setDomstoreReadAccess uuid = saveConfigProperty uuid vmDomstoreReadAccess | 73 | setDomstoreReadAccess uuid = saveConfigProperty uuid vmDomstoreReadAccess | 73 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
ocharles/snaplet-socketio | src/Snap/Snaplet/SocketIO.hs | bsd-3-clause | --------------------------------------------------------------------------------
appendDisconnectHandler
:: MonadState RoutingTable m => (Connection -> IO ()) -> m ()
appendDisconnectHandler handler = modify $ \rt -> rt
{ routingTableDisconnect = \conn -> do routingTableDisconnect rt conn
handler conn
} | 351 | appendDisconnectHandler
:: MonadState RoutingTable m => (Connection -> IO ()) -> m ()
appendDisconnectHandler handler = modify $ \rt -> rt
{ routingTableDisconnect = \conn -> do routingTableDisconnect rt conn
handler conn
} | 270 | appendDisconnectHandler handler = modify $ \rt -> rt
{ routingTableDisconnect = \conn -> do routingTableDisconnect rt conn
handler conn
} | 182 | true | true | 0 | 11 | 80 | 89 | 42 | 47 | null | null |
lambdataro/Dive | ParserLib.hs | mit | chainl1 :: Parser a -> Parser (a -> a -> a) -> Parser a
p `chainl1` op = do { a <- p; rest a }
where
rest a = (do f <- op
b <- p
rest (f a b))
+++ return a
{- ついでに,右結合の演算子コンビネータ chainr と chainr1 も作っておきます。 -} | 336 | chainl1 :: Parser a -> Parser (a -> a -> a) -> Parser a
p `chainl1` op = do { a <- p; rest a }
where
rest a = (do f <- op
b <- p
rest (f a b))
+++ return a
{- ついでに,右結合の演算子コンビネータ chainr と chainr1 も作っておきます。 -} | 336 | p `chainl1` op = do { a <- p; rest a }
where
rest a = (do f <- op
b <- p
rest (f a b))
+++ return a
{- ついでに,右結合の演算子コンビネータ chainr と chainr1 も作っておきます。 -} | 280 | false | true | 1 | 11 | 179 | 113 | 53 | 60 | null | null |
ekmett/bitwise | extra/testsuite.hs | bsd-3-clause | prop_bounds1 o w = let n = fromW w in (o, o + n) == bounds (listArray (o, o + n) (take (n + 1) (cycle [False, True, True]))) | 124 | prop_bounds1 o w = let n = fromW w in (o, o + n) == bounds (listArray (o, o + n) (take (n + 1) (cycle [False, True, True]))) | 124 | prop_bounds1 o w = let n = fromW w in (o, o + n) == bounds (listArray (o, o + n) (take (n + 1) (cycle [False, True, True]))) | 124 | false | false | 1 | 15 | 28 | 94 | 47 | 47 | null | null |
geophf/1HaskellADay | exercises/HAD/Puzzles/Mensa/Poesy.hs | mit | -- so a word is just the mapping of the letters
word :: [Rule] -> [Word]
word = mapM letter | 92 | word :: [Rule] -> [Word]
word = mapM letter | 43 | word = mapM letter | 18 | true | true | 0 | 6 | 20 | 25 | 14 | 11 | null | null |
olorin/amazonka | amazonka-efs/gen/Network/AWS/EFS/DescribeMountTargets.hs | mpl-2.0 | -- | Optional. String. The ID of the mount target that you want to have
-- described. It must be included in your request if 'FileSystemId' is not
-- included.
dmtMountTargetId :: Lens' DescribeMountTargets (Maybe Text)
dmtMountTargetId = lens _dmtMountTargetId (\ s a -> s{_dmtMountTargetId = a}) | 297 | dmtMountTargetId :: Lens' DescribeMountTargets (Maybe Text)
dmtMountTargetId = lens _dmtMountTargetId (\ s a -> s{_dmtMountTargetId = a}) | 137 | dmtMountTargetId = lens _dmtMountTargetId (\ s a -> s{_dmtMountTargetId = a}) | 77 | true | true | 0 | 9 | 46 | 48 | 27 | 21 | null | null |
balangs/eTeak | src/Gen.hs | bsd-3-clause | showNameOTerm (TeakOAppend 1 slices) = "ap" ++ concatMap showNameOSlice slices | 78 | showNameOTerm (TeakOAppend 1 slices) = "ap" ++ concatMap showNameOSlice slices | 78 | showNameOTerm (TeakOAppend 1 slices) = "ap" ++ concatMap showNameOSlice slices | 78 | false | false | 0 | 6 | 9 | 27 | 12 | 15 | null | null |
robstewart57/ripl | src/AstMappings.hs | bsd-3-clause | intCalType i =
C.TypParam
C.TInt
[C.TypeAttrSizeDf (C.LitExpCons (C.IntLitExpr (C.IntegerLit i)))] | 108 | intCalType i =
C.TypParam
C.TInt
[C.TypeAttrSizeDf (C.LitExpCons (C.IntLitExpr (C.IntegerLit i)))] | 108 | intCalType i =
C.TypParam
C.TInt
[C.TypeAttrSizeDf (C.LitExpCons (C.IntLitExpr (C.IntegerLit i)))] | 108 | false | false | 0 | 13 | 19 | 51 | 24 | 27 | null | null |
jgenso/comunidadhaskell.org | Settings.hs | bsd-2-clause | -- The rest of this file contains settings which rarely need changing by a
-- user.
widgetFile :: String -> Q Exp
widgetFile = if development then Yesod.Default.Util.widgetFileReload
else Yesod.Default.Util.widgetFileNoReload | 254 | widgetFile :: String -> Q Exp
widgetFile = if development then Yesod.Default.Util.widgetFileReload
else Yesod.Default.Util.widgetFileNoReload | 169 | widgetFile = if development then Yesod.Default.Util.widgetFileReload
else Yesod.Default.Util.widgetFileNoReload | 139 | true | true | 0 | 6 | 58 | 36 | 22 | 14 | null | null |
ftomassetti/erd-web-server | src/Parse.hs | mit | emptiness :: Parser ()
emptiness = skipMany (void (many1 space) <|> eolComment) | 79 | emptiness :: Parser ()
emptiness = skipMany (void (many1 space) <|> eolComment) | 79 | emptiness = skipMany (void (many1 space) <|> eolComment) | 56 | false | true | 0 | 10 | 11 | 35 | 17 | 18 | null | null |
thomasjm/IHaskell | ipython-kernel/src/IHaskell/IPython/Types.hs | mit | showMessageType ShutdownReplyMessage = "shutdown_reply" | 55 | showMessageType ShutdownReplyMessage = "shutdown_reply" | 55 | showMessageType ShutdownReplyMessage = "shutdown_reply" | 55 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
sergv/tags-server | test-data/0003module_header_detection/ModuleWithCommentsResemblingModuleHeader.hs | bsd-3-clause | foo :: a -> a
foo x = x | 23 | foo :: a -> a
foo x = x | 23 | foo x = x | 9 | false | true | 0 | 7 | 8 | 24 | 10 | 14 | null | null |
danstiner/transpiler | src/CSharp/Transformer.hs | mit | toFuncRef :: C.FuncRef -> FuncRef
toFuncRef (C.FuncRef moduleRef name) = FuncRef (toClassRef moduleRef) name | 108 | toFuncRef :: C.FuncRef -> FuncRef
toFuncRef (C.FuncRef moduleRef name) = FuncRef (toClassRef moduleRef) name | 108 | toFuncRef (C.FuncRef moduleRef name) = FuncRef (toClassRef moduleRef) name | 74 | false | true | 0 | 8 | 13 | 41 | 20 | 21 | null | null |
ledyba/Jinzamomi | app/Main.hs | gpl-3.0 | loglevelOf "critical" = CRITICAL | 32 | loglevelOf "critical" = CRITICAL | 32 | loglevelOf "critical" = CRITICAL | 32 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
rueshyna/gogol | gogol-compute/gen/Network/Google/Compute/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'Firewall' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'fSourceTags'
--
-- * 'fKind'
--
-- * 'fTargetTags'
--
-- * 'fNetwork'
--
-- * 'fSourceRanges'
--
-- * 'fSelfLink'
--
-- * 'fName'
--
-- * 'fCreationTimestamp'
--
-- * 'fId'
--
-- * 'fAllowed'
--
-- * 'fDescription'
firewall
:: Firewall
firewall =
Firewall'
{ _fSourceTags = Nothing
, _fKind = "compute#firewall"
, _fTargetTags = Nothing
, _fNetwork = Nothing
, _fSourceRanges = Nothing
, _fSelfLink = Nothing
, _fName = Nothing
, _fCreationTimestamp = Nothing
, _fId = Nothing
, _fAllowed = Nothing
, _fDescription = Nothing
} | 751 | firewall
:: Firewall
firewall =
Firewall'
{ _fSourceTags = Nothing
, _fKind = "compute#firewall"
, _fTargetTags = Nothing
, _fNetwork = Nothing
, _fSourceRanges = Nothing
, _fSelfLink = Nothing
, _fName = Nothing
, _fCreationTimestamp = Nothing
, _fId = Nothing
, _fAllowed = Nothing
, _fDescription = Nothing
} | 367 | firewall =
Firewall'
{ _fSourceTags = Nothing
, _fKind = "compute#firewall"
, _fTargetTags = Nothing
, _fNetwork = Nothing
, _fSourceRanges = Nothing
, _fSelfLink = Nothing
, _fName = Nothing
, _fCreationTimestamp = Nothing
, _fId = Nothing
, _fAllowed = Nothing
, _fDescription = Nothing
} | 342 | true | true | 0 | 7 | 180 | 114 | 78 | 36 | null | null |
agentm/project-m36 | src/lib/ProjectM36/Client.hs | unlicense | remoteDBLookupName :: DatabaseName -> String
remoteDBLookupName = (++) "db-" | 80 | remoteDBLookupName :: DatabaseName -> String
remoteDBLookupName = (++) "db-" | 76 | remoteDBLookupName = (++) "db-" | 31 | false | true | 0 | 7 | 12 | 26 | 12 | 14 | null | null |
kim/amazonka | core/src/Network/AWS/Request/Query.hs | mpl-2.0 | post :: forall a. (AWSService (Sv a), ToQuery a, ToPath a, ToHeaders a)
=> Action
-> a
-> Request a
post a x = defaultRequest x & rqMethod .~ POST & rqQuery <>~ qry
where
qry = pair "Version" (_svcVersion svc)
. pair "Action" (toBS a)
$ mempty
svc :: Service (Sv a)
svc = service
| 327 | post :: forall a. (AWSService (Sv a), ToQuery a, ToPath a, ToHeaders a)
=> Action
-> a
-> Request a
post a x = defaultRequest x & rqMethod .~ POST & rqQuery <>~ qry
where
qry = pair "Version" (_svcVersion svc)
. pair "Action" (toBS a)
$ mempty
svc :: Service (Sv a)
svc = service
| 327 | post a x = defaultRequest x & rqMethod .~ POST & rqQuery <>~ qry
where
qry = pair "Version" (_svcVersion svc)
. pair "Action" (toBS a)
$ mempty
svc :: Service (Sv a)
svc = service
| 212 | false | true | 0 | 9 | 103 | 141 | 70 | 71 | null | null |
pgj/bead | src/Bead/View/Content/SubmissionTable.hs | bsd-3-clause | closedGroupAssignmentStyle = backgroundColor "#A3AFAE" | 54 | closedGroupAssignmentStyle = backgroundColor "#A3AFAE" | 54 | closedGroupAssignmentStyle = backgroundColor "#A3AFAE" | 54 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
gbaz/cabal | Cabal/Distribution/Simple/Utils.hs | bsd-3-clause | toUTF8 :: String -> String
toUTF8 [] = [] | 48 | toUTF8 :: String -> String
toUTF8 [] = [] | 48 | toUTF8 [] = [] | 21 | false | true | 0 | 6 | 15 | 22 | 11 | 11 | null | null |
gnn/Hets | OWL2/Parse.hs | gpl-2.0 | ipChar :: CharParser st String
ipChar = iunreservedPctEncodedSubDelims ":@" | 75 | ipChar :: CharParser st String
ipChar = iunreservedPctEncodedSubDelims ":@" | 75 | ipChar = iunreservedPctEncodedSubDelims ":@" | 44 | false | true | 1 | 5 | 8 | 22 | 9 | 13 | null | null |
UweSchmidt/ppl2 | src/PPL2/Pretty/MState.hs | mit | prettyMState' :: (Show v) => MState v -> Lines
prettyMState' s = mconcat $
[ nl
, ln "machine state"
, ln "============="
, nl
, ln "status register"
, ln "==============="
, nl
, prettyMStatus $ s ^. msStatus
, nl
, ln "program counter"
, ln "==============="
, nl
, prettyPC $ s ^. msPC
, nl
, ln "evaluation stack"
, ln "================"
, nl
, prettyStack $ s ^. msStack
, nl
, ln "global memory"
, ln "============="
, nl
, prettySegment $ s ^. msMem
, nl
, ln "runtime stack"
, ln "============="
, nl
, prettyRTS $ s ^. msFrames
, nl
] | 603 | prettyMState' :: (Show v) => MState v -> Lines
prettyMState' s = mconcat $
[ nl
, ln "machine state"
, ln "============="
, nl
, ln "status register"
, ln "==============="
, nl
, prettyMStatus $ s ^. msStatus
, nl
, ln "program counter"
, ln "==============="
, nl
, prettyPC $ s ^. msPC
, nl
, ln "evaluation stack"
, ln "================"
, nl
, prettyStack $ s ^. msStack
, nl
, ln "global memory"
, ln "============="
, nl
, prettySegment $ s ^. msMem
, nl
, ln "runtime stack"
, ln "============="
, nl
, prettyRTS $ s ^. msFrames
, nl
] | 603 | prettyMState' s = mconcat $
[ nl
, ln "machine state"
, ln "============="
, nl
, ln "status register"
, ln "==============="
, nl
, prettyMStatus $ s ^. msStatus
, nl
, ln "program counter"
, ln "==============="
, nl
, prettyPC $ s ^. msPC
, nl
, ln "evaluation stack"
, ln "================"
, nl
, prettyStack $ s ^. msStack
, nl
, ln "global memory"
, ln "============="
, nl
, prettySegment $ s ^. msMem
, nl
, ln "runtime stack"
, ln "============="
, nl
, prettyRTS $ s ^. msFrames
, nl
] | 556 | false | true | 0 | 8 | 170 | 197 | 107 | 90 | null | null |
SamirTalwar/advent-of-code | 2021/AOC_04_1.hs | mit | parseCards :: [Text] -> Card
parseCards = map (parseText (optional spaces >> sepBy1 (Just <$> int) spaces)) | 107 | parseCards :: [Text] -> Card
parseCards = map (parseText (optional spaces >> sepBy1 (Just <$> int) spaces)) | 107 | parseCards = map (parseText (optional spaces >> sepBy1 (Just <$> int) spaces)) | 78 | false | true | 0 | 12 | 16 | 49 | 25 | 24 | null | null |
substack/hsopenid | src/Network/OpenID/SSL.hs | bsd-3-clause | slConnect :: Socket -> IO (Maybe SSLHandle)
sslConnect sock = do
catch (do
ctx <- Session.context
ssl <- Session.connection ctx sock
Session.connect ssl
return $ Just $ SSLHandle ctx ssl
)
(\_ -> return Nothing)
| 246 | sslConnect :: Socket -> IO (Maybe SSLHandle)
sslConnect sock = do
catch (do
ctx <- Session.context
ssl <- Session.connection ctx sock
Session.connect ssl
return $ Just $ SSLHandle ctx ssl
)
(\_ -> return Nothing) | 246 | sslConnect sock = do
catch (do
ctx <- Session.context
ssl <- Session.connection ctx sock
Session.connect ssl
return $ Just $ SSLHandle ctx ssl
)
(\_ -> return Nothing) | 201 | false | true | 0 | 13 | 69 | 100 | 45 | 55 | null | null |
brendanhay/gogol | gogol-docs/gen/Network/Google/Docs/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'ImagePropertiesSuggestionState' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ipssAngleSuggested'
--
-- * 'ipssContrastSuggested'
--
-- * 'ipssContentURISuggested'
--
-- * 'ipssSourceURISuggested'
--
-- * 'ipssCropPropertiesSuggestionState'
--
-- * 'ipssBrightnessSuggested'
--
-- * 'ipssTransparencySuggested'
imagePropertiesSuggestionState
:: ImagePropertiesSuggestionState
imagePropertiesSuggestionState =
ImagePropertiesSuggestionState'
{ _ipssAngleSuggested = Nothing
, _ipssContrastSuggested = Nothing
, _ipssContentURISuggested = Nothing
, _ipssSourceURISuggested = Nothing
, _ipssCropPropertiesSuggestionState = Nothing
, _ipssBrightnessSuggested = Nothing
, _ipssTransparencySuggested = Nothing
} | 856 | imagePropertiesSuggestionState
:: ImagePropertiesSuggestionState
imagePropertiesSuggestionState =
ImagePropertiesSuggestionState'
{ _ipssAngleSuggested = Nothing
, _ipssContrastSuggested = Nothing
, _ipssContentURISuggested = Nothing
, _ipssSourceURISuggested = Nothing
, _ipssCropPropertiesSuggestionState = Nothing
, _ipssBrightnessSuggested = Nothing
, _ipssTransparencySuggested = Nothing
} | 432 | imagePropertiesSuggestionState =
ImagePropertiesSuggestionState'
{ _ipssAngleSuggested = Nothing
, _ipssContrastSuggested = Nothing
, _ipssContentURISuggested = Nothing
, _ipssSourceURISuggested = Nothing
, _ipssCropPropertiesSuggestionState = Nothing
, _ipssBrightnessSuggested = Nothing
, _ipssTransparencySuggested = Nothing
} | 363 | true | true | 0 | 6 | 130 | 72 | 52 | 20 | null | null |
tonymorris/story-board | src/Graphics/Storyboard/Deck.hs | bsd-3-clause | runDeck' :: DeviceContext -> Deck -> IO (Either UserEvent (Cavity Double))
runDeck' context (Deck cavity Empty) = do
case cavity of Cavity (x,y) (w,h) -> send context $ clearRect (x,y,w,h)
return (Right cavity) | 219 | runDeck' :: DeviceContext -> Deck -> IO (Either UserEvent (Cavity Double))
runDeck' context (Deck cavity Empty) = do
case cavity of Cavity (x,y) (w,h) -> send context $ clearRect (x,y,w,h)
return (Right cavity) | 219 | runDeck' context (Deck cavity Empty) = do
case cavity of Cavity (x,y) (w,h) -> send context $ clearRect (x,y,w,h)
return (Right cavity) | 144 | false | true | 0 | 12 | 41 | 113 | 57 | 56 | null | null |
szatkus/haste-compiler | libraries/haste-lib/src/Haste/JSON.hs | bsd-3-clause | numFail :: a
numFail = error "Num JSON: not a numeric JSON node!" | 65 | numFail :: a
numFail = error "Num JSON: not a numeric JSON node!" | 65 | numFail = error "Num JSON: not a numeric JSON node!" | 52 | false | true | 0 | 6 | 12 | 21 | 8 | 13 | null | null |
tobsan/yane | CPUHelpers.hs | gpl-3.0 | -- ---------------------------------------------------------------------------
-- Addressing modes.
{-| Fetch an 8 bit address operand from the stack
-}
operand :: (NesCPU m) => m Operand
operand = fetch | 205 | operand :: (NesCPU m) => m Operand
operand = fetch | 50 | operand = fetch | 15 | true | true | 0 | 7 | 27 | 32 | 16 | 16 | null | null |
awgn/ass | src/Ass/Cpp/Token.hs | gpl-2.0 | isDirective :: Token -> Bool
isDirective TokenDirective{} = True | 65 | isDirective :: Token -> Bool
isDirective TokenDirective{} = True | 65 | isDirective TokenDirective{} = True | 36 | false | true | 0 | 6 | 9 | 22 | 11 | 11 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.