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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
phaazon/OpenGLRaw
|
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
|
bsd-3-clause
|
gl_CONVOLUTION_1D :: GLenum
gl_CONVOLUTION_1D = 0x8010
| 54
|
gl_CONVOLUTION_1D :: GLenum
gl_CONVOLUTION_1D = 0x8010
| 54
|
gl_CONVOLUTION_1D = 0x8010
| 26
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
rueshyna/gogol
|
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Operations/Get.hs
|
mpl-2.0
|
-- | Creates a value of 'ProjectsOperationsGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pogXgafv'
--
-- * 'pogUploadProtocol'
--
-- * 'pogPp'
--
-- * 'pogAccessToken'
--
-- * 'pogUploadType'
--
-- * 'pogBearerToken'
--
-- * 'pogName'
--
-- * 'pogCallback'
projectsOperationsGet
:: Text -- ^ 'pogName'
-> ProjectsOperationsGet
projectsOperationsGet pPogName_ =
ProjectsOperationsGet'
{ _pogXgafv = Nothing
, _pogUploadProtocol = Nothing
, _pogPp = True
, _pogAccessToken = Nothing
, _pogUploadType = Nothing
, _pogBearerToken = Nothing
, _pogName = pPogName_
, _pogCallback = Nothing
}
| 726
|
projectsOperationsGet
:: Text -- ^ 'pogName'
-> ProjectsOperationsGet
projectsOperationsGet pPogName_ =
ProjectsOperationsGet'
{ _pogXgafv = Nothing
, _pogUploadProtocol = Nothing
, _pogPp = True
, _pogAccessToken = Nothing
, _pogUploadType = Nothing
, _pogBearerToken = Nothing
, _pogName = pPogName_
, _pogCallback = Nothing
}
| 376
|
projectsOperationsGet pPogName_ =
ProjectsOperationsGet'
{ _pogXgafv = Nothing
, _pogUploadProtocol = Nothing
, _pogPp = True
, _pogAccessToken = Nothing
, _pogUploadType = Nothing
, _pogBearerToken = Nothing
, _pogName = pPogName_
, _pogCallback = Nothing
}
| 298
| true
| true
| 0
| 6
| 154
| 88
| 62
| 26
| null | null |
JacquesCarette/literate-scientific-software
|
code/drasil-docLang/Drasil/DocLang/SRS.hs
|
bsd-2-clause
|
nonfuncReqLabel = makeSecRef "NFRs" "Nonfunctional Requirements"
| 67
|
nonfuncReqLabel = makeSecRef "NFRs" "Nonfunctional Requirements"
| 67
|
nonfuncReqLabel = makeSecRef "NFRs" "Nonfunctional Requirements"
| 67
| false
| false
| 0
| 5
| 8
| 11
| 5
| 6
| null | null |
brendanhay/gogol
|
gogol-bigquery/gen/Network/Google/Resource/BigQuery/RowAccessPolicies/TestIAMPermissions.hs
|
mpl-2.0
|
-- | Creates a value of 'RowAccessPoliciesTestIAMPermissions' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'raptipPayload'
--
-- * 'raptipResource'
rowAccessPoliciesTestIAMPermissions
:: TestIAMPermissionsRequest -- ^ 'raptipPayload'
-> Text -- ^ 'raptipResource'
-> RowAccessPoliciesTestIAMPermissions
rowAccessPoliciesTestIAMPermissions pRaptipPayload_ pRaptipResource_ =
RowAccessPoliciesTestIAMPermissions'
{_raptipPayload = pRaptipPayload_, _raptipResource = pRaptipResource_}
| 587
|
rowAccessPoliciesTestIAMPermissions
:: TestIAMPermissionsRequest -- ^ 'raptipPayload'
-> Text -- ^ 'raptipResource'
-> RowAccessPoliciesTestIAMPermissions
rowAccessPoliciesTestIAMPermissions pRaptipPayload_ pRaptipResource_ =
RowAccessPoliciesTestIAMPermissions'
{_raptipPayload = pRaptipPayload_, _raptipResource = pRaptipResource_}
| 351
|
rowAccessPoliciesTestIAMPermissions pRaptipPayload_ pRaptipResource_ =
RowAccessPoliciesTestIAMPermissions'
{_raptipPayload = pRaptipPayload_, _raptipResource = pRaptipResource_}
| 184
| true
| true
| 0
| 8
| 79
| 56
| 32
| 24
| null | null |
sheyll/isobmff-builder
|
src/Data/ByteString/IsoBaseFileFormat/Boxes/MovieFragmentHeader.hs
|
bsd-3-clause
|
-- * @mvhd@ Box
-- | Construct a 'MovieFragmentHeader' box.
movieFragmentHeader ::
MovieFragmentHeader -> Box (FullBox MovieFragmentHeader 0)
movieFragmentHeader = fullBox 0
| 176
|
movieFragmentHeader ::
MovieFragmentHeader -> Box (FullBox MovieFragmentHeader 0)
movieFragmentHeader = fullBox 0
| 115
|
movieFragmentHeader = fullBox 0
| 31
| true
| true
| 0
| 8
| 24
| 31
| 16
| 15
| null | null |
abrim/yesod-dsl
|
YesodDsl/Generator.hs
|
bsd-2-clause
|
writeRoute :: Module -> Route -> IO ()
writeRoute m r = do
let content = concatMap (handler m r) (routeHandlers r)
syncFile (joinPath ["Handler", moduleName m,
routeModuleName r ++ ".hs"]) $
T.unpack $(codegenFile "codegen/route-header.cg") ++ content
where
imports = concatMap fmtImport $ filter ((`elem` modules) . importModule) $ modImports m
modules = nub $ catMaybes $ [
Map.lookup fn importedFunctions
| fn <- usedFunctions
]
importedFunctions = Map.fromList [ (fn, importModule i) |
i <- modImports m,
fn <- importFunctions i ]
usedFunctions = [ fn | Call fn _ <- universeBi r ] ++ [ fn | ExternExpr fn _ <- universeBi r ]
++ concat [ catMaybes [ mm | (_,_,mm) <- ifs ]
| Update _ _ (Just ifs) <- universeBi r ]
++ concat [ catMaybes [ mm | (_,_,mm) <- ifs ] | Insert _ (Just (Just _, ifs)) _ <- universeBi r ]
| 1,204
|
writeRoute :: Module -> Route -> IO ()
writeRoute m r = do
let content = concatMap (handler m r) (routeHandlers r)
syncFile (joinPath ["Handler", moduleName m,
routeModuleName r ++ ".hs"]) $
T.unpack $(codegenFile "codegen/route-header.cg") ++ content
where
imports = concatMap fmtImport $ filter ((`elem` modules) . importModule) $ modImports m
modules = nub $ catMaybes $ [
Map.lookup fn importedFunctions
| fn <- usedFunctions
]
importedFunctions = Map.fromList [ (fn, importModule i) |
i <- modImports m,
fn <- importFunctions i ]
usedFunctions = [ fn | Call fn _ <- universeBi r ] ++ [ fn | ExternExpr fn _ <- universeBi r ]
++ concat [ catMaybes [ mm | (_,_,mm) <- ifs ]
| Update _ _ (Just ifs) <- universeBi r ]
++ concat [ catMaybes [ mm | (_,_,mm) <- ifs ] | Insert _ (Just (Just _, ifs)) _ <- universeBi r ]
| 1,204
|
writeRoute m r = do
let content = concatMap (handler m r) (routeHandlers r)
syncFile (joinPath ["Handler", moduleName m,
routeModuleName r ++ ".hs"]) $
T.unpack $(codegenFile "codegen/route-header.cg") ++ content
where
imports = concatMap fmtImport $ filter ((`elem` modules) . importModule) $ modImports m
modules = nub $ catMaybes $ [
Map.lookup fn importedFunctions
| fn <- usedFunctions
]
importedFunctions = Map.fromList [ (fn, importModule i) |
i <- modImports m,
fn <- importFunctions i ]
usedFunctions = [ fn | Call fn _ <- universeBi r ] ++ [ fn | ExternExpr fn _ <- universeBi r ]
++ concat [ catMaybes [ mm | (_,_,mm) <- ifs ]
| Update _ _ (Just ifs) <- universeBi r ]
++ concat [ catMaybes [ mm | (_,_,mm) <- ifs ] | Insert _ (Just (Just _, ifs)) _ <- universeBi r ]
| 1,165
| false
| true
| 3
| 15
| 536
| 394
| 195
| 199
| null | null |
d16-processor/Haskell-C-
|
src/Type.hs
|
mit
|
canAssign P_Char P_Int = True
| 29
|
canAssign P_Char P_Int = True
| 29
|
canAssign P_Char P_Int = True
| 29
| false
| false
| 0
| 5
| 4
| 11
| 5
| 6
| null | null |
agentm/project-m36
|
src/lib/ProjectM36/Server/EntryPoints.hs
|
unlicense
|
handleExecuteAutoMergeToHead :: Maybe Timeout -> SessionId -> Connection -> MergeStrategy -> HeadName -> IO (Either RelationalError ())
handleExecuteAutoMergeToHead ti sessionId conn strat headName' =
timeoutRelErr ti (autoMergeToHead sessionId conn strat headName')
| 268
|
handleExecuteAutoMergeToHead :: Maybe Timeout -> SessionId -> Connection -> MergeStrategy -> HeadName -> IO (Either RelationalError ())
handleExecuteAutoMergeToHead ti sessionId conn strat headName' =
timeoutRelErr ti (autoMergeToHead sessionId conn strat headName')
| 268
|
handleExecuteAutoMergeToHead ti sessionId conn strat headName' =
timeoutRelErr ti (autoMergeToHead sessionId conn strat headName')
| 132
| false
| true
| 0
| 13
| 32
| 75
| 36
| 39
| null | null |
nfjinjing/level5
|
src/MusicPad/Model/TopLevel.hs
|
bsd-3-clause
|
is_verse_touched :: Verse -> Bool
is_verse_touched = tracks > any is_track_touched
| 82
|
is_verse_touched :: Verse -> Bool
is_verse_touched = tracks > any is_track_touched
| 82
|
is_verse_touched = tracks > any is_track_touched
| 48
| false
| true
| 0
| 6
| 10
| 22
| 11
| 11
| null | null |
FranklinChen/hugs98-plus-Sep2006
|
packages/base/Data/ByteString.hs
|
bsd-3-clause
|
-- | /O(1)/ Return all the elements of a 'ByteString' except the last one.
-- An exception will be thrown in the case of an empty ByteString.
init :: ByteString -> ByteString
init ps@(PS p s l)
| null ps = errorEmptyList "init"
| otherwise = PS p s (l-1)
| 264
|
init :: ByteString -> ByteString
init ps@(PS p s l)
| null ps = errorEmptyList "init"
| otherwise = PS p s (l-1)
| 122
|
init ps@(PS p s l)
| null ps = errorEmptyList "init"
| otherwise = PS p s (l-1)
| 89
| true
| true
| 0
| 8
| 59
| 68
| 33
| 35
| null | null |
vladimir-ipatov/ganeti
|
src/Ganeti/Constants.hs
|
gpl-2.0
|
ssOfflineNodes :: String
ssOfflineNodes = "offline_nodes"
| 57
|
ssOfflineNodes :: String
ssOfflineNodes = "offline_nodes"
| 57
|
ssOfflineNodes = "offline_nodes"
| 32
| false
| true
| 0
| 6
| 5
| 18
| 7
| 11
| null | null |
ethercrow/yi-config
|
modules/IdrisIDESexpCopyPasteFromIdris.hs
|
gpl-2.0
|
atomC = do string "True"; return (BoolAtom True)
<|> do string "False"; return (BoolAtom False)
<|> do xs <- many (noneOf " \n\t\r\"()"); return (SymbolAtom xs)
| 168
|
atomC = do string "True"; return (BoolAtom True)
<|> do string "False"; return (BoolAtom False)
<|> do xs <- many (noneOf " \n\t\r\"()"); return (SymbolAtom xs)
| 168
|
atomC = do string "True"; return (BoolAtom True)
<|> do string "False"; return (BoolAtom False)
<|> do xs <- many (noneOf " \n\t\r\"()"); return (SymbolAtom xs)
| 168
| false
| false
| 6
| 11
| 33
| 88
| 40
| 48
| null | null |
gseitz/oauth-provider
|
test/UnitTests.hs
|
bsd-3-clause
|
signatureTests :: TestTree
signatureTests = testGroup "Signature tests" [
hmacSha1SignatureTest, plainTextSignatureTest, rsaSha1SignatureTest
]
where
hmacSha1SignatureTest = testCase "HMAC-SHA1 signature" $
mkSignature HMAC_SHA1 ("kd94hf93k423kf44", "pfkkdhi9sl3r4s00") baseString @?= Signature "QnAoyJcVeC9988ZnawQI+K6XrRA="
plainTextSignatureTest = testCase "PLAINTEXT signature" $
mkSignature Plaintext ("foo", "bar") undefined @?= Signature "foo&bar"
rsaSha1SignatureTest = testCase "RSA-SHA1 signature is unsupported" $
extractSignatureMethod "RSA-SHA1" @?= Left (UnsupportedSignatureMethod "RSA-SHA1")
| 657
|
signatureTests :: TestTree
signatureTests = testGroup "Signature tests" [
hmacSha1SignatureTest, plainTextSignatureTest, rsaSha1SignatureTest
]
where
hmacSha1SignatureTest = testCase "HMAC-SHA1 signature" $
mkSignature HMAC_SHA1 ("kd94hf93k423kf44", "pfkkdhi9sl3r4s00") baseString @?= Signature "QnAoyJcVeC9988ZnawQI+K6XrRA="
plainTextSignatureTest = testCase "PLAINTEXT signature" $
mkSignature Plaintext ("foo", "bar") undefined @?= Signature "foo&bar"
rsaSha1SignatureTest = testCase "RSA-SHA1 signature is unsupported" $
extractSignatureMethod "RSA-SHA1" @?= Left (UnsupportedSignatureMethod "RSA-SHA1")
| 657
|
signatureTests = testGroup "Signature tests" [
hmacSha1SignatureTest, plainTextSignatureTest, rsaSha1SignatureTest
]
where
hmacSha1SignatureTest = testCase "HMAC-SHA1 signature" $
mkSignature HMAC_SHA1 ("kd94hf93k423kf44", "pfkkdhi9sl3r4s00") baseString @?= Signature "QnAoyJcVeC9988ZnawQI+K6XrRA="
plainTextSignatureTest = testCase "PLAINTEXT signature" $
mkSignature Plaintext ("foo", "bar") undefined @?= Signature "foo&bar"
rsaSha1SignatureTest = testCase "RSA-SHA1 signature is unsupported" $
extractSignatureMethod "RSA-SHA1" @?= Left (UnsupportedSignatureMethod "RSA-SHA1")
| 630
| false
| true
| 0
| 8
| 105
| 120
| 60
| 60
| null | null |
xcv-/LCC
|
lib/Data/TaggedTree/Flat.hs
|
gpl-3.0
|
flatten :: (Ord tag, Monoid s, Cons' s tag) => TaggedTree tag a -> [(s, [a])]
flatten tree = zip (paths tree) (leafs tree)
where
leafs :: Ord tag => TaggedTree tag a -> [[a]]
leafs (Subtree m) = concatMap (leafs . snd) (Map.toList m)
leafs (Leaf xs) = [xs]
| 270
|
flatten :: (Ord tag, Monoid s, Cons' s tag) => TaggedTree tag a -> [(s, [a])]
flatten tree = zip (paths tree) (leafs tree)
where
leafs :: Ord tag => TaggedTree tag a -> [[a]]
leafs (Subtree m) = concatMap (leafs . snd) (Map.toList m)
leafs (Leaf xs) = [xs]
| 270
|
flatten tree = zip (paths tree) (leafs tree)
where
leafs :: Ord tag => TaggedTree tag a -> [[a]]
leafs (Subtree m) = concatMap (leafs . snd) (Map.toList m)
leafs (Leaf xs) = [xs]
| 192
| false
| true
| 0
| 9
| 63
| 160
| 81
| 79
| null | null |
christiaanb/cabal
|
cabal-install/Distribution/Client/Setup.hs
|
bsd-3-clause
|
buildCommand :: CommandUI (BuildFlags, BuildExFlags)
buildCommand = parent {
commandDefaultFlags = (commandDefaultFlags parent, mempty),
commandOptions =
\showOrParseArgs -> liftOptions fst setFst
(commandOptions parent showOrParseArgs)
++
liftOptions snd setSnd (buildExOptions showOrParseArgs)
}
where
setFst a (_,b) = (a,b)
setSnd b (a,_) = (a,b)
parent = Cabal.buildCommand defaultProgramConfiguration
| 519
|
buildCommand :: CommandUI (BuildFlags, BuildExFlags)
buildCommand = parent {
commandDefaultFlags = (commandDefaultFlags parent, mempty),
commandOptions =
\showOrParseArgs -> liftOptions fst setFst
(commandOptions parent showOrParseArgs)
++
liftOptions snd setSnd (buildExOptions showOrParseArgs)
}
where
setFst a (_,b) = (a,b)
setSnd b (a,_) = (a,b)
parent = Cabal.buildCommand defaultProgramConfiguration
| 519
|
buildCommand = parent {
commandDefaultFlags = (commandDefaultFlags parent, mempty),
commandOptions =
\showOrParseArgs -> liftOptions fst setFst
(commandOptions parent showOrParseArgs)
++
liftOptions snd setSnd (buildExOptions showOrParseArgs)
}
where
setFst a (_,b) = (a,b)
setSnd b (a,_) = (a,b)
parent = Cabal.buildCommand defaultProgramConfiguration
| 466
| false
| true
| 1
| 11
| 159
| 153
| 77
| 76
| null | null |
isomorphism/webgl
|
src/Graphics/Rendering/WebGL/Constants.hs
|
mit
|
gl_TEXTURE_CUBE_MAP_NEGATIVE_Z :: GLenum
gl_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A
| 80
|
gl_TEXTURE_CUBE_MAP_NEGATIVE_Z :: GLenum
gl_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A
| 80
|
gl_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A
| 39
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
piotrm0/planar
|
JIT.hs
|
artistic-2.0
|
jit :: Context -> (EE.MCJIT -> IO a) -> IO a
jit c = EE.withMCJIT c optlevel model ptrelim fastins
where
optlevel = Just 0 -- optimization level
model = Nothing -- code model ( Default )
ptrelim = Nothing -- frame pointer elimination
fastins = Nothing -- fast instruction selection
| 305
|
jit :: Context -> (EE.MCJIT -> IO a) -> IO a
jit c = EE.withMCJIT c optlevel model ptrelim fastins
where
optlevel = Just 0 -- optimization level
model = Nothing -- code model ( Default )
ptrelim = Nothing -- frame pointer elimination
fastins = Nothing -- fast instruction selection
| 305
|
jit c = EE.withMCJIT c optlevel model ptrelim fastins
where
optlevel = Just 0 -- optimization level
model = Nothing -- code model ( Default )
ptrelim = Nothing -- frame pointer elimination
fastins = Nothing -- fast instruction selection
| 260
| false
| true
| 0
| 9
| 74
| 84
| 43
| 41
| null | null |
ddssff/pandoc
|
src/Text/Pandoc/Readers/LaTeX.hs
|
gpl-2.0
|
circ 'i' = "î"
| 14
|
circ 'i' = "î"
| 14
|
circ 'i' = "î"
| 14
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
spinda/liquidhaskell
|
src/Language/Haskell/Liquid/GhcMisc.hs
|
bsd-3-clause
|
-----------------------------------------------------------------------
--------------- Generic Helpers for Encoding Location -----------------
-----------------------------------------------------------------------
srcSpanTick :: Module -> SrcSpan -> Tickish a
srcSpanTick m loc
= ProfNote (AllCafsCC m loc) False True
| 322
|
srcSpanTick :: Module -> SrcSpan -> Tickish a
srcSpanTick m loc
= ProfNote (AllCafsCC m loc) False True
| 105
|
srcSpanTick m loc
= ProfNote (AllCafsCC m loc) False True
| 59
| true
| true
| 0
| 8
| 29
| 50
| 24
| 26
| null | null |
co-dan/NPNTool
|
src/NPNTool/NPNet.hs
|
bsd-3-clause
|
markTokens :: NPMark l c PTPlace -> MultiSet PTPlace
markTokens (NPMark m) =
MSet.fromList (concatMap (\p -> replicate (length (m M.! p)) p)
(M.keys m))
| 171
|
markTokens :: NPMark l c PTPlace -> MultiSet PTPlace
markTokens (NPMark m) =
MSet.fromList (concatMap (\p -> replicate (length (m M.! p)) p)
(M.keys m))
| 171
|
markTokens (NPMark m) =
MSet.fromList (concatMap (\p -> replicate (length (m M.! p)) p)
(M.keys m))
| 118
| false
| true
| 0
| 14
| 43
| 83
| 41
| 42
| null | null |
charles-cooper/modern-fp-architecture
|
src/Main.hs
|
cc0-1.0
|
listFiles :: CloudFiles [Path]
listFiles = liftF $ ListFiles id
| 63
|
listFiles :: CloudFiles [Path]
listFiles = liftF $ ListFiles id
| 63
|
listFiles = liftF $ ListFiles id
| 32
| false
| true
| 0
| 6
| 9
| 24
| 12
| 12
| null | null |
peterokagey/haskellOEIS
|
test/EKG/A169845Spec.hs
|
apache-2.0
|
main :: IO ()
main = hspec spec
| 31
|
main :: IO ()
main = hspec spec
| 31
|
main = hspec spec
| 17
| false
| true
| 1
| 6
| 7
| 22
| 9
| 13
| null | null |
kim/amazonka
|
amazonka-iam/gen/Network/AWS/IAM/CreateAccessKey.hs
|
mpl-2.0
|
-- | The user name that the new key will belong to.
cakUserName :: Lens' CreateAccessKey (Maybe Text)
cakUserName = lens _cakUserName (\s a -> s { _cakUserName = a })
| 166
|
cakUserName :: Lens' CreateAccessKey (Maybe Text)
cakUserName = lens _cakUserName (\s a -> s { _cakUserName = a })
| 114
|
cakUserName = lens _cakUserName (\s a -> s { _cakUserName = a })
| 64
| true
| true
| 0
| 9
| 30
| 46
| 25
| 21
| null | null |
carabolic/IMDBhs
|
app/Main.hs
|
bsd-3-clause
|
parseCompressed :: FilePath -> IO B.ByteString
parseCompressed path = do
contents <- GZip.decompress <$> B.readFile path
return contents
| 140
|
parseCompressed :: FilePath -> IO B.ByteString
parseCompressed path = do
contents <- GZip.decompress <$> B.readFile path
return contents
| 140
|
parseCompressed path = do
contents <- GZip.decompress <$> B.readFile path
return contents
| 93
| false
| true
| 0
| 10
| 21
| 47
| 21
| 26
| null | null |
valderman/domplate
|
Text/Domplate/Replace.hs
|
bsd-3-clause
|
-- | A type mismatch has occurred.
typeError :: InternalKey -> String -> String -> Either String a
typeError k tTemplate tCtx =
Left $ unwords [
T.unpack k', "was used as a", tTemplate, "by template,",
"but declared", tCtx, "by context!"
]
where
k' = case k of
Weak k' -> T.intercalate (T.singleton '.') k'
Strong k' -> T.intercalate (T.singleton '.') k'
-- | A key was not found.
| 429
|
typeError :: InternalKey -> String -> String -> Either String a
typeError k tTemplate tCtx =
Left $ unwords [
T.unpack k', "was used as a", tTemplate, "by template,",
"but declared", tCtx, "by context!"
]
where
k' = case k of
Weak k' -> T.intercalate (T.singleton '.') k'
Strong k' -> T.intercalate (T.singleton '.') k'
-- | A key was not found.
| 394
|
typeError k tTemplate tCtx =
Left $ unwords [
T.unpack k', "was used as a", tTemplate, "by template,",
"but declared", tCtx, "by context!"
]
where
k' = case k of
Weak k' -> T.intercalate (T.singleton '.') k'
Strong k' -> T.intercalate (T.singleton '.') k'
-- | A key was not found.
| 330
| true
| true
| 0
| 11
| 117
| 130
| 66
| 64
| null | null |
TomMD/ghc
|
compiler/prelude/PrelNames.hs
|
bsd-3-clause
|
word64TyConKey = mkPreludeTyConUnique 65
| 65
|
word64TyConKey = mkPreludeTyConUnique 65
| 65
|
word64TyConKey = mkPreludeTyConUnique 65
| 65
| false
| false
| 0
| 5
| 28
| 9
| 4
| 5
| null | null |
christiaanb/cabal
|
Cabal/Distribution/Simple/PackageIndex.hs
|
bsd-3-clause
|
invariant :: PackageInstalled a => PackageIndex a -> Bool
invariant (PackageIndex pids pnames) =
map installedPackageId (Map.elems pids)
== sort
[ assert pinstOk (installedPackageId pinst)
| (pname, pvers) <- Map.toList pnames
, let pversOk = not (Map.null pvers)
, (pver, pinsts) <- assert pversOk $ Map.toList pvers
, let pinsts' = sortBy (comparing installedPackageId) pinsts
pinstsOk = all (\g -> length g == 1)
(groupBy (equating installedPackageId) pinsts')
, pinst <- assert pinstsOk $ pinsts'
, let pinstOk = packageName pinst == pname
&& packageVersion pinst == pver
]
| 695
|
invariant :: PackageInstalled a => PackageIndex a -> Bool
invariant (PackageIndex pids pnames) =
map installedPackageId (Map.elems pids)
== sort
[ assert pinstOk (installedPackageId pinst)
| (pname, pvers) <- Map.toList pnames
, let pversOk = not (Map.null pvers)
, (pver, pinsts) <- assert pversOk $ Map.toList pvers
, let pinsts' = sortBy (comparing installedPackageId) pinsts
pinstsOk = all (\g -> length g == 1)
(groupBy (equating installedPackageId) pinsts')
, pinst <- assert pinstsOk $ pinsts'
, let pinstOk = packageName pinst == pname
&& packageVersion pinst == pver
]
| 695
|
invariant (PackageIndex pids pnames) =
map installedPackageId (Map.elems pids)
== sort
[ assert pinstOk (installedPackageId pinst)
| (pname, pvers) <- Map.toList pnames
, let pversOk = not (Map.null pvers)
, (pver, pinsts) <- assert pversOk $ Map.toList pvers
, let pinsts' = sortBy (comparing installedPackageId) pinsts
pinstsOk = all (\g -> length g == 1)
(groupBy (equating installedPackageId) pinsts')
, pinst <- assert pinstsOk $ pinsts'
, let pinstOk = packageName pinst == pname
&& packageVersion pinst == pver
]
| 637
| false
| true
| 18
| 12
| 206
| 232
| 117
| 115
| null | null |
rolph-recto/liquid-fixpoint
|
src/Language/Fixpoint/Types/Refinements.hs
|
bsd-3-clause
|
encodeSymConst :: SymConst -> Symbol
encodeSymConst (SL s) = litSymbol $ symbol s
| 88
|
encodeSymConst :: SymConst -> Symbol
encodeSymConst (SL s) = litSymbol $ symbol s
| 88
|
encodeSymConst (SL s) = litSymbol $ symbol s
| 44
| false
| true
| 0
| 7
| 19
| 31
| 15
| 16
| null | null |
gibiansky/jupyter-haskell
|
src/Jupyter/Kernel.hs
|
mit
|
-- | Indefinitely serve a kernel on some ports. Ports are allocated dynamically and so, unlike
-- 'serve', 'serveDynamic' may be used when you do not know which ports are open or closed.
--
-- The ports allocated by 'serveDynamic' are passed to the provided callback in the 'KernelProfile'
-- so that clients may connect to the served kernel.
--
-- After the callback is run, several threads are started which listen and write to ZeroMQ sockets
-- on the allocated ports. If an exception is raised and any of the threads die, the exception is
-- re-raised on the main thread. Otherwise, this listens on the kernels indefinitely after running
-- the callback.
--
-- This function serves as a form of inverting control over the allocated ports: usually, clients
-- will choose what ports to listen on, and provide the kernel with the ports with a connection file
-- path in the kernel command-line arguments. With this function, you can instead first start the
-- kernel, and then connect a client to the ports that the kernel chooses to bind to.
serveDynamic :: (KernelProfile -> IO ()) -- ^ This function is called with the dynamically-generated
-- kernel profile that the kernel will serve on, so that
-- clients may be notified of which ports to use to connect
-- to this kernel. The callback is called after sockets are
-- bound but before the kernel begins listening for
-- messages, so if the callback fails with an exception the
-- kernel threads are never started.
-> CommHandler -- ^ The 'Comm' handler is called when 'Comm' messages are received from
-- a frontend.
-> ClientRequestHandler -- ^The request handler is called when 'ClientRequest' messages
-- are received from a frontend.
-> IO ()
serveDynamic = serveInternal Nothing
| 2,113
|
serveDynamic :: (KernelProfile -> IO ()) -- ^ This function is called with the dynamically-generated
-- kernel profile that the kernel will serve on, so that
-- clients may be notified of which ports to use to connect
-- to this kernel. The callback is called after sockets are
-- bound but before the kernel begins listening for
-- messages, so if the callback fails with an exception the
-- kernel threads are never started.
-> CommHandler -- ^ The 'Comm' handler is called when 'Comm' messages are received from
-- a frontend.
-> ClientRequestHandler -- ^The request handler is called when 'ClientRequest' messages
-- are received from a frontend.
-> IO ()
serveDynamic = serveInternal Nothing
| 1,068
|
serveDynamic = serveInternal Nothing
| 36
| true
| true
| 0
| 10
| 671
| 74
| 48
| 26
| null | null |
ghc-android/ghc
|
testsuite/tests/ghci/should_run/ghcirun004.hs
|
bsd-3-clause
|
6 = 5
| 5
|
6 = 5
| 5
|
6 = 5
| 5
| false
| false
| 1
| 5
| 2
| 10
| 3
| 7
| null | null |
mariefarrell/Hets
|
DFOL/Tests/Test_Analysis_DFOL.hs
|
gpl-2.0
|
x1Tok = mkTok "x1"
| 18
|
x1Tok = mkTok "x1"
| 18
|
x1Tok = mkTok "x1"
| 18
| false
| false
| 1
| 5
| 3
| 12
| 4
| 8
| null | null |
yi-editor/yi
|
yi-core/src/Yi/Keymap/Keys.hs
|
gpl-2.0
|
-- | @ ev ?>>! act = 'event' ev >> 'write' act @
(?>>!) :: (MonadInteract m Action Event, YiAction a x, Show x) => Event -> a -> m ()
ev ?>>! act = event ev >> write act
| 169
|
(?>>!) :: (MonadInteract m Action Event, YiAction a x, Show x) => Event -> a -> m ()
ev ?>>! act = event ev >> write act
| 120
|
ev ?>>! act = event ev >> write act
| 35
| true
| true
| 0
| 9
| 39
| 70
| 35
| 35
| null | null |
ptol/oczor
|
src/Oczor/Converter/Rewriter.hs
|
mit
|
ffNames :: Map String String
ffNames = mapFromList [
("andBool", "and"),
("orBool", "or"),
("not", "not")
]
| 115
|
ffNames :: Map String String
ffNames = mapFromList [
("andBool", "and"),
("orBool", "or"),
("not", "not")
]
| 115
|
ffNames = mapFromList [
("andBool", "and"),
("orBool", "or"),
("not", "not")
]
| 86
| false
| true
| 0
| 6
| 23
| 51
| 28
| 23
| null | null |
spechub/Hets
|
CASL_DL/StatAna.hs
|
gpl-2.0
|
postAna :: [Diagnosis]
-> Sign DL_FORMULA CASL_DLSign
-> (BASIC_SPEC () () DL_FORMULA,
ExtSign (Sign DL_FORMULA CASL_DLSign) Symbol,
[Named (FORMULA DL_FORMULA)])
-> Result (BASIC_SPEC () () DL_FORMULA,
ExtSign (Sign DL_FORMULA CASL_DLSign) Symbol,
[Named (FORMULA DL_FORMULA)])
postAna ds1 in_sig i@(_, ExtSign acc_sig _, _) =
Result (ds1 ++ ds_sig) $ if null ds_sig then Just i else Nothing
where ds_sig = chkSorts ++ checkPreds ++ checkOps
diff_sig = diffSig diffCASL_DLSign acc_sig in_sig
chkSorts = Set.fold chSort [] (sortSet diff_sig) ++
[Diag Error
("\n new subsort relations with data " ++
"topsort are not allowed") nullRange
| Set.member dataS (supersortsOf thing acc_sig) ||
Set.member dataS (subsortsOf thing acc_sig) ||
supersortsOf dataS predefSign /=
supersortsOf dataS acc_sig ||
selectDATAKernel (sortRel predefSign)
/= selectDATAKernel (sortRel acc_sig)]
chSort s ds = ds ++
[mkDiag Error
("\n new sort is not a subsort of '" ++
showDoc thing "':") s
| not $ Set.member thing $ supersortsOf s acc_sig]
++ [mkDiag Error
("\n new sort must not be a supersort of '" ++
showDoc thing "':") s
| Set.member thing (subsortsOf s acc_sig)]
selectDATAKernel rel =
Rel.intransKernel $ Rel.restrict rel $
Set.insert dataS
(subsortsOf dataS predefSign)
checkPreds = MapSet.foldWithKey chPred [] (predMap diff_sig)
chPred p ty = (chArgs "pred" p (predArgs ty) ++)
checkOps = MapSet.foldWithKey chOp [] (opMap diff_sig)
chOp o ty = (chArgs "op" o (opArgs ty) ++)
chArgs kstr sym args =
case args of
[] -> if kstr == "op"
then []
else [mkDiag Error
"\n propositional symbols are not allowed" sym]
(s : _) ->
if s == thing ||
Set.member thing (supersortsOf s acc_sig)
then []
else [mkDiag Error
("\n the first argument sort of this " ++ kstr ++
" is not a subsort of '" ++ showDoc thing "':")
sym]
{- sketch of Annotation analysis:
where callAna bsRes =
case analyseAnnos ga acc_sig bs of
Result ds2 mESig ->
maybe (Result (ds1++ds2) Nothing)
(integrateExt (ds1++ds2) baRes) mESig
integrateExt ds (bs',dif_sig,acc_sig,sens) eSig =
Result ds (bs',
dif_sig {extendedInfo = dif eSig (extendedInfo sig)},
acc_sig {extendedInfo = eSig},
sens)
-}
| 3,150
|
postAna :: [Diagnosis]
-> Sign DL_FORMULA CASL_DLSign
-> (BASIC_SPEC () () DL_FORMULA,
ExtSign (Sign DL_FORMULA CASL_DLSign) Symbol,
[Named (FORMULA DL_FORMULA)])
-> Result (BASIC_SPEC () () DL_FORMULA,
ExtSign (Sign DL_FORMULA CASL_DLSign) Symbol,
[Named (FORMULA DL_FORMULA)])
postAna ds1 in_sig i@(_, ExtSign acc_sig _, _) =
Result (ds1 ++ ds_sig) $ if null ds_sig then Just i else Nothing
where ds_sig = chkSorts ++ checkPreds ++ checkOps
diff_sig = diffSig diffCASL_DLSign acc_sig in_sig
chkSorts = Set.fold chSort [] (sortSet diff_sig) ++
[Diag Error
("\n new subsort relations with data " ++
"topsort are not allowed") nullRange
| Set.member dataS (supersortsOf thing acc_sig) ||
Set.member dataS (subsortsOf thing acc_sig) ||
supersortsOf dataS predefSign /=
supersortsOf dataS acc_sig ||
selectDATAKernel (sortRel predefSign)
/= selectDATAKernel (sortRel acc_sig)]
chSort s ds = ds ++
[mkDiag Error
("\n new sort is not a subsort of '" ++
showDoc thing "':") s
| not $ Set.member thing $ supersortsOf s acc_sig]
++ [mkDiag Error
("\n new sort must not be a supersort of '" ++
showDoc thing "':") s
| Set.member thing (subsortsOf s acc_sig)]
selectDATAKernel rel =
Rel.intransKernel $ Rel.restrict rel $
Set.insert dataS
(subsortsOf dataS predefSign)
checkPreds = MapSet.foldWithKey chPred [] (predMap diff_sig)
chPred p ty = (chArgs "pred" p (predArgs ty) ++)
checkOps = MapSet.foldWithKey chOp [] (opMap diff_sig)
chOp o ty = (chArgs "op" o (opArgs ty) ++)
chArgs kstr sym args =
case args of
[] -> if kstr == "op"
then []
else [mkDiag Error
"\n propositional symbols are not allowed" sym]
(s : _) ->
if s == thing ||
Set.member thing (supersortsOf s acc_sig)
then []
else [mkDiag Error
("\n the first argument sort of this " ++ kstr ++
" is not a subsort of '" ++ showDoc thing "':")
sym]
{- sketch of Annotation analysis:
where callAna bsRes =
case analyseAnnos ga acc_sig bs of
Result ds2 mESig ->
maybe (Result (ds1++ds2) Nothing)
(integrateExt (ds1++ds2) baRes) mESig
integrateExt ds (bs',dif_sig,acc_sig,sens) eSig =
Result ds (bs',
dif_sig {extendedInfo = dif eSig (extendedInfo sig)},
acc_sig {extendedInfo = eSig},
sens)
-}
| 3,150
|
postAna ds1 in_sig i@(_, ExtSign acc_sig _, _) =
Result (ds1 ++ ds_sig) $ if null ds_sig then Just i else Nothing
where ds_sig = chkSorts ++ checkPreds ++ checkOps
diff_sig = diffSig diffCASL_DLSign acc_sig in_sig
chkSorts = Set.fold chSort [] (sortSet diff_sig) ++
[Diag Error
("\n new subsort relations with data " ++
"topsort are not allowed") nullRange
| Set.member dataS (supersortsOf thing acc_sig) ||
Set.member dataS (subsortsOf thing acc_sig) ||
supersortsOf dataS predefSign /=
supersortsOf dataS acc_sig ||
selectDATAKernel (sortRel predefSign)
/= selectDATAKernel (sortRel acc_sig)]
chSort s ds = ds ++
[mkDiag Error
("\n new sort is not a subsort of '" ++
showDoc thing "':") s
| not $ Set.member thing $ supersortsOf s acc_sig]
++ [mkDiag Error
("\n new sort must not be a supersort of '" ++
showDoc thing "':") s
| Set.member thing (subsortsOf s acc_sig)]
selectDATAKernel rel =
Rel.intransKernel $ Rel.restrict rel $
Set.insert dataS
(subsortsOf dataS predefSign)
checkPreds = MapSet.foldWithKey chPred [] (predMap diff_sig)
chPred p ty = (chArgs "pred" p (predArgs ty) ++)
checkOps = MapSet.foldWithKey chOp [] (opMap diff_sig)
chOp o ty = (chArgs "op" o (opArgs ty) ++)
chArgs kstr sym args =
case args of
[] -> if kstr == "op"
then []
else [mkDiag Error
"\n propositional symbols are not allowed" sym]
(s : _) ->
if s == thing ||
Set.member thing (supersortsOf s acc_sig)
then []
else [mkDiag Error
("\n the first argument sort of this " ++ kstr ++
" is not a subsort of '" ++ showDoc thing "':")
sym]
{- sketch of Annotation analysis:
where callAna bsRes =
case analyseAnnos ga acc_sig bs of
Result ds2 mESig ->
maybe (Result (ds1++ds2) Nothing)
(integrateExt (ds1++ds2) baRes) mESig
integrateExt ds (bs',dif_sig,acc_sig,sens) eSig =
Result ds (bs',
dif_sig {extendedInfo = dif eSig (extendedInfo sig)},
acc_sig {extendedInfo = eSig},
sens)
-}
| 2,785
| false
| true
| 9
| 20
| 1,346
| 697
| 347
| 350
| null | null |
cronburg/deckbuild
|
Examples/Base.hs
|
bsd-3-clause
|
-- The default game with the default set of cards described in the Dominion rulebook:
defaultBaseGame = defaultGame
{ supply = defaultSupply { piles = supply_init }
, doCardEffects = baseCardEffects
, endCndn = baseEndCndn
}
| 232
|
defaultBaseGame = defaultGame
{ supply = defaultSupply { piles = supply_init }
, doCardEffects = baseCardEffects
, endCndn = baseEndCndn
}
| 146
|
defaultBaseGame = defaultGame
{ supply = defaultSupply { piles = supply_init }
, doCardEffects = baseCardEffects
, endCndn = baseEndCndn
}
| 146
| true
| false
| 0
| 9
| 43
| 39
| 23
| 16
| null | null |
mumuki/mulang
|
src/Language/Mulang/Ast/Visitor.hs
|
gpl-3.0
|
extractSingleExpression (Class v1 v2 e) = Just (e, \e -> (Class v1 v2 e))
| 82
|
extractSingleExpression (Class v1 v2 e) = Just (e, \e -> (Class v1 v2 e))
| 82
|
extractSingleExpression (Class v1 v2 e) = Just (e, \e -> (Class v1 v2 e))
| 82
| false
| false
| 0
| 9
| 22
| 43
| 22
| 21
| null | null |
Gabriel439/Haskell-Dhall-Library
|
dhall/src/Dhall/Parser/Token.hs
|
bsd-3-clause
|
{-| Parse the @Integer/negate@ built-in
This corresponds to the @Integer-negate@ rule from the official grammar
-}
_IntegerNegate :: Parser ()
_IntegerNegate = builtin "Integer/negate"
| 189
|
_IntegerNegate :: Parser ()
_IntegerNegate = builtin "Integer/negate"
| 69
|
_IntegerNegate = builtin "Integer/negate"
| 41
| true
| true
| 1
| 6
| 28
| 23
| 10
| 13
| null | null |
ml9951/ghc
|
compiler/prelude/PrelNames.hs
|
bsd-3-clause
|
mkAppTyName = varQual tYPEABLE_INTERNAL (fsLit "mkAppTy") mkAppTyKey
| 85
|
mkAppTyName = varQual tYPEABLE_INTERNAL (fsLit "mkAppTy") mkAppTyKey
| 85
|
mkAppTyName = varQual tYPEABLE_INTERNAL (fsLit "mkAppTy") mkAppTyKey
| 85
| false
| false
| 0
| 7
| 23
| 19
| 9
| 10
| null | null |
typelead/epm
|
Cabal/Distribution/Simple/Program.hs
|
bsd-3-clause
|
findProgramOnPath :: String -> Verbosity -> IO (Maybe FilePath)
findProgramOnPath = flip findProgramLocation
| 108
|
findProgramOnPath :: String -> Verbosity -> IO (Maybe FilePath)
findProgramOnPath = flip findProgramLocation
| 108
|
findProgramOnPath = flip findProgramLocation
| 44
| false
| true
| 0
| 9
| 12
| 31
| 15
| 16
| null | null |
Tener/HaNS
|
src/Hans/Address.hs
|
bsd-3-clause
|
isBroadcast :: (Eq addr, Mask mask addr) => mask -> addr -> Bool
isBroadcast m a = broadcastAddress m == a
| 106
|
isBroadcast :: (Eq addr, Mask mask addr) => mask -> addr -> Bool
isBroadcast m a = broadcastAddress m == a
| 106
|
isBroadcast m a = broadcastAddress m == a
| 41
| false
| true
| 0
| 7
| 20
| 48
| 24
| 24
| null | null |
konn/pandoc-japanese-docx
|
src/Text/Pandoc/Readers/Docx/Parse.hs
|
gpl-2.0
|
relElemToRelationship _ = Nothing
| 33
|
relElemToRelationship _ = Nothing
| 33
|
relElemToRelationship _ = Nothing
| 33
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
cwbriones/mal-hs
|
src/Main.hs
|
mit
|
evalList list = mapM eval' list >>= apply
| 41
|
evalList list = mapM eval' list >>= apply
| 41
|
evalList list = mapM eval' list >>= apply
| 41
| false
| false
| 0
| 6
| 7
| 18
| 8
| 10
| null | null |
mettekou/ghc
|
compiler/typecheck/TcRnTypes.hs
|
bsd-3-clause
|
isCTyEqCan :: Ct -> Bool
isCTyEqCan (CTyEqCan {}) = True
| 57
|
isCTyEqCan :: Ct -> Bool
isCTyEqCan (CTyEqCan {}) = True
| 57
|
isCTyEqCan (CTyEqCan {}) = True
| 32
| false
| true
| 0
| 7
| 10
| 25
| 13
| 12
| null | null |
opentower/carnap
|
Carnap-GHCJS/src/Carnap/GHCJS/Action/TruthTable.hs
|
gpl-3.0
|
initTable :: Document -> IO (Element, Element, Element)
initTable w = do (Just table) <- createElement w (Just "table")
(Just thead) <- createElement w (Just "thead")
(Just tbody) <- createElement w (Just "tbody")
appendChild table (Just thead)
appendChild table (Just tbody)
return (table, thead, tbody)
| 389
|
initTable :: Document -> IO (Element, Element, Element)
initTable w = do (Just table) <- createElement w (Just "table")
(Just thead) <- createElement w (Just "thead")
(Just tbody) <- createElement w (Just "tbody")
appendChild table (Just thead)
appendChild table (Just tbody)
return (table, thead, tbody)
| 389
|
initTable w = do (Just table) <- createElement w (Just "table")
(Just thead) <- createElement w (Just "thead")
(Just tbody) <- createElement w (Just "tbody")
appendChild table (Just thead)
appendChild table (Just tbody)
return (table, thead, tbody)
| 333
| false
| true
| 0
| 11
| 129
| 149
| 70
| 79
| null | null |
seckcoder/vector
|
Data/Vector.hs
|
bsd-3-clause
|
filterM = G.filterM
| 19
|
filterM = G.filterM
| 19
|
filterM = G.filterM
| 19
| false
| false
| 1
| 6
| 2
| 12
| 4
| 8
| null | null |
nlim/portfolio-quote
|
src/QuoteLookup.hs
|
mit
|
quoteValue = metric (\q (n,p) -> n * (price q))
| 53
|
quoteValue = metric (\q (n,p) -> n * (price q))
| 53
|
quoteValue = metric (\q (n,p) -> n * (price q))
| 53
| false
| false
| 0
| 10
| 15
| 35
| 19
| 16
| null | null |
oldmanmike/ghc
|
compiler/cmm/CLabel.hs
|
bsd-3-clause
|
ppIdFlavor :: IdLabelInfo -> SDoc
ppIdFlavor x = pp_cSEP <>
(case x of
Closure -> text "closure"
SRT -> text "srt"
InfoTable -> text "info"
LocalInfoTable -> text "info"
Entry -> text "entry"
LocalEntry -> text "entry"
Slow -> text "slow"
RednCounts -> text "ct"
ConEntry -> text "con_entry"
ConInfoTable -> text "con_info"
StaticConEntry -> text "static_entry"
StaticInfoTable -> text "static_info"
ClosureTable -> text "closure_tbl"
)
| 857
|
ppIdFlavor :: IdLabelInfo -> SDoc
ppIdFlavor x = pp_cSEP <>
(case x of
Closure -> text "closure"
SRT -> text "srt"
InfoTable -> text "info"
LocalInfoTable -> text "info"
Entry -> text "entry"
LocalEntry -> text "entry"
Slow -> text "slow"
RednCounts -> text "ct"
ConEntry -> text "con_entry"
ConInfoTable -> text "con_info"
StaticConEntry -> text "static_entry"
StaticInfoTable -> text "static_info"
ClosureTable -> text "closure_tbl"
)
| 857
|
ppIdFlavor x = pp_cSEP <>
(case x of
Closure -> text "closure"
SRT -> text "srt"
InfoTable -> text "info"
LocalInfoTable -> text "info"
Entry -> text "entry"
LocalEntry -> text "entry"
Slow -> text "slow"
RednCounts -> text "ct"
ConEntry -> text "con_entry"
ConInfoTable -> text "con_info"
StaticConEntry -> text "static_entry"
StaticInfoTable -> text "static_info"
ClosureTable -> text "closure_tbl"
)
| 823
| false
| true
| 0
| 10
| 486
| 146
| 67
| 79
| null | null |
acowley/ghc
|
compiler/typecheck/TcTypeNats.hs
|
bsd-3-clause
|
interactInertMul :: [Xi] -> Xi -> [Xi] -> Xi -> [Pair Type]
interactInertMul [x1,y1] z1 [x2,y2] z2
| sameZ && known (/= 0) x1 && tcEqType x1 x2 = [ y1 === y2 ]
| sameZ && known (/= 0) y1 && tcEqType y1 y2 = [ x1 === x2 ]
where sameZ = tcEqType z1 z2
| 257
|
interactInertMul :: [Xi] -> Xi -> [Xi] -> Xi -> [Pair Type]
interactInertMul [x1,y1] z1 [x2,y2] z2
| sameZ && known (/= 0) x1 && tcEqType x1 x2 = [ y1 === y2 ]
| sameZ && known (/= 0) y1 && tcEqType y1 y2 = [ x1 === x2 ]
where sameZ = tcEqType z1 z2
| 257
|
interactInertMul [x1,y1] z1 [x2,y2] z2
| sameZ && known (/= 0) x1 && tcEqType x1 x2 = [ y1 === y2 ]
| sameZ && known (/= 0) y1 && tcEqType y1 y2 = [ x1 === x2 ]
where sameZ = tcEqType z1 z2
| 197
| false
| true
| 0
| 11
| 64
| 148
| 76
| 72
| null | null |
green-haskell/ghc
|
libraries/base/Data/OldList.hs
|
bsd-3-clause
|
stripPrefix (x:xs) (y:ys)
| x == y = stripPrefix xs ys
| 55
|
stripPrefix (x:xs) (y:ys)
| x == y = stripPrefix xs ys
| 55
|
stripPrefix (x:xs) (y:ys)
| x == y = stripPrefix xs ys
| 55
| false
| false
| 0
| 8
| 11
| 40
| 19
| 21
| null | null |
mightybyte/reflex-dom-stubs
|
src/GHCJS/DOM/Node.hs
|
bsd-3-clause
|
ghcjs_dom_node_dispatch_event = undefined
| 41
|
ghcjs_dom_node_dispatch_event = undefined
| 41
|
ghcjs_dom_node_dispatch_event = undefined
| 41
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
mskmysht/ProjectEuler
|
src/Problem11.hs
|
bsd-3-clause
|
size = 4 :: Int
| 15
|
size = 4 :: Int
| 15
|
size = 4 :: Int
| 15
| false
| false
| 0
| 4
| 4
| 9
| 5
| 4
| null | null |
ghc-android/ghc
|
testsuite/tests/ghci/should_run/ghcirun004.hs
|
bsd-3-clause
|
3552 = 3551
| 11
|
3552 = 3551
| 11
|
3552 = 3551
| 11
| false
| false
| 1
| 5
| 2
| 10
| 3
| 7
| null | null |
ssaavedra/liquidhaskell
|
benchmarks/llrbtree-0.1.1/Data/Set/RBTree0.hs
|
bsd-3-clause
|
unbalancedR :: Color -> BlackHeight -> RBTree a -> a -> RBTree a -> (RBTree a, Bool)
-- Decreasing one Black node in the right
unbalancedR c h l x r@(Node B _ _ _ _)
= (balanceR B h l x (turnR r), c == B)
| 206
|
unbalancedR :: Color -> BlackHeight -> RBTree a -> a -> RBTree a -> (RBTree a, Bool)
unbalancedR c h l x r@(Node B _ _ _ _)
= (balanceR B h l x (turnR r), c == B)
| 164
|
unbalancedR c h l x r@(Node B _ _ _ _)
= (balanceR B h l x (turnR r), c == B)
| 79
| true
| true
| 0
| 11
| 48
| 102
| 52
| 50
| null | null |
sergv/vector
|
Data/Vector/Generic.hs
|
bsd-3-clause
|
iscanr f z v =
unstreamR
. inplace (S.scanl (flip $ uncurry f) z . S.indexedR n) (+1)
. streamR
$ v
where n = length v
-- | /O(n)/ Right-to-left scan over a vector (strictly) with its index
| 201
|
iscanr f z v =
unstreamR
. inplace (S.scanl (flip $ uncurry f) z . S.indexedR n) (+1)
. streamR
$ v
where n = length v
-- | /O(n)/ Right-to-left scan over a vector (strictly) with its index
| 201
|
iscanr f z v =
unstreamR
. inplace (S.scanl (flip $ uncurry f) z . S.indexedR n) (+1)
. streamR
$ v
where n = length v
-- | /O(n)/ Right-to-left scan over a vector (strictly) with its index
| 201
| false
| false
| 6
| 11
| 50
| 88
| 37
| 51
| null | null |
phylake/avm3
|
vm/execute.hs
|
mit
|
jump :: Abc.S24 -> (A_Ops, B_Ops) -> (A_Ops, B_Ops)
jump s24 tuple
| s24 > 0 = pos_jump s24 tuple
| s24 < 0 = neg_jump (negate s24) tuple
| otherwise = tuple
| 163
|
jump :: Abc.S24 -> (A_Ops, B_Ops) -> (A_Ops, B_Ops)
jump s24 tuple
| s24 > 0 = pos_jump s24 tuple
| s24 < 0 = neg_jump (negate s24) tuple
| otherwise = tuple
| 163
|
jump s24 tuple
| s24 > 0 = pos_jump s24 tuple
| s24 < 0 = neg_jump (negate s24) tuple
| otherwise = tuple
| 111
| false
| true
| 2
| 8
| 38
| 85
| 42
| 43
| null | null |
kolmodin/cabal
|
cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs
|
bsd-3-clause
|
--------------------------------------------
-- Round trip: printing and parsing config
--
roundtrip_printparse :: ProjectConfig -> Bool
roundtrip_printparse config =
case (fmap convertLegacyProjectConfig
. parseLegacyProjectConfig
. showLegacyProjectConfig
. convertToLegacyProjectConfig)
config of
ParseOk _ x -> x == config
_ -> False
| 398
|
roundtrip_printparse :: ProjectConfig -> Bool
roundtrip_printparse config =
case (fmap convertLegacyProjectConfig
. parseLegacyProjectConfig
. showLegacyProjectConfig
. convertToLegacyProjectConfig)
config of
ParseOk _ x -> x == config
_ -> False
| 306
|
roundtrip_printparse config =
case (fmap convertLegacyProjectConfig
. parseLegacyProjectConfig
. showLegacyProjectConfig
. convertToLegacyProjectConfig)
config of
ParseOk _ x -> x == config
_ -> False
| 260
| true
| true
| 0
| 11
| 98
| 67
| 34
| 33
| null | null |
amccausl/Swish
|
Swish/HaskellRDF/RDFGraphTest.hs
|
lgpl-2.1
|
testGraphTranslate04a = testGraphEq "gt2f1a-gt2f1b" True gt2f1a gt2f1b
| 70
|
testGraphTranslate04a = testGraphEq "gt2f1a-gt2f1b" True gt2f1a gt2f1b
| 70
|
testGraphTranslate04a = testGraphEq "gt2f1a-gt2f1b" True gt2f1a gt2f1b
| 70
| false
| false
| 0
| 5
| 6
| 15
| 7
| 8
| null | null |
codemac/yi-editor
|
src/Yi/Keymap/Keys.hs
|
gpl-2.0
|
-- | @optMod f ev@ produces a 'MonadInteract' that consumes @ev@ or @f ev@
optMod ::(MonadInteract m w Event) => (Event -> Event) -> Event -> m Event
optMod f ev = oneOf [ev, f ev]
| 180
|
optMod ::(MonadInteract m w Event) => (Event -> Event) -> Event -> m Event
optMod f ev = oneOf [ev, f ev]
| 105
|
optMod f ev = oneOf [ev, f ev]
| 30
| true
| true
| 0
| 8
| 35
| 64
| 32
| 32
| null | null |
DavidAlphaFox/ghc
|
libraries/base/Control/Exception/Base.hs
|
bsd-3-clause
|
-- GHC's RTS calls this
nonTermination :: SomeException
nonTermination = toException NonTermination
| 99
|
nonTermination :: SomeException
nonTermination = toException NonTermination
| 75
|
nonTermination = toException NonTermination
| 43
| true
| true
| 0
| 6
| 11
| 22
| 9
| 13
| null | null |
zohl/postgresql-simple-bind
|
src/Database/PostgreSQL/Simple/Bind/Parser.hs
|
bsd-3-clause
|
pgFunctionProperty :: Parser ()
pgFunctionProperty =
language *> pure ()
<|> loadableObject *> pure ()
<|> definition *> pure ()
<|> window *> pure ()
<|> behaviour *> pure ()
<|> leakproof *> pure ()
<|> strictness *> pure ()
<|> security *> pure ()
<|> parallel *> pure ()
<|> cost *> pure ()
<|> rows *> pure ()
<|> transform *> pure ()
<|> set *> pure ()
where
language = asciiCI "language" *> ss *> (pgNormalIdentifier <|> (char '\'' *> pgQuotedString '\''))
loadableObject = asciiCI "as" *> ss *> pgString *> ss *> char ',' *> ss *> pgString
definition = asciiCI "as" *> ss *> pgString
window = asciiCI "window"
behaviour = asciiCI "immutable" <|> asciiCI "stable" <|> asciiCI "volatile"
leakproof = ((asciiCI "not" *> ss *> pure ()) <|> pure ()) *> asciiCI "leakproof"
strictness = asciiCIs ["called", "on", "null", "input"] *> pure ()
<|> asciiCIs ["returns", "null", "on", "null", "input"] *> pure ()
<|> asciiCI "strict" *> pure ()
security = ((asciiCI "external" *> ss *> pure ()) <|> pure ())
*> asciiCI "security" *> ss *> (asciiCI "invoker" <|> asciiCI "definer")
parallel = asciiCI "parallel" *> ss *> (asciiCI "unsafe" <|> asciiCI "restricted" <|> asciiCI "safe")
cost = asciiCI "cost" *> ss *> (decimal :: Parser Int)
rows = asciiCI "rows" *> ss *> (decimal :: Parser Int)
transform = asciiCI "transform" *> ((ss *> asciiCIs ["for", "type"] *> ss *> optionallyQualified pgExactType) `sepBy` (char ','))
set = asciiCI "set" *> ss *> pgNormalIdentifier *> ss *> (
(asciiCI "to" *> ss *> value *> pure ())
<|> (string "=" *> ss *> value *> pure ())
<|> (asciiCIs ["from", "current"] *> ss *> pure ()))
where
value = (withSpaces value') `sepBy` (char ',')
value' = pgQualifiedIdentifier *> pure ()
<|> pgString *> pure ()
<|> (decimal :: Parser Int) *> pure ()
-- | Parser for an obsolete function property (WITH clause).
| 2,281
|
pgFunctionProperty :: Parser ()
pgFunctionProperty =
language *> pure ()
<|> loadableObject *> pure ()
<|> definition *> pure ()
<|> window *> pure ()
<|> behaviour *> pure ()
<|> leakproof *> pure ()
<|> strictness *> pure ()
<|> security *> pure ()
<|> parallel *> pure ()
<|> cost *> pure ()
<|> rows *> pure ()
<|> transform *> pure ()
<|> set *> pure ()
where
language = asciiCI "language" *> ss *> (pgNormalIdentifier <|> (char '\'' *> pgQuotedString '\''))
loadableObject = asciiCI "as" *> ss *> pgString *> ss *> char ',' *> ss *> pgString
definition = asciiCI "as" *> ss *> pgString
window = asciiCI "window"
behaviour = asciiCI "immutable" <|> asciiCI "stable" <|> asciiCI "volatile"
leakproof = ((asciiCI "not" *> ss *> pure ()) <|> pure ()) *> asciiCI "leakproof"
strictness = asciiCIs ["called", "on", "null", "input"] *> pure ()
<|> asciiCIs ["returns", "null", "on", "null", "input"] *> pure ()
<|> asciiCI "strict" *> pure ()
security = ((asciiCI "external" *> ss *> pure ()) <|> pure ())
*> asciiCI "security" *> ss *> (asciiCI "invoker" <|> asciiCI "definer")
parallel = asciiCI "parallel" *> ss *> (asciiCI "unsafe" <|> asciiCI "restricted" <|> asciiCI "safe")
cost = asciiCI "cost" *> ss *> (decimal :: Parser Int)
rows = asciiCI "rows" *> ss *> (decimal :: Parser Int)
transform = asciiCI "transform" *> ((ss *> asciiCIs ["for", "type"] *> ss *> optionallyQualified pgExactType) `sepBy` (char ','))
set = asciiCI "set" *> ss *> pgNormalIdentifier *> ss *> (
(asciiCI "to" *> ss *> value *> pure ())
<|> (string "=" *> ss *> value *> pure ())
<|> (asciiCIs ["from", "current"] *> ss *> pure ()))
where
value = (withSpaces value') `sepBy` (char ',')
value' = pgQualifiedIdentifier *> pure ()
<|> pgString *> pure ()
<|> (decimal :: Parser Int) *> pure ()
-- | Parser for an obsolete function property (WITH clause).
| 2,281
|
pgFunctionProperty =
language *> pure ()
<|> loadableObject *> pure ()
<|> definition *> pure ()
<|> window *> pure ()
<|> behaviour *> pure ()
<|> leakproof *> pure ()
<|> strictness *> pure ()
<|> security *> pure ()
<|> parallel *> pure ()
<|> cost *> pure ()
<|> rows *> pure ()
<|> transform *> pure ()
<|> set *> pure ()
where
language = asciiCI "language" *> ss *> (pgNormalIdentifier <|> (char '\'' *> pgQuotedString '\''))
loadableObject = asciiCI "as" *> ss *> pgString *> ss *> char ',' *> ss *> pgString
definition = asciiCI "as" *> ss *> pgString
window = asciiCI "window"
behaviour = asciiCI "immutable" <|> asciiCI "stable" <|> asciiCI "volatile"
leakproof = ((asciiCI "not" *> ss *> pure ()) <|> pure ()) *> asciiCI "leakproof"
strictness = asciiCIs ["called", "on", "null", "input"] *> pure ()
<|> asciiCIs ["returns", "null", "on", "null", "input"] *> pure ()
<|> asciiCI "strict" *> pure ()
security = ((asciiCI "external" *> ss *> pure ()) <|> pure ())
*> asciiCI "security" *> ss *> (asciiCI "invoker" <|> asciiCI "definer")
parallel = asciiCI "parallel" *> ss *> (asciiCI "unsafe" <|> asciiCI "restricted" <|> asciiCI "safe")
cost = asciiCI "cost" *> ss *> (decimal :: Parser Int)
rows = asciiCI "rows" *> ss *> (decimal :: Parser Int)
transform = asciiCI "transform" *> ((ss *> asciiCIs ["for", "type"] *> ss *> optionallyQualified pgExactType) `sepBy` (char ','))
set = asciiCI "set" *> ss *> pgNormalIdentifier *> ss *> (
(asciiCI "to" *> ss *> value *> pure ())
<|> (string "=" *> ss *> value *> pure ())
<|> (asciiCIs ["from", "current"] *> ss *> pure ()))
where
value = (withSpaces value') `sepBy` (char ',')
value' = pgQualifiedIdentifier *> pure ()
<|> pgString *> pure ()
<|> (decimal :: Parser Int) *> pure ()
-- | Parser for an obsolete function property (WITH clause).
| 2,249
| false
| true
| 48
| 41
| 766
| 851
| 422
| 429
| null | null |
facebookincubator/duckling
|
Duckling/PhoneNumber/AR/Corpus.hs
|
bsd-3-clause
|
corpus :: Corpus
corpus =
(testContext { locale = makeLocale AR Nothing }, testOptions, allExamples)
| 102
|
corpus :: Corpus
corpus =
(testContext { locale = makeLocale AR Nothing }, testOptions, allExamples)
| 102
|
corpus =
(testContext { locale = makeLocale AR Nothing }, testOptions, allExamples)
| 85
| false
| true
| 0
| 9
| 16
| 40
| 20
| 20
| null | null |
bgamari/minir
|
MinIR/OrderedIndex.hs
|
bsd-3-clause
|
fromTerms :: (Hashable doc, Hashable term, Eq term, Ord doc)
=> Int -> doc -> [term] -> OrderedIndex doc term
fromTerms n doc terms = foldMap' (fromNGram doc . V.fromList) $ ngrams n terms
| 198
|
fromTerms :: (Hashable doc, Hashable term, Eq term, Ord doc)
=> Int -> doc -> [term] -> OrderedIndex doc term
fromTerms n doc terms = foldMap' (fromNGram doc . V.fromList) $ ngrams n terms
| 198
|
fromTerms n doc terms = foldMap' (fromNGram doc . V.fromList) $ ngrams n terms
| 78
| false
| true
| 0
| 9
| 43
| 89
| 44
| 45
| null | null |
tphyahoo/haskoin
|
haskoin-core/tests/Network/Haskoin/Crypto/ExtendedKeys/Tests.hs
|
unlicense
|
testReadShowPrvKey :: ArbitraryXPrvKey -> Bool
testReadShowPrvKey (ArbitraryXPrvKey k) = read (show k) == k
| 107
|
testReadShowPrvKey :: ArbitraryXPrvKey -> Bool
testReadShowPrvKey (ArbitraryXPrvKey k) = read (show k) == k
| 107
|
testReadShowPrvKey (ArbitraryXPrvKey k) = read (show k) == k
| 60
| false
| true
| 0
| 8
| 13
| 37
| 18
| 19
| null | null |
PaulGustafson/stringnet
|
LocalMoves.hs
|
mit
|
Morphism :: Object -> Object -> Morphism -> Morphism
zMorphism xl yl m =
((idMorphism xl) `tensorM` (rho yl))
<> ((idMorphism xl) `tensorM` ((idMorphism yl) `tensorM` (ev $ star xl))) -- X (Y 1)
<> ((idMorphism xl) `tensorM` (alpha yl xl (star xl))) -- X (Y (X *X))
<> ((idMorphism xl) `tensorM` (m `tensorM` (idMorphism $ star xl))) -- X 1 *X -> X ((Y X) *X)
<> ((pivotalJI xl) `tensorM` (lambdaI $ star xl)) -- **X *X -> X (1 *X)
<> (coev $ star xl)
| 471
|
zMorphism :: Object -> Object -> Morphism -> Morphism
zMorphism xl yl m =
((idMorphism xl) `tensorM` (rho yl))
<> ((idMorphism xl) `tensorM` ((idMorphism yl) `tensorM` (ev $ star xl))) -- X (Y 1)
<> ((idMorphism xl) `tensorM` (alpha yl xl (star xl))) -- X (Y (X *X))
<> ((idMorphism xl) `tensorM` (m `tensorM` (idMorphism $ star xl))) -- X 1 *X -> X ((Y X) *X)
<> ((pivotalJI xl) `tensorM` (lambdaI $ star xl)) -- **X *X -> X (1 *X)
<> (coev $ star xl)
| 471
|
zMorphism xl yl m =
((idMorphism xl) `tensorM` (rho yl))
<> ((idMorphism xl) `tensorM` ((idMorphism yl) `tensorM` (ev $ star xl))) -- X (Y 1)
<> ((idMorphism xl) `tensorM` (alpha yl xl (star xl))) -- X (Y (X *X))
<> ((idMorphism xl) `tensorM` (m `tensorM` (idMorphism $ star xl))) -- X 1 *X -> X ((Y X) *X)
<> ((pivotalJI xl) `tensorM` (lambdaI $ star xl)) -- **X *X -> X (1 *X)
<> (coev $ star xl)
| 417
| false
| true
| 10
| 11
| 106
| 222
| 120
| 102
| null | null |
mrkkrp/stack
|
src/Stack/Ghci.hs
|
bsd-3-clause
|
checkForIssues :: (MonadThrow m, MonadLogger m) => [GhciPkgInfo] -> m ()
checkForIssues pkgs = do
unless (null issues) $ borderedWarning $ do
$logWarn "Warning: There are cabal settings for this project which may prevent GHCi from loading your code properly."
$logWarn "In some cases it can also load some projects which would otherwise fail to build."
$logWarn ""
mapM_ $logWarn $ intercalate [""] issues
$logWarn ""
$logWarn "To resolve, remove the flag(s) from the cabal file(s) and instead put them at the top of the haskell files."
$logWarn ""
$logWarn "It isn't yet possible to load multiple packages into GHCi in all cases - see"
$logWarn "https://ghc.haskell.org/trac/ghc/ticket/10827"
where
issues = concat
[ mixedFlag "-XNoImplicitPrelude"
[ "-XNoImplicitPrelude will be used, but GHCi will likely fail to build things which depend on the implicit prelude." ]
, mixedFlag "-XCPP"
[ "-XCPP will be used, but it can cause issues with multiline strings."
, "See https://downloads.haskell.org/~ghc/7.10.2/docs/html/users_guide/options-phases.html#cpp-string-gaps"
]
, mixedFlag "-XNoTraditionalRecordSyntax"
[ "-XNoTraditionalRecordSyntax will be used, but it break modules which use record syntax." ]
, mixedFlag "-XTemplateHaskell"
[ "-XTemplateHaskell will be used, but it may cause compilation issues due to different parsing of '$' when there's no space after it." ]
, mixedFlag "-XQuasiQuotes"
[ "-XQuasiQuotes will be used, but it may cause parse failures due to a different meaning for list comprehension syntax like [x| ... ]" ]
, mixedFlag "-XSafe"
[ "-XSafe will be used, but it will fail to compile unsafe modules." ]
, mixedFlag "-XArrows"
[ "-XArrows will be used, but it will cause non-arrow usages of proc, (-<), (-<<) to fail" ]
, mixedFlag "-XOverloadedStrings"
[ "-XOverloadedStrings will be used, but it can cause type ambiguity in code not usually compiled with it." ]
, mixedFlag "-XOverloadedLists"
[ "-XOverloadedLists will be used, but it can cause type ambiguity in code not usually compiled with it." ]
, mixedFlag "-XMonoLocalBinds"
[ "-XMonoLocalBinds will be used, but it can cause type errors in code which expects generalized local bindings." ]
, mixedFlag "-XTypeFamilies"
[ "-XTypeFamilies will be used, but it implies -XMonoLocalBinds, and so can cause type errors in code which expects generalized local bindings." ]
, mixedFlag "-XGADTs"
[ "-XGADTs will be used, but it implies -XMonoLocalBinds, and so can cause type errors in code which expects generalized local bindings." ]
, mixedFlag "-XNewQualifiedOperators"
[ "-XNewQualifiedOperators will be used, but this will break usages of the old qualified operator syntax." ]
]
mixedFlag flag msgs =
let x = partitionComps (== flag) in
[ msgs ++ showWhich x | mixedSettings x ]
mixedSettings (xs, ys) = xs /= [] && ys /= []
showWhich (haveIt, don'tHaveIt) =
[ "It is specified for:"
, " " <> renderPkgComponents haveIt
, "But not for: "
, " " <> renderPkgComponents don'tHaveIt
]
partitionComps f = (map fst xs, map fst ys)
where
(xs, ys) = partition (any f . snd) compsWithOpts
compsWithOpts = map (\(k, bio) -> (k, bioOneWordOpts bio ++ bioOpts bio)) compsWithBios
compsWithBios =
[ ((ghciPkgName pkg, c), bio)
| pkg <- pkgs
, (c, bio) <- ghciPkgOpts pkg
]
| 3,726
|
checkForIssues :: (MonadThrow m, MonadLogger m) => [GhciPkgInfo] -> m ()
checkForIssues pkgs = do
unless (null issues) $ borderedWarning $ do
$logWarn "Warning: There are cabal settings for this project which may prevent GHCi from loading your code properly."
$logWarn "In some cases it can also load some projects which would otherwise fail to build."
$logWarn ""
mapM_ $logWarn $ intercalate [""] issues
$logWarn ""
$logWarn "To resolve, remove the flag(s) from the cabal file(s) and instead put them at the top of the haskell files."
$logWarn ""
$logWarn "It isn't yet possible to load multiple packages into GHCi in all cases - see"
$logWarn "https://ghc.haskell.org/trac/ghc/ticket/10827"
where
issues = concat
[ mixedFlag "-XNoImplicitPrelude"
[ "-XNoImplicitPrelude will be used, but GHCi will likely fail to build things which depend on the implicit prelude." ]
, mixedFlag "-XCPP"
[ "-XCPP will be used, but it can cause issues with multiline strings."
, "See https://downloads.haskell.org/~ghc/7.10.2/docs/html/users_guide/options-phases.html#cpp-string-gaps"
]
, mixedFlag "-XNoTraditionalRecordSyntax"
[ "-XNoTraditionalRecordSyntax will be used, but it break modules which use record syntax." ]
, mixedFlag "-XTemplateHaskell"
[ "-XTemplateHaskell will be used, but it may cause compilation issues due to different parsing of '$' when there's no space after it." ]
, mixedFlag "-XQuasiQuotes"
[ "-XQuasiQuotes will be used, but it may cause parse failures due to a different meaning for list comprehension syntax like [x| ... ]" ]
, mixedFlag "-XSafe"
[ "-XSafe will be used, but it will fail to compile unsafe modules." ]
, mixedFlag "-XArrows"
[ "-XArrows will be used, but it will cause non-arrow usages of proc, (-<), (-<<) to fail" ]
, mixedFlag "-XOverloadedStrings"
[ "-XOverloadedStrings will be used, but it can cause type ambiguity in code not usually compiled with it." ]
, mixedFlag "-XOverloadedLists"
[ "-XOverloadedLists will be used, but it can cause type ambiguity in code not usually compiled with it." ]
, mixedFlag "-XMonoLocalBinds"
[ "-XMonoLocalBinds will be used, but it can cause type errors in code which expects generalized local bindings." ]
, mixedFlag "-XTypeFamilies"
[ "-XTypeFamilies will be used, but it implies -XMonoLocalBinds, and so can cause type errors in code which expects generalized local bindings." ]
, mixedFlag "-XGADTs"
[ "-XGADTs will be used, but it implies -XMonoLocalBinds, and so can cause type errors in code which expects generalized local bindings." ]
, mixedFlag "-XNewQualifiedOperators"
[ "-XNewQualifiedOperators will be used, but this will break usages of the old qualified operator syntax." ]
]
mixedFlag flag msgs =
let x = partitionComps (== flag) in
[ msgs ++ showWhich x | mixedSettings x ]
mixedSettings (xs, ys) = xs /= [] && ys /= []
showWhich (haveIt, don'tHaveIt) =
[ "It is specified for:"
, " " <> renderPkgComponents haveIt
, "But not for: "
, " " <> renderPkgComponents don'tHaveIt
]
partitionComps f = (map fst xs, map fst ys)
where
(xs, ys) = partition (any f . snd) compsWithOpts
compsWithOpts = map (\(k, bio) -> (k, bioOneWordOpts bio ++ bioOpts bio)) compsWithBios
compsWithBios =
[ ((ghciPkgName pkg, c), bio)
| pkg <- pkgs
, (c, bio) <- ghciPkgOpts pkg
]
| 3,726
|
checkForIssues pkgs = do
unless (null issues) $ borderedWarning $ do
$logWarn "Warning: There are cabal settings for this project which may prevent GHCi from loading your code properly."
$logWarn "In some cases it can also load some projects which would otherwise fail to build."
$logWarn ""
mapM_ $logWarn $ intercalate [""] issues
$logWarn ""
$logWarn "To resolve, remove the flag(s) from the cabal file(s) and instead put them at the top of the haskell files."
$logWarn ""
$logWarn "It isn't yet possible to load multiple packages into GHCi in all cases - see"
$logWarn "https://ghc.haskell.org/trac/ghc/ticket/10827"
where
issues = concat
[ mixedFlag "-XNoImplicitPrelude"
[ "-XNoImplicitPrelude will be used, but GHCi will likely fail to build things which depend on the implicit prelude." ]
, mixedFlag "-XCPP"
[ "-XCPP will be used, but it can cause issues with multiline strings."
, "See https://downloads.haskell.org/~ghc/7.10.2/docs/html/users_guide/options-phases.html#cpp-string-gaps"
]
, mixedFlag "-XNoTraditionalRecordSyntax"
[ "-XNoTraditionalRecordSyntax will be used, but it break modules which use record syntax." ]
, mixedFlag "-XTemplateHaskell"
[ "-XTemplateHaskell will be used, but it may cause compilation issues due to different parsing of '$' when there's no space after it." ]
, mixedFlag "-XQuasiQuotes"
[ "-XQuasiQuotes will be used, but it may cause parse failures due to a different meaning for list comprehension syntax like [x| ... ]" ]
, mixedFlag "-XSafe"
[ "-XSafe will be used, but it will fail to compile unsafe modules." ]
, mixedFlag "-XArrows"
[ "-XArrows will be used, but it will cause non-arrow usages of proc, (-<), (-<<) to fail" ]
, mixedFlag "-XOverloadedStrings"
[ "-XOverloadedStrings will be used, but it can cause type ambiguity in code not usually compiled with it." ]
, mixedFlag "-XOverloadedLists"
[ "-XOverloadedLists will be used, but it can cause type ambiguity in code not usually compiled with it." ]
, mixedFlag "-XMonoLocalBinds"
[ "-XMonoLocalBinds will be used, but it can cause type errors in code which expects generalized local bindings." ]
, mixedFlag "-XTypeFamilies"
[ "-XTypeFamilies will be used, but it implies -XMonoLocalBinds, and so can cause type errors in code which expects generalized local bindings." ]
, mixedFlag "-XGADTs"
[ "-XGADTs will be used, but it implies -XMonoLocalBinds, and so can cause type errors in code which expects generalized local bindings." ]
, mixedFlag "-XNewQualifiedOperators"
[ "-XNewQualifiedOperators will be used, but this will break usages of the old qualified operator syntax." ]
]
mixedFlag flag msgs =
let x = partitionComps (== flag) in
[ msgs ++ showWhich x | mixedSettings x ]
mixedSettings (xs, ys) = xs /= [] && ys /= []
showWhich (haveIt, don'tHaveIt) =
[ "It is specified for:"
, " " <> renderPkgComponents haveIt
, "But not for: "
, " " <> renderPkgComponents don'tHaveIt
]
partitionComps f = (map fst xs, map fst ys)
where
(xs, ys) = partition (any f . snd) compsWithOpts
compsWithOpts = map (\(k, bio) -> (k, bioOneWordOpts bio ++ bioOpts bio)) compsWithBios
compsWithBios =
[ ((ghciPkgName pkg, c), bio)
| pkg <- pkgs
, (c, bio) <- ghciPkgOpts pkg
]
| 3,653
| false
| true
| 3
| 12
| 986
| 567
| 276
| 291
| null | null |
lennart/Tidal
|
Sound/Tidal/Parse.hs
|
gpl-3.0
|
natural = P.natural lexer
| 25
|
natural = P.natural lexer
| 25
|
natural = P.natural lexer
| 25
| false
| false
| 1
| 6
| 3
| 14
| 5
| 9
| null | null |
ssaavedra/liquidhaskell
|
tests/pos/Permutation.hs
|
bsd-3-clause
|
{-@ perms :: ts:[a] -> is:[a] -> [[a]] / [((len ts)+(len is)), 0, (len ts)] @-}
perms :: [a] -> [a] -> [[a]]
perms [] _ = []
| 129
|
perms :: [a] -> [a] -> [[a]]
perms [] _ = []
| 49
|
perms [] _ = []
| 20
| true
| true
| 0
| 10
| 32
| 47
| 24
| 23
| null | null |
ytakano/tsukuyomi
|
tests/typeinfer/SmallML.hs
|
bsd-3-clause
|
parserTop = do
Parsec.spaces
expr <- parseExpr
Parsec.spaces
Parsec.eof
return expr
| 103
|
parserTop = do
Parsec.spaces
expr <- parseExpr
Parsec.spaces
Parsec.eof
return expr
| 103
|
parserTop = do
Parsec.spaces
expr <- parseExpr
Parsec.spaces
Parsec.eof
return expr
| 103
| false
| false
| 0
| 7
| 30
| 34
| 14
| 20
| null | null |
ghcjs/jsaddle-dom
|
src/JSDOM/Generated/Window.hs
|
mit
|
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Window.top Mozilla Window.top documentation>
getTop :: (MonadDOM m) => Window -> m (Maybe Window)
getTop self = liftDOM ((self ^. js "top") >>= fromJSVal)
| 210
|
getTop :: (MonadDOM m) => Window -> m (Maybe Window)
getTop self = liftDOM ((self ^. js "top") >>= fromJSVal)
| 109
|
getTop self = liftDOM ((self ^. js "top") >>= fromJSVal)
| 56
| true
| true
| 0
| 10
| 26
| 57
| 29
| 28
| null | null |
acfoltzer/bit-vector
|
test/Data/Vector/Bit/Tests.hs
|
bsd-3-clause
|
prop_testZero :: NonNegative Int -> Bool
prop_testZero nn = testBit (zeroBits :: BitVector) n == False
where n = getNonNegative nn
| 132
|
prop_testZero :: NonNegative Int -> Bool
prop_testZero nn = testBit (zeroBits :: BitVector) n == False
where n = getNonNegative nn
| 132
|
prop_testZero nn = testBit (zeroBits :: BitVector) n == False
where n = getNonNegative nn
| 91
| false
| true
| 0
| 7
| 22
| 47
| 23
| 24
| null | null |
ezyang/ghc
|
compiler/coreSyn/CoreStats.hs
|
bsd-3-clause
|
exprStats (Tick _ e) = exprStats e
| 39
|
exprStats (Tick _ e) = exprStats e
| 39
|
exprStats (Tick _ e) = exprStats e
| 39
| false
| false
| 0
| 7
| 11
| 20
| 9
| 11
| null | null |
goshakkk/lisley
|
src/Lisley/Builtins.hs
|
mit
|
vector :: SimpleFn
vector = return . Vector
| 43
|
vector :: SimpleFn
vector = return . Vector
| 43
|
vector = return . Vector
| 24
| false
| true
| 1
| 6
| 7
| 23
| 9
| 14
| null | null |
urbanslug/ghc
|
testsuite/tests/dph/nbody/Util.hs
|
bsd-3-clause
|
-- | Multiply a vector by a scalar.
mulSV :: Double -> (Double, Double) -> (Double, Double)
mulSV s (x, y) = (s * x, s * y)
| 124
|
mulSV :: Double -> (Double, Double) -> (Double, Double)
mulSV s (x, y) = (s * x, s * y)
| 88
|
mulSV s (x, y) = (s * x, s * y)
| 32
| true
| true
| 0
| 9
| 28
| 63
| 34
| 29
| null | null |
gsdlab/claferIG
|
src/Language/Clafer/IG/ClaferIG.hs
|
mit
|
quit :: MonadIO m => ClaferIGT m ()
quit = ClaferIGT $ lift AlloyIG.sendQuitCommand
| 83
|
quit :: MonadIO m => ClaferIGT m ()
quit = ClaferIGT $ lift AlloyIG.sendQuitCommand
| 83
|
quit = ClaferIGT $ lift AlloyIG.sendQuitCommand
| 47
| false
| true
| 0
| 7
| 13
| 34
| 16
| 18
| null | null |
alphalambda/codeworld
|
codeworld-base/src/Internal/Picture.hs
|
apache-2.0
|
-- | A picture with both dimensions scaled by the given factor.
-- Factors greater than @1@ make the picture bigger and less than @1@
-- make it smaller.
--
-- Negative factors reflect the picture across the origin, which is the same as
-- rotating it by 180 degrees.
dilated :: HasCallStack => (Picture, Number) -> Picture
dilated (p, k) = withFrozenCallStack $ CWPic (CW.dilated (toDouble k) (toCWPic p))
| 406
|
dilated :: HasCallStack => (Picture, Number) -> Picture
dilated (p, k) = withFrozenCallStack $ CWPic (CW.dilated (toDouble k) (toCWPic p))
| 138
|
dilated (p, k) = withFrozenCallStack $ CWPic (CW.dilated (toDouble k) (toCWPic p))
| 82
| true
| true
| 0
| 10
| 69
| 74
| 40
| 34
| null | null |
Athas/Sindre
|
Sindre/Runtime.hs
|
mit
|
redraw :: MonadBackend im => ObjectM s im ()
redraw = do r <- ask
sindre $ modify $ \s ->
s { needsRedraw = needsRedraw s `add` r }
fullRedraw
where add RedrawAll _ = RedrawAll
add (RedrawSome s) w = RedrawSome $ w `S.insert` s
| 284
|
redraw :: MonadBackend im => ObjectM s im ()
redraw = do r <- ask
sindre $ modify $ \s ->
s { needsRedraw = needsRedraw s `add` r }
fullRedraw
where add RedrawAll _ = RedrawAll
add (RedrawSome s) w = RedrawSome $ w `S.insert` s
| 284
|
redraw = do r <- ask
sindre $ modify $ \s ->
s { needsRedraw = needsRedraw s `add` r }
fullRedraw
where add RedrawAll _ = RedrawAll
add (RedrawSome s) w = RedrawSome $ w `S.insert` s
| 239
| false
| true
| 1
| 12
| 103
| 123
| 57
| 66
| null | null |
carlohamalainen/imagetrove-uploader
|
src/Network/ImageTrove/MainDicom.hs
|
bsd-2-clause
|
dostuff opts@(UploaderOptions _ _ _ _ (CmdUploadAll allOpts)) = do
uploadAllAction opts
| 91
|
dostuff opts@(UploaderOptions _ _ _ _ (CmdUploadAll allOpts)) = do
uploadAllAction opts
| 91
|
dostuff opts@(UploaderOptions _ _ _ _ (CmdUploadAll allOpts)) = do
uploadAllAction opts
| 91
| false
| false
| 0
| 10
| 15
| 38
| 18
| 20
| null | null |
rueshyna/gogol
|
gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Operations/Get.hs
|
mpl-2.0
|
-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
pzogUploadProtocol :: Lens' ProjectsZonesOperationsGet (Maybe Text)
pzogUploadProtocol
= lens _pzogUploadProtocol
(\ s a -> s{_pzogUploadProtocol = a})
| 221
|
pzogUploadProtocol :: Lens' ProjectsZonesOperationsGet (Maybe Text)
pzogUploadProtocol
= lens _pzogUploadProtocol
(\ s a -> s{_pzogUploadProtocol = a})
| 159
|
pzogUploadProtocol
= lens _pzogUploadProtocol
(\ s a -> s{_pzogUploadProtocol = a})
| 91
| true
| true
| 1
| 9
| 33
| 51
| 25
| 26
| null | null |
sampou-org/pfad
|
Code/Code29_Plan3.hs
|
bsd-3-clause
|
boxall :: [[a]] -> [a]
boxall = boxall1
| 44
|
boxall :: [[a]] -> [a]
boxall = boxall1
| 44
|
boxall = boxall1
| 19
| false
| true
| 0
| 7
| 12
| 24
| 14
| 10
| null | null |
hesiod/OpenGL
|
src/Graphics/Rendering/OpenGL/GL/QueryObject.hs
|
bsd-3-clause
|
noQueryObject :: QueryObject
noQueryObject = QueryObject 0
| 58
|
noQueryObject :: QueryObject
noQueryObject = QueryObject 0
| 58
|
noQueryObject = QueryObject 0
| 29
| false
| true
| 0
| 5
| 6
| 14
| 7
| 7
| null | null |
wdanilo/haskell-language-c
|
src/Language/C/Syntax/Constants.hs
|
bsd-3-clause
|
isSChar '\n' = False
| 20
|
isSChar '\n' = False
| 20
|
isSChar '\n' = False
| 20
| false
| false
| 1
| 5
| 3
| 13
| 4
| 9
| null | null |
MetaMemoryT/Idris-dev
|
src/Idris/AbsSyntaxTree.hs
|
bsd-3-clause
|
-- | Show a term with implicits, no colours
showTmImpls :: PTerm -> String
showTmImpls = flip (displayS . renderCompact . prettyImp verbosePPOption) ""
| 151
|
showTmImpls :: PTerm -> String
showTmImpls = flip (displayS . renderCompact . prettyImp verbosePPOption) ""
| 107
|
showTmImpls = flip (displayS . renderCompact . prettyImp verbosePPOption) ""
| 76
| true
| true
| 0
| 8
| 23
| 35
| 18
| 17
| null | null |
Collocalini/GenImplicit
|
genimplicit/src/Cmd_arguments.hs
|
gpl-3.0
|
default_stl_export_file = ""
| 30
|
default_stl_export_file = ""
| 30
|
default_stl_export_file = ""
| 30
| false
| false
| 0
| 4
| 4
| 6
| 3
| 3
| null | null |
trskop/command-wrapper
|
command-wrapper/src/CommandWrapper/Toolset/Main/StaticConfig.hs
|
bsd-3-clause
|
noSystemConfigDirLookup :: ParseEnv context (Maybe FilePath)
noSystemConfigDirLookup = pure Nothing
| 99
|
noSystemConfigDirLookup :: ParseEnv context (Maybe FilePath)
noSystemConfigDirLookup = pure Nothing
| 99
|
noSystemConfigDirLookup = pure Nothing
| 38
| false
| true
| 0
| 7
| 9
| 25
| 12
| 13
| null | null |
greedy/fdo-desktop-entry
|
System/Freedesktop/DesktopEntry.hs
|
bsd-3-clause
|
unwrap (StringVal s) = s
| 24
|
unwrap (StringVal s) = s
| 24
|
unwrap (StringVal s) = s
| 24
| false
| false
| 0
| 7
| 4
| 15
| 7
| 8
| null | null |
gridaphobe/liquid-fixpoint
|
src/Language/Fixpoint/Types/Sorts.hs
|
bsd-3-clause
|
toFixSort (FFunc n ts) = text "func" <> parens (toFix n <> text ", " <> toFix ts)
| 81
|
toFixSort (FFunc n ts) = text "func" <> parens (toFix n <> text ", " <> toFix ts)
| 81
|
toFixSort (FFunc n ts) = text "func" <> parens (toFix n <> text ", " <> toFix ts)
| 81
| false
| false
| 0
| 10
| 17
| 47
| 21
| 26
| null | null |
ikirill/ComputationalMathematics
|
Cube/CubeSearch.hs
|
gpl-3.0
|
allSiderotsUptoLength :: Int -> [Side] -> [Siderot]
allSiderotsUptoLength n sides
= concatMap (\k -> allSiderotsOfLength k sides) [1..n]
| 138
|
allSiderotsUptoLength :: Int -> [Side] -> [Siderot]
allSiderotsUptoLength n sides
= concatMap (\k -> allSiderotsOfLength k sides) [1..n]
| 138
|
allSiderotsUptoLength n sides
= concatMap (\k -> allSiderotsOfLength k sides) [1..n]
| 86
| false
| true
| 0
| 8
| 19
| 53
| 28
| 25
| null | null |
jgoerzen/media-index
|
FileDB/DB.hs
|
gpl-2.0
|
{- | Adds a file from a FileRec. -}
addFileRec conn discid fr =
addFile conn discid (frname fr) (frsize fr) (frmd5 fr) (frmime fr)
| 135
|
addFileRec conn discid fr =
addFile conn discid (frname fr) (frsize fr) (frmd5 fr) (frmime fr)
| 99
|
addFileRec conn discid fr =
addFile conn discid (frname fr) (frsize fr) (frmd5 fr) (frmime fr)
| 99
| true
| false
| 0
| 7
| 29
| 56
| 25
| 31
| null | null |
barrucadu/cabal-info
|
cabal-info/Fields.hs
|
mit
|
getField (FieldName Nothing "upstream") = maybe "" (getSourceRepoField "location") . listToMaybe . filter ((RepoHead==) . repoKind) . sourceRepos . snd
| 151
|
getField (FieldName Nothing "upstream") = maybe "" (getSourceRepoField "location") . listToMaybe . filter ((RepoHead==) . repoKind) . sourceRepos . snd
| 151
|
getField (FieldName Nothing "upstream") = maybe "" (getSourceRepoField "location") . listToMaybe . filter ((RepoHead==) . repoKind) . sourceRepos . snd
| 151
| false
| false
| 0
| 11
| 19
| 59
| 29
| 30
| null | null |
hoffstaetter/parsec-permutation
|
tests/PermutationTest.hs
|
bsd-3-clause
|
prop_manyPermMixedOrder1 :: Property
prop_manyPermMixedOrder1 = once $
(requireParse "abcc" $ runPermParser $
(,,) <$>
manyPerm (char 'c') <*>
((,) <$>
manyPerm (char 'b') <*>
manyPerm (char 'c')) <*>
manyPerm (char 'a')) == ("cc",("b",""),"a")
| 287
|
prop_manyPermMixedOrder1 :: Property
prop_manyPermMixedOrder1 = once $
(requireParse "abcc" $ runPermParser $
(,,) <$>
manyPerm (char 'c') <*>
((,) <$>
manyPerm (char 'b') <*>
manyPerm (char 'c')) <*>
manyPerm (char 'a')) == ("cc",("b",""),"a")
| 287
|
prop_manyPermMixedOrder1 = once $
(requireParse "abcc" $ runPermParser $
(,,) <$>
manyPerm (char 'c') <*>
((,) <$>
manyPerm (char 'b') <*>
manyPerm (char 'c')) <*>
manyPerm (char 'a')) == ("cc",("b",""),"a")
| 250
| false
| true
| 0
| 15
| 75
| 114
| 60
| 54
| null | null |
peterokagey/haskellOEIS
|
src/Subsets/A272083.hs
|
apache-2.0
|
a272083_list :: [Integer]
a272083_list = concatMap oneIndexed a272036_list
| 74
|
a272083_list :: [Integer]
a272083_list = concatMap oneIndexed a272036_list
| 74
|
a272083_list = concatMap oneIndexed a272036_list
| 48
| false
| true
| 0
| 5
| 7
| 19
| 10
| 9
| null | null |
anttisalonen/starrover
|
src/ZipperGalaxyUtils.hs
|
mit
|
pplInfo :: [Empire] -> GalaxyZipper Terrain -> String
pplInfo es z = genInfo (\_ -> "") z
| 89
|
pplInfo :: [Empire] -> GalaxyZipper Terrain -> String
pplInfo es z = genInfo (\_ -> "") z
| 89
|
pplInfo es z = genInfo (\_ -> "") z
| 35
| false
| true
| 0
| 7
| 16
| 43
| 22
| 21
| null | null |
dkandalov/katas
|
haskell/p99/src/p9x/p80/P80.hs
|
unlicense
|
digraphToAdjacentForm :: Eq n => Digraph n l -> [(n, [n])]
digraphToAdjacentForm graph = toAdjacentForm (directedEdges graph)
| 125
|
digraphToAdjacentForm :: Eq n => Digraph n l -> [(n, [n])]
digraphToAdjacentForm graph = toAdjacentForm (directedEdges graph)
| 125
|
digraphToAdjacentForm graph = toAdjacentForm (directedEdges graph)
| 66
| false
| true
| 0
| 11
| 16
| 57
| 27
| 30
| null | null |
rueshyna/gogol
|
gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/Insert.hs
|
mpl-2.0
|
-- | Creates a value of 'TargetInstancesInsert' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tiiProject'
--
-- * 'tiiZone'
--
-- * 'tiiPayload'
targetInstancesInsert
:: Text -- ^ 'tiiProject'
-> Text -- ^ 'tiiZone'
-> TargetInstance -- ^ 'tiiPayload'
-> TargetInstancesInsert
targetInstancesInsert pTiiProject_ pTiiZone_ pTiiPayload_ =
TargetInstancesInsert'
{ _tiiProject = pTiiProject_
, _tiiZone = pTiiZone_
, _tiiPayload = pTiiPayload_
}
| 566
|
targetInstancesInsert
:: Text -- ^ 'tiiProject'
-> Text -- ^ 'tiiZone'
-> TargetInstance -- ^ 'tiiPayload'
-> TargetInstancesInsert
targetInstancesInsert pTiiProject_ pTiiZone_ pTiiPayload_ =
TargetInstancesInsert'
{ _tiiProject = pTiiProject_
, _tiiZone = pTiiZone_
, _tiiPayload = pTiiPayload_
}
| 333
|
targetInstancesInsert pTiiProject_ pTiiZone_ pTiiPayload_ =
TargetInstancesInsert'
{ _tiiProject = pTiiProject_
, _tiiZone = pTiiZone_
, _tiiPayload = pTiiPayload_
}
| 185
| true
| true
| 0
| 9
| 114
| 71
| 42
| 29
| null | null |
Sealos/AI
|
Sudoku/ProyectosReferencia/Simon/static_encoder.hs
|
gpl-2.0
|
variablesIniciales i line = res
where res = calc i (take 9 line) ++ variablesIniciales (i+1) (drop 9 line)
calc _ "" = []
calc i ('.':xs) = calc i xs
calc i (x:xs) = (i, 8-length(xs), digitToInt x):(calc i xs)
| 235
|
variablesIniciales i line = res
where res = calc i (take 9 line) ++ variablesIniciales (i+1) (drop 9 line)
calc _ "" = []
calc i ('.':xs) = calc i xs
calc i (x:xs) = (i, 8-length(xs), digitToInt x):(calc i xs)
| 235
|
variablesIniciales i line = res
where res = calc i (take 9 line) ++ variablesIniciales (i+1) (drop 9 line)
calc _ "" = []
calc i ('.':xs) = calc i xs
calc i (x:xs) = (i, 8-length(xs), digitToInt x):(calc i xs)
| 235
| false
| false
| 3
| 11
| 66
| 141
| 71
| 70
| null | null |
brow/noise
|
src/Text/Noise/Parser/Token.hs
|
mit
|
number :: Parser Double
number = lexeme $ do
naturalOrFloat <- Internal.natFloat
return $ case naturalOrFloat of
Left integer -> fromInteger integer
Right double -> double
| 183
|
number :: Parser Double
number = lexeme $ do
naturalOrFloat <- Internal.natFloat
return $ case naturalOrFloat of
Left integer -> fromInteger integer
Right double -> double
| 183
|
number = lexeme $ do
naturalOrFloat <- Internal.natFloat
return $ case naturalOrFloat of
Left integer -> fromInteger integer
Right double -> double
| 159
| false
| true
| 2
| 12
| 37
| 67
| 28
| 39
| null | null |
mzini/qlogic
|
Qlogic/Boolean.hs
|
gpl-3.0
|
liftF :: (b -> b -> b) -> (a -> b) -> (a -> b) -> (a -> b)
liftF o f1 f2 = \a -> f1 a `o` f2 a
| 94
|
liftF :: (b -> b -> b) -> (a -> b) -> (a -> b) -> (a -> b)
liftF o f1 f2 = \a -> f1 a `o` f2 a
| 94
|
liftF o f1 f2 = \a -> f1 a `o` f2 a
| 35
| false
| true
| 0
| 9
| 30
| 79
| 42
| 37
| null | null |
oldmanmike/ghc
|
compiler/typecheck/TcType.hs
|
bsd-3-clause
|
pprTcTyVarDetails (FlatSkol {}) = text "fsk"
| 47
|
pprTcTyVarDetails (FlatSkol {}) = text "fsk"
| 47
|
pprTcTyVarDetails (FlatSkol {}) = text "fsk"
| 47
| false
| false
| 0
| 7
| 8
| 19
| 9
| 10
| null | null |
ku-fpg/kansas-amber
|
System/Hardware/Haskino/Data.hs
|
bsd-3-clause
|
takeSem :: Word8 -> Arduino ()
takeSem i = Arduino $ primitive $ TakeSem i
| 74
|
takeSem :: Word8 -> Arduino ()
takeSem i = Arduino $ primitive $ TakeSem i
| 74
|
takeSem i = Arduino $ primitive $ TakeSem i
| 43
| false
| true
| 0
| 7
| 14
| 34
| 16
| 18
| null | null |
ambiata/mismi
|
mismi-core/src/Mismi/Environment.hs
|
bsd-3-clause
|
newMismiEnv :: (Applicative m, MonadIO m, MonadCatch m) => Region -> Credentials -> m Env
newMismiEnv r c = do
e <- newEnv c
pure $ e & envRegion .~ r
| 154
|
newMismiEnv :: (Applicative m, MonadIO m, MonadCatch m) => Region -> Credentials -> m Env
newMismiEnv r c = do
e <- newEnv c
pure $ e & envRegion .~ r
| 154
|
newMismiEnv r c = do
e <- newEnv c
pure $ e & envRegion .~ r
| 64
| false
| true
| 0
| 9
| 34
| 73
| 35
| 38
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.