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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
themoritz/cabal | Cabal/Distribution/Simple/GHC/Internal.hs | bsd-3-clause | checkPackageDbEnvVar :: Verbosity -> String -> String -> IO ()
checkPackageDbEnvVar verbosity compilerName packagePathEnvVar = do
mPP <- lookupEnv packagePathEnvVar
when (isJust mPP) $ do
mcsPP <- lookupEnv "CABAL_SANDBOX_PACKAGE_PATH"
unless (mPP == mcsPP) abort
where
lookupEnv :: String -> NoCallStackIO (Maybe String)
lookupEnv name = (Just `fmap` getEnv name)
`catchIO` const (return Nothing)
abort =
die' verbosity $ "Use of " ++ compilerName ++ "'s environment variable "
++ packagePathEnvVar ++ " is incompatible with Cabal. Use the "
++ "flag --package-db to specify a package database (it can be "
++ "used multiple times)."
_ = callStack -- TODO: output stack when erroring | 827 | checkPackageDbEnvVar :: Verbosity -> String -> String -> IO ()
checkPackageDbEnvVar verbosity compilerName packagePathEnvVar = do
mPP <- lookupEnv packagePathEnvVar
when (isJust mPP) $ do
mcsPP <- lookupEnv "CABAL_SANDBOX_PACKAGE_PATH"
unless (mPP == mcsPP) abort
where
lookupEnv :: String -> NoCallStackIO (Maybe String)
lookupEnv name = (Just `fmap` getEnv name)
`catchIO` const (return Nothing)
abort =
die' verbosity $ "Use of " ++ compilerName ++ "'s environment variable "
++ packagePathEnvVar ++ " is incompatible with Cabal. Use the "
++ "flag --package-db to specify a package database (it can be "
++ "used multiple times)."
_ = callStack -- TODO: output stack when erroring | 827 | checkPackageDbEnvVar verbosity compilerName packagePathEnvVar = do
mPP <- lookupEnv packagePathEnvVar
when (isJust mPP) $ do
mcsPP <- lookupEnv "CABAL_SANDBOX_PACKAGE_PATH"
unless (mPP == mcsPP) abort
where
lookupEnv :: String -> NoCallStackIO (Maybe String)
lookupEnv name = (Just `fmap` getEnv name)
`catchIO` const (return Nothing)
abort =
die' verbosity $ "Use of " ++ compilerName ++ "'s environment variable "
++ packagePathEnvVar ++ " is incompatible with Cabal. Use the "
++ "flag --package-db to specify a package database (it can be "
++ "used multiple times)."
_ = callStack -- TODO: output stack when erroring | 764 | false | true | 7 | 12 | 246 | 199 | 92 | 107 | null | null |
kfish/hogg | Codec/Container/Ogg/Timestamp.hs | bsd-3-clause | timeSum :: Rational -> ParsedTimeStamp -> [(Integer, Integer)]
timeSum rate (ParsedTimeStamp hh mm ss subs) = case subs of
Left ms -> [((t 1000 1 ms) , 1000)]
Right ff -> [((t n d ff) , n)]
where
n = numerator rate
d = denominator rate
t tn td z = ((hh*60 +mm)*60 +ss)*tn + td*z | 306 | timeSum :: Rational -> ParsedTimeStamp -> [(Integer, Integer)]
timeSum rate (ParsedTimeStamp hh mm ss subs) = case subs of
Left ms -> [((t 1000 1 ms) , 1000)]
Right ff -> [((t n d ff) , n)]
where
n = numerator rate
d = denominator rate
t tn td z = ((hh*60 +mm)*60 +ss)*tn + td*z | 306 | timeSum rate (ParsedTimeStamp hh mm ss subs) = case subs of
Left ms -> [((t 1000 1 ms) , 1000)]
Right ff -> [((t n d ff) , n)]
where
n = numerator rate
d = denominator rate
t tn td z = ((hh*60 +mm)*60 +ss)*tn + td*z | 243 | false | true | 3 | 13 | 83 | 187 | 90 | 97 | null | null |
prsteele/mdp | src/Algorithms/MDP/ValueIteration.hs | mit | relativeValueIteration ::
(Read t, Ord t, Fractional t) =>
MDP a b t -- ^ The MDP to solve
-> [CFBounds a b t] -- ^ A converging sequence of cost functions.
relativeValueIteration mdp =
let
states = _states mdp
actions = _actions mdp
zero = V.map (\s -> (s, V.head actions, 0)) states
cf = CFBounds zero (read "-Infinity") (read "Infinity")
in
iterate (relativeValueIterate mdp) cf | 424 | relativeValueIteration ::
(Read t, Ord t, Fractional t) =>
MDP a b t -- ^ The MDP to solve
-> [CFBounds a b t]
relativeValueIteration mdp =
let
states = _states mdp
actions = _actions mdp
zero = V.map (\s -> (s, V.head actions, 0)) states
cf = CFBounds zero (read "-Infinity") (read "Infinity")
in
iterate (relativeValueIterate mdp) cf | 378 | relativeValueIteration mdp =
let
states = _states mdp
actions = _actions mdp
zero = V.map (\s -> (s, V.head actions, 0)) states
cf = CFBounds zero (read "-Infinity") (read "Infinity")
in
iterate (relativeValueIterate mdp) cf | 250 | true | true | 0 | 14 | 109 | 151 | 76 | 75 | null | null |
leksah/yi | src/library/Yi/Syntax/Haskell.hs | gpl-2.0 | noImports :: Parser TT (Exp TT)
noImports = notNext [Reserved Import] *> pure emptyNode
where notNext f = testNext $ uncurry (||) . (&&&) isNothing
(flip notElem f . tokT . fromJust)
-- Helper functions for parsing follows
-- | Parse Variables | 270 | noImports :: Parser TT (Exp TT)
noImports = notNext [Reserved Import] *> pure emptyNode
where notNext f = testNext $ uncurry (||) . (&&&) isNothing
(flip notElem f . tokT . fromJust)
-- Helper functions for parsing follows
-- | Parse Variables | 270 | noImports = notNext [Reserved Import] *> pure emptyNode
where notNext f = testNext $ uncurry (||) . (&&&) isNothing
(flip notElem f . tokT . fromJust)
-- Helper functions for parsing follows
-- | Parse Variables | 238 | false | true | 5 | 9 | 68 | 100 | 44 | 56 | null | null |
d10genes/haskell-edu | e8/Party.hs | bsd-2-clause | -- t1 :: GuestList
-- t1 = GL [Emp "Bob" 6, Emp "Bob" 5, Emp "Bob" 9] 3
flat :: [(b, b)] -> [b]
flat = concatMap (\(x,y) -> [x,y]) | 131 | flat :: [(b, b)] -> [b]
flat = concatMap (\(x,y) -> [x,y]) | 58 | flat = concatMap (\(x,y) -> [x,y]) | 34 | true | true | 0 | 8 | 30 | 52 | 32 | 20 | null | null |
dmjio/aeson | tests/PropUtils.hs | bsd-3-clause | isObjectWithSingleField _ = False | 44 | isObjectWithSingleField _ = False | 44 | isObjectWithSingleField _ = False | 44 | false | false | 0 | 5 | 14 | 9 | 4 | 5 | null | null |
danieldietrich/llrbtree | Data/Set/Splay.hs | bsd-3-clause | maximum t = let (x,mt) = deleteMax t in (x, Node mt x Leaf) | 59 | maximum t = let (x,mt) = deleteMax t in (x, Node mt x Leaf) | 59 | maximum t = let (x,mt) = deleteMax t in (x, Node mt x Leaf) | 59 | false | false | 0 | 9 | 13 | 43 | 21 | 22 | null | null |
apyrgio/snf-ganeti | test/hs/Test/Ganeti/Query/Query.hs | bsd-2-clause | checkResultType _ (ResultEntry r (Just _)) =
failTest $ "Just result in " ++ show r ++ " field" | 97 | checkResultType _ (ResultEntry r (Just _)) =
failTest $ "Just result in " ++ show r ++ " field" | 97 | checkResultType _ (ResultEntry r (Just _)) =
failTest $ "Just result in " ++ show r ++ " field" | 97 | false | false | 0 | 9 | 20 | 40 | 19 | 21 | null | null |
creichert/wai | warp/Network/Wai/Handler/Warp/HTTP2/Worker.hs | mit | pushStream :: Context -> S.Settings
-> StreamId -> ValueTable -> Request -> InternalInfo
-> Maybe HTTP2Data
-> IO (OutputType, IO ())
pushStream _ _ _ _ _ _ Nothing = return (ORspn, return ()) | 225 | pushStream :: Context -> S.Settings
-> StreamId -> ValueTable -> Request -> InternalInfo
-> Maybe HTTP2Data
-> IO (OutputType, IO ())
pushStream _ _ _ _ _ _ Nothing = return (ORspn, return ()) | 225 | pushStream _ _ _ _ _ _ Nothing = return (ORspn, return ()) | 58 | false | true | 0 | 15 | 66 | 87 | 43 | 44 | null | null |
mrd/camfort | src/Camfort/Specification/Units/InferenceFrontend.hs | apache-2.0 | indexedParams :: F.ProgramUnit UA -> [(Int, VV)]
indexedParams pu
| F.PUFunction _ _ _ _ _ (Just paList) (Just r) _ _ <- pu = zip [0..] $ map toVV (r : F.aStrip paList)
| F.PUFunction _ _ _ _ _ (Just paList) _ _ _ <- pu = zip [0..] $ (fname, sfname) : map toVV (F.aStrip paList)
| F.PUSubroutine _ _ _ _ (Just paList) _ _ <- pu = zip [1..] $ map toVV (F.aStrip paList)
| otherwise = []
where
fname = puName pu
sfname = puSrcName pu
toVV e = (varName e, srcName e)
--------------------------------------------------
-- | Any remaining variables with unknown units are given unit UnitVar
-- with a unique name (in this case, taken from the unique name of the
-- variable as provided by the Renamer), or UnitParamVarAbs if the
-- variables are inside of a function or subroutine. | 863 | indexedParams :: F.ProgramUnit UA -> [(Int, VV)]
indexedParams pu
| F.PUFunction _ _ _ _ _ (Just paList) (Just r) _ _ <- pu = zip [0..] $ map toVV (r : F.aStrip paList)
| F.PUFunction _ _ _ _ _ (Just paList) _ _ _ <- pu = zip [0..] $ (fname, sfname) : map toVV (F.aStrip paList)
| F.PUSubroutine _ _ _ _ (Just paList) _ _ <- pu = zip [1..] $ map toVV (F.aStrip paList)
| otherwise = []
where
fname = puName pu
sfname = puSrcName pu
toVV e = (varName e, srcName e)
--------------------------------------------------
-- | Any remaining variables with unknown units are given unit UnitVar
-- with a unique name (in this case, taken from the unique name of the
-- variable as provided by the Renamer), or UnitParamVarAbs if the
-- variables are inside of a function or subroutine. | 863 | indexedParams pu
| F.PUFunction _ _ _ _ _ (Just paList) (Just r) _ _ <- pu = zip [0..] $ map toVV (r : F.aStrip paList)
| F.PUFunction _ _ _ _ _ (Just paList) _ _ _ <- pu = zip [0..] $ (fname, sfname) : map toVV (F.aStrip paList)
| F.PUSubroutine _ _ _ _ (Just paList) _ _ <- pu = zip [1..] $ map toVV (F.aStrip paList)
| otherwise = []
where
fname = puName pu
sfname = puSrcName pu
toVV e = (varName e, srcName e)
--------------------------------------------------
-- | Any remaining variables with unknown units are given unit UnitVar
-- with a unique name (in this case, taken from the unique name of the
-- variable as provided by the Renamer), or UnitParamVarAbs if the
-- variables are inside of a function or subroutine. | 814 | false | true | 3 | 11 | 233 | 291 | 145 | 146 | null | null |
comius/haskell-mpfr | src/Numeric/Rounded/Interval.hs | lgpl-3.0 | (+/-) :: Rounded r p -> Rounded r' p -> Interval p
a +/- b = (coerce a .-. coerce b) ... (coerce a .+. coerce b) | 112 | (+/-) :: Rounded r p -> Rounded r' p -> Interval p
a +/- b = (coerce a .-. coerce b) ... (coerce a .+. coerce b) | 112 | a +/- b = (coerce a .-. coerce b) ... (coerce a .+. coerce b) | 61 | false | true | 0 | 9 | 26 | 74 | 34 | 40 | null | null |
snoyberg/ghc | compiler/cmm/CmmUtils.hs | bsd-3-clause | mkByteStringCLit :: Unique -> [Word8] -> (CmmLit, GenCmmDecl CmmStatics info stmt)
-- We have to make a top-level decl for the string,
-- and return a literal pointing to it
mkByteStringCLit uniq bytes
= (CmmLabel lbl, CmmData sec $ Statics lbl [CmmString bytes])
where
lbl = mkStringLitLabel uniq
sec = Section ReadOnlyData lbl | 340 | mkByteStringCLit :: Unique -> [Word8] -> (CmmLit, GenCmmDecl CmmStatics info stmt)
mkByteStringCLit uniq bytes
= (CmmLabel lbl, CmmData sec $ Statics lbl [CmmString bytes])
where
lbl = mkStringLitLabel uniq
sec = Section ReadOnlyData lbl | 249 | mkByteStringCLit uniq bytes
= (CmmLabel lbl, CmmData sec $ Statics lbl [CmmString bytes])
where
lbl = mkStringLitLabel uniq
sec = Section ReadOnlyData lbl | 166 | true | true | 1 | 9 | 64 | 90 | 46 | 44 | null | null |
agrafix/Spock | reroute/src/Data/PolyMap.hs | bsd-3-clause | unionWith ::
(forall p. c p => f (p -> a) -> f (p -> a) -> f (p -> a)) ->
PolyMap c f a ->
PolyMap c f a ->
PolyMap c f a
unionWith _ PMNil pm2 = pm2 | 157 | unionWith ::
(forall p. c p => f (p -> a) -> f (p -> a) -> f (p -> a)) ->
PolyMap c f a ->
PolyMap c f a ->
PolyMap c f a
unionWith _ PMNil pm2 = pm2 | 157 | unionWith _ PMNil pm2 = pm2 | 27 | false | true | 0 | 14 | 49 | 109 | 52 | 57 | null | null |
mgsloan/compconfig | env/src/Misc.hs | mit | dunstToggle :: Xio ()
dunstToggle = syncSpawn "notify-send" ["DUNST_COMMAND_TOGGLE"] | 84 | dunstToggle :: Xio ()
dunstToggle = syncSpawn "notify-send" ["DUNST_COMMAND_TOGGLE"] | 84 | dunstToggle = syncSpawn "notify-send" ["DUNST_COMMAND_TOGGLE"] | 62 | false | true | 0 | 6 | 8 | 24 | 12 | 12 | null | null |
eijian/picfinder | src/Main-t3.hs | bsd-3-clause | main :: IO ()
main = do
putStrLn (show ks)
putStrLn (show es)
where
m = Prelude.foldl insertItem Map.empty dat
ks = Map.keys m
es = Map.elems m | 161 | main :: IO ()
main = do
putStrLn (show ks)
putStrLn (show es)
where
m = Prelude.foldl insertItem Map.empty dat
ks = Map.keys m
es = Map.elems m | 161 | main = do
putStrLn (show ks)
putStrLn (show es)
where
m = Prelude.foldl insertItem Map.empty dat
ks = Map.keys m
es = Map.elems m | 147 | false | true | 1 | 9 | 45 | 82 | 37 | 45 | null | null |
ryantm/ghc | compiler/cmm/CmmUtils.hs | bsd-3-clause | cmmRegOff :: CmmReg -> Int -> CmmExpr
cmmRegOff reg 0 = CmmReg reg | 73 | cmmRegOff :: CmmReg -> Int -> CmmExpr
cmmRegOff reg 0 = CmmReg reg | 73 | cmmRegOff reg 0 = CmmReg reg | 35 | false | true | 0 | 6 | 19 | 32 | 14 | 18 | null | null |
jstolarek/primitive | Data/Primitive/MachDeps.hs | bsd-3-clause | aLIGNMENT_WORD8 = ALIGNMENT_WORD8 | 33 | aLIGNMENT_WORD8 = ALIGNMENT_WORD8 | 33 | aLIGNMENT_WORD8 = ALIGNMENT_WORD8 | 33 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
tychon/phrases | Migrate.hs | mit | -- | Decrypts and parses version 1 storage.
v1open :: String -> BS.ByteString -> IO V1Storage
v1open passphrase fcontent =
let (salt, encrypted) = BS.splitAt 16 fcontent
-- decrypt
gen = getDRBG $ getHash passphrase (map BSInternal.w2c $ BS.unpack salt)
(cipher, _) = throwLeft $ genBytes (BS.length encrypted) gen
-- from [Word8], [Word8] to [Char]
decrypted = BS.pack $ BS.zipWith xor encrypted cipher
-- verify
(verifier1, decrypted') = BS.splitAt 17 decrypted
(verifier2, plaintext) = BS.splitAt 17 decrypted'
in if verifier1 /= verifier2
then do
putStrLn $ (show verifier1) ++ " " ++ (show verifier2)
putStrLn "Authentication failed."
exitFailure
else do
let plainstring = map BSInternal.w2c $ BS.unpack plaintext
putStrLn "Authentication complete."
case (readMaybe plainstring :: Maybe V1Storage) of
Nothing -> do
putStrLn "Data corrupted."
exitFailure
Just storage -> do
putStrLn "Decryption successful."
return storage
where
getHash passphrase salt = sha512PBKDF2 passphrase salt 150000 64 :: String
getDRBG seed = throwLeft (newGen (BS8.pack seed)) :: HashDRBG
-- | Try to open as version 1 storage and convert to version 2 storage.
-- You can call BasicUI.save on the returned type. | 1,383 | v1open :: String -> BS.ByteString -> IO V1Storage
v1open passphrase fcontent =
let (salt, encrypted) = BS.splitAt 16 fcontent
-- decrypt
gen = getDRBG $ getHash passphrase (map BSInternal.w2c $ BS.unpack salt)
(cipher, _) = throwLeft $ genBytes (BS.length encrypted) gen
-- from [Word8], [Word8] to [Char]
decrypted = BS.pack $ BS.zipWith xor encrypted cipher
-- verify
(verifier1, decrypted') = BS.splitAt 17 decrypted
(verifier2, plaintext) = BS.splitAt 17 decrypted'
in if verifier1 /= verifier2
then do
putStrLn $ (show verifier1) ++ " " ++ (show verifier2)
putStrLn "Authentication failed."
exitFailure
else do
let plainstring = map BSInternal.w2c $ BS.unpack plaintext
putStrLn "Authentication complete."
case (readMaybe plainstring :: Maybe V1Storage) of
Nothing -> do
putStrLn "Data corrupted."
exitFailure
Just storage -> do
putStrLn "Decryption successful."
return storage
where
getHash passphrase salt = sha512PBKDF2 passphrase salt 150000 64 :: String
getDRBG seed = throwLeft (newGen (BS8.pack seed)) :: HashDRBG
-- | Try to open as version 1 storage and convert to version 2 storage.
-- You can call BasicUI.save on the returned type. | 1,339 | v1open passphrase fcontent =
let (salt, encrypted) = BS.splitAt 16 fcontent
-- decrypt
gen = getDRBG $ getHash passphrase (map BSInternal.w2c $ BS.unpack salt)
(cipher, _) = throwLeft $ genBytes (BS.length encrypted) gen
-- from [Word8], [Word8] to [Char]
decrypted = BS.pack $ BS.zipWith xor encrypted cipher
-- verify
(verifier1, decrypted') = BS.splitAt 17 decrypted
(verifier2, plaintext) = BS.splitAt 17 decrypted'
in if verifier1 /= verifier2
then do
putStrLn $ (show verifier1) ++ " " ++ (show verifier2)
putStrLn "Authentication failed."
exitFailure
else do
let plainstring = map BSInternal.w2c $ BS.unpack plaintext
putStrLn "Authentication complete."
case (readMaybe plainstring :: Maybe V1Storage) of
Nothing -> do
putStrLn "Data corrupted."
exitFailure
Just storage -> do
putStrLn "Decryption successful."
return storage
where
getHash passphrase salt = sha512PBKDF2 passphrase salt 150000 64 :: String
getDRBG seed = throwLeft (newGen (BS8.pack seed)) :: HashDRBG
-- | Try to open as version 1 storage and convert to version 2 storage.
-- You can call BasicUI.save on the returned type. | 1,289 | true | true | 3 | 15 | 369 | 364 | 177 | 187 | null | null |
aslatter/tarindex | src/Data/TarIndex.hs | bsd-3-clause | readOctBytes :: BS.ByteString -> Maybe Int
readOctBytes = BS.Char8.foldl' go (Just 0)
where go Nothing _ = Nothing
go (Just acc) char
| next > 7 = Nothing
| otherwise
= let x = next + acc * 8
in x `seq` Just x
where next
= case char of
'0' -> 0
'1' -> 1
'2' -> 2
'3' -> 3
'4' -> 4
'5' -> 5
'6' -> 6
'7' -> 7
_ -> 8 | 565 | readOctBytes :: BS.ByteString -> Maybe Int
readOctBytes = BS.Char8.foldl' go (Just 0)
where go Nothing _ = Nothing
go (Just acc) char
| next > 7 = Nothing
| otherwise
= let x = next + acc * 8
in x `seq` Just x
where next
= case char of
'0' -> 0
'1' -> 1
'2' -> 2
'3' -> 3
'4' -> 4
'5' -> 5
'6' -> 6
'7' -> 7
_ -> 8 | 565 | readOctBytes = BS.Char8.foldl' go (Just 0)
where go Nothing _ = Nothing
go (Just acc) char
| next > 7 = Nothing
| otherwise
= let x = next + acc * 8
in x `seq` Just x
where next
= case char of
'0' -> 0
'1' -> 1
'2' -> 2
'3' -> 3
'4' -> 4
'5' -> 5
'6' -> 6
'7' -> 7
_ -> 8 | 522 | false | true | 0 | 11 | 327 | 175 | 86 | 89 | null | null |
wuerges/vlsi_verification | src/BDDGraph.hs | bsd-3-clause | -- | Exported function
bddZero = B 0 | 36 | bddZero = B 0 | 13 | bddZero = B 0 | 13 | true | false | 0 | 5 | 7 | 10 | 5 | 5 | null | null |
jlubi333/Camille | scheme/eval.hs | mit | eval val@(Number _) = val | 25 | eval val@(Number _) = val | 25 | eval val@(Number _) = val | 25 | false | false | 1 | 8 | 4 | 23 | 9 | 14 | null | null |
hnakamur/haskell-sandbox | sandbox-css/SandBox/Text/CSS/Parser.hs | bsd-3-clause | outlineStyleVal :: Stream s Identity Char => ParsecT s u Identity OutlineStyleVal
outlineStyleVal = choice
[ try outlineStyle >>= \w -> return (OSVStyle w)
, try (keywordCase "inherit") >> return OSVInherit
] | 220 | outlineStyleVal :: Stream s Identity Char => ParsecT s u Identity OutlineStyleVal
outlineStyleVal = choice
[ try outlineStyle >>= \w -> return (OSVStyle w)
, try (keywordCase "inherit") >> return OSVInherit
] | 220 | outlineStyleVal = choice
[ try outlineStyle >>= \w -> return (OSVStyle w)
, try (keywordCase "inherit") >> return OSVInherit
] | 138 | false | true | 0 | 11 | 43 | 77 | 37 | 40 | null | null |
alphalambda/codeworld | codeworld-base/src/Extras/Colors.hs | apache-2.0 | byName("ghostwhite") = colorNamed'("#f8f8ff") | 45 | byName("ghostwhite") = colorNamed'("#f8f8ff") | 45 | byName("ghostwhite") = colorNamed'("#f8f8ff") | 45 | false | false | 0 | 6 | 2 | 18 | 9 | 9 | null | null |
BartAdv/Idris-dev | src/Idris/Completion.hs | bsd-3-clause | -- FIXME: Respect module imports
-- Issue #1767 in the issue tracker.
-- https://github.com/idris-lang/Idris-dev/issues/1767
-- | Get the user-visible names from the current interpreter state.
names :: Idris [String]
names = do i <- get
let ctxt = tt_ctxt i
return . nub $
mapMaybe (nameString . fst) (ctxtAlist ctxt) ++
"Type" : map fst Idris.ParseExpr.constants | 414 | names :: Idris [String]
names = do i <- get
let ctxt = tt_ctxt i
return . nub $
mapMaybe (nameString . fst) (ctxtAlist ctxt) ++
"Type" : map fst Idris.ParseExpr.constants | 218 | names = do i <- get
let ctxt = tt_ctxt i
return . nub $
mapMaybe (nameString . fst) (ctxtAlist ctxt) ++
"Type" : map fst Idris.ParseExpr.constants | 194 | true | true | 1 | 13 | 106 | 89 | 43 | 46 | null | null |
haroldcarr/juno | z-no-longer-used/src/Hop/Apps/Juno/JsonTypes.hs | bsd-3-clause | cmdStatus2PollResult :: RequestId -> CommandStatus -> PollResult
cmdStatus2PollResult (RequestId rid) CmdSubmitted =
PollResult{_pollStatus = "PENDING", _pollCmdId = toText rid, _logidx = -1, _pollMessage = "", _pollResPayload = ""} | 234 | cmdStatus2PollResult :: RequestId -> CommandStatus -> PollResult
cmdStatus2PollResult (RequestId rid) CmdSubmitted =
PollResult{_pollStatus = "PENDING", _pollCmdId = toText rid, _logidx = -1, _pollMessage = "", _pollResPayload = ""} | 234 | cmdStatus2PollResult (RequestId rid) CmdSubmitted =
PollResult{_pollStatus = "PENDING", _pollCmdId = toText rid, _logidx = -1, _pollMessage = "", _pollResPayload = ""} | 169 | false | true | 0 | 7 | 29 | 67 | 38 | 29 | null | null |
emc2/proglang-util | Text/Format.hs | bsd-3-clause | -- | Enclose the given document in braces
braces :: Format f => f -> Doc
braces = PP.braces . format | 100 | braces :: Format f => f -> Doc
braces = PP.braces . format | 58 | braces = PP.braces . format | 27 | true | true | 0 | 6 | 20 | 29 | 15 | 14 | null | null |
jtdaugherty/vty | src/Graphics/Vty/Attributes/Color.hs | bsd-3-clause | magenta= ISOColor 5 | 19 | magenta= ISOColor 5 | 19 | magenta= ISOColor 5 | 19 | false | false | 1 | 5 | 2 | 14 | 4 | 10 | null | null |
hepek/MPEG-TS | Codec/Video/MpegTS.hs | gpl-3.0 | esTag 8 = Video_window_descriptor | 35 | esTag 8 = Video_window_descriptor | 35 | esTag 8 = Video_window_descriptor | 35 | false | false | 0 | 5 | 5 | 9 | 4 | 5 | null | null |
chadbrewbaker/combinat | Math/Combinat/Partitions/NonCrossing.hs | bsd-3-clause | ckPathToNonCrossingPartitionMaybe :: LatticePath -> Maybe NonCrossing
dyckPathToNonCrossingPartitionMaybe = fmap NonCrossing . go 0 [] [] [] where
go :: Int -> [Int] -> [Int] -> [[Int]] -> LatticePath -> Maybe [[Int]]
go !cnt stack small big path =
case path of
(x:xs) -> case x of
UpStep -> let cnt' = cnt + 1 in case xs of
(y:ys) -> case y of
UpStep -> go cnt' (cnt':stack) small big xs
DownStep -> go cnt' (cnt':stack) [] (reverse small : big) xs
[] -> Nothing
DownStep -> case stack of
(k:ks) -> go cnt ks (k:small) big xs
[] -> Nothing
[] -> Just $ tail $ reverse (reverse small : big)
-- | The inverse bijection (should never fail proper 'NonCrossing'-s)
| 824 | dyckPathToNonCrossingPartitionMaybe :: LatticePath -> Maybe NonCrossing
dyckPathToNonCrossingPartitionMaybe = fmap NonCrossing . go 0 [] [] [] where
go :: Int -> [Int] -> [Int] -> [[Int]] -> LatticePath -> Maybe [[Int]]
go !cnt stack small big path =
case path of
(x:xs) -> case x of
UpStep -> let cnt' = cnt + 1 in case xs of
(y:ys) -> case y of
UpStep -> go cnt' (cnt':stack) small big xs
DownStep -> go cnt' (cnt':stack) [] (reverse small : big) xs
[] -> Nothing
DownStep -> case stack of
(k:ks) -> go cnt ks (k:small) big xs
[] -> Nothing
[] -> Just $ tail $ reverse (reverse small : big)
-- | The inverse bijection (should never fail proper 'NonCrossing'-s) | 823 | dyckPathToNonCrossingPartitionMaybe = fmap NonCrossing . go 0 [] [] [] where
go :: Int -> [Int] -> [Int] -> [[Int]] -> LatticePath -> Maybe [[Int]]
go !cnt stack small big path =
case path of
(x:xs) -> case x of
UpStep -> let cnt' = cnt + 1 in case xs of
(y:ys) -> case y of
UpStep -> go cnt' (cnt':stack) small big xs
DownStep -> go cnt' (cnt':stack) [] (reverse small : big) xs
[] -> Nothing
DownStep -> case stack of
(k:ks) -> go cnt ks (k:small) big xs
[] -> Nothing
[] -> Just $ tail $ reverse (reverse small : big)
-- | The inverse bijection (should never fail proper 'NonCrossing'-s) | 751 | false | true | 0 | 24 | 285 | 315 | 160 | 155 | null | null |
sdiehl/ghc | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | bsd-3-clause | -- Similar to MO_{Add,Sub}IntC, but MO_Add2 expects the first element of the
-- return tuple to be the overflow bit and the second element to contain the
-- actual result of the addition. So we still use genCallWithOverflow but swap
-- the return registers.
genCall t@(PrimTarget (MO_Add2 w)) [dstO, dstV] [lhs, rhs] =
genCallWithOverflow t w [dstV, dstO] [lhs, rhs] | 370 | genCall t@(PrimTarget (MO_Add2 w)) [dstO, dstV] [lhs, rhs] =
genCallWithOverflow t w [dstV, dstO] [lhs, rhs] | 112 | genCall t@(PrimTarget (MO_Add2 w)) [dstO, dstV] [lhs, rhs] =
genCallWithOverflow t w [dstV, dstO] [lhs, rhs] | 112 | true | false | 0 | 10 | 63 | 65 | 38 | 27 | null | null |
michaelt/streaming | src/Streaming/Prelude.hs | bsd-3-clause | {-| Strict left scan, accepting a monadic function. It can be used with
'FoldM's from @Control.Foldl@ using 'impurely'. Here we yield
a succession of vectors each recording
>>> let v = L.impurely scanM L.vector $ each [1..4::Int] :: Stream (Of (U.Vector Int)) IO ()
>>> S.print v
fromList []
fromList [1]
fromList [1,2]
fromList [1,2,3]
fromList [1,2,3,4]
-}
scanM :: Monad m => (x -> a -> m x) -> m x -> (x -> m b) -> Stream (Of a) m r -> Stream (Of b) m r
scanM step begin done str = Effect $ do
x <- begin
b <- done x
return (Step (b :> loop x str))
where
loop !x stream = case stream of -- note we have already yielded from x
Return r -> Return r
Effect m -> Effect (do
stream' <- m
return (loop x stream')
)
Step (a :> rest) -> Effect (do
x' <- step x a
b <- done x'
return (Step (b :> loop x' rest))
)
| 916 | scanM :: Monad m => (x -> a -> m x) -> m x -> (x -> m b) -> Stream (Of a) m r -> Stream (Of b) m r
scanM step begin done str = Effect $ do
x <- begin
b <- done x
return (Step (b :> loop x str))
where
loop !x stream = case stream of -- note we have already yielded from x
Return r -> Return r
Effect m -> Effect (do
stream' <- m
return (loop x stream')
)
Step (a :> rest) -> Effect (do
x' <- step x a
b <- done x'
return (Step (b :> loop x' rest))
)
| 546 | scanM step begin done str = Effect $ do
x <- begin
b <- done x
return (Step (b :> loop x str))
where
loop !x stream = case stream of -- note we have already yielded from x
Return r -> Return r
Effect m -> Effect (do
stream' <- m
return (loop x stream')
)
Step (a :> rest) -> Effect (do
x' <- step x a
b <- done x'
return (Step (b :> loop x' rest))
)
| 447 | true | true | 0 | 17 | 278 | 276 | 128 | 148 | null | null |
a-suenami/yesod-sample | Handler/Blog.hs | mit | -- The view showing the list of articles
getBlogR :: Handler Html
getBlogR = do
-- Get the list of articles inside the database.
articles <- runDB $ selectList [] [Desc ArticleTitle]
-- We'll need the two "objects": articleWidget and enctype
-- to construct the form (see templates/articles.hamlet).
(articleWidget, enctype) <- generateFormPost entryForm
defaultLayout $ do
$(widgetFile "articles") | 430 | getBlogR :: Handler Html
getBlogR = do
-- Get the list of articles inside the database.
articles <- runDB $ selectList [] [Desc ArticleTitle]
-- We'll need the two "objects": articleWidget and enctype
-- to construct the form (see templates/articles.hamlet).
(articleWidget, enctype) <- generateFormPost entryForm
defaultLayout $ do
$(widgetFile "articles") | 389 | getBlogR = do
-- Get the list of articles inside the database.
articles <- runDB $ selectList [] [Desc ArticleTitle]
-- We'll need the two "objects": articleWidget and enctype
-- to construct the form (see templates/articles.hamlet).
(articleWidget, enctype) <- generateFormPost entryForm
defaultLayout $ do
$(widgetFile "articles") | 364 | true | true | 0 | 12 | 89 | 75 | 37 | 38 | null | null |
edsko/cabal | Cabal/src/Distribution/Simple/GHC.hs | bsd-3-clause | registerPackage
:: Verbosity
-> ProgramConfiguration
-> Bool
-> PackageDBStack
-> InstalledPackageInfo
-> IO ()
registerPackage verbosity progdb multiInstance packageDbs installedPkgInfo
| multiInstance
= HcPkg.registerMultiInstance (hcPkgInfo progdb) verbosity
packageDbs installedPkgInfo
| otherwise
= HcPkg.reregister (hcPkgInfo progdb) verbosity
packageDbs (Right installedPkgInfo) | 418 | registerPackage
:: Verbosity
-> ProgramConfiguration
-> Bool
-> PackageDBStack
-> InstalledPackageInfo
-> IO ()
registerPackage verbosity progdb multiInstance packageDbs installedPkgInfo
| multiInstance
= HcPkg.registerMultiInstance (hcPkgInfo progdb) verbosity
packageDbs installedPkgInfo
| otherwise
= HcPkg.reregister (hcPkgInfo progdb) verbosity
packageDbs (Right installedPkgInfo) | 418 | registerPackage verbosity progdb multiInstance packageDbs installedPkgInfo
| multiInstance
= HcPkg.registerMultiInstance (hcPkgInfo progdb) verbosity
packageDbs installedPkgInfo
| otherwise
= HcPkg.reregister (hcPkgInfo progdb) verbosity
packageDbs (Right installedPkgInfo) | 294 | false | true | 0 | 12 | 71 | 109 | 49 | 60 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 4139 = 4138 | 11 | 4139 = 4138 | 11 | 4139 = 4138 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
VictorDenisov/openjdb | Main.hs | gpl-2.0 | cmdArgsErrMsg :: [String] -> String
cmdArgsErrMsg errors =
"There are errors in command args parsing:\n\n"
++ concat errors | 131 | cmdArgsErrMsg :: [String] -> String
cmdArgsErrMsg errors =
"There are errors in command args parsing:\n\n"
++ concat errors | 131 | cmdArgsErrMsg errors =
"There are errors in command args parsing:\n\n"
++ concat errors | 95 | false | true | 2 | 6 | 25 | 29 | 14 | 15 | null | null |
upsoft/bond | compiler/Main.hs | mit | setJobs (Just n)
| n > 0 = setNumCapabilities n
| otherwise = do
numProc <- getNumProcessors
-- if n is less than 0 use that many fewer jobs than processors
setNumCapabilities $ max 1 (numProc + n) | 233 | setJobs (Just n)
| n > 0 = setNumCapabilities n
| otherwise = do
numProc <- getNumProcessors
-- if n is less than 0 use that many fewer jobs than processors
setNumCapabilities $ max 1 (numProc + n) | 233 | setJobs (Just n)
| n > 0 = setNumCapabilities n
| otherwise = do
numProc <- getNumProcessors
-- if n is less than 0 use that many fewer jobs than processors
setNumCapabilities $ max 1 (numProc + n) | 233 | false | false | 1 | 11 | 73 | 64 | 29 | 35 | null | null |
JPMoresmau/reactive-banana-sdl | src/Reactive/Banana/SDL/Util.hs | gpl-3.0 | -- | fire the event from an Event Source
fire :: EventSource a -> a -> IO ()
fire = snd | 87 | fire :: EventSource a -> a -> IO ()
fire = snd | 46 | fire = snd | 10 | true | true | 0 | 8 | 20 | 28 | 14 | 14 | null | null |
bananu7/Hate | src/Hate/Common/Scheduler.hs | mit | after :: Time -> Hate us () -> Hate us (ScheduledEvent us)
after t a = do
currentTime <- UnsafeHate $ gets lastUpdateTime
return $ OneTimeEvent (t + currentTime) a
-- |This is a main way to update the scheduler and run appropriate events.
-- Typically you'll want to be running it every update. | 309 | after :: Time -> Hate us () -> Hate us (ScheduledEvent us)
after t a = do
currentTime <- UnsafeHate $ gets lastUpdateTime
return $ OneTimeEvent (t + currentTime) a
-- |This is a main way to update the scheduler and run appropriate events.
-- Typically you'll want to be running it every update. | 308 | after t a = do
currentTime <- UnsafeHate $ gets lastUpdateTime
return $ OneTimeEvent (t + currentTime) a
-- |This is a main way to update the scheduler and run appropriate events.
-- Typically you'll want to be running it every update. | 249 | false | true | 0 | 10 | 68 | 77 | 37 | 40 | null | null |
seereason/ghcjs | src/Compiler/GhciTags.hs | mit | -- get tag info, for later translation into Vim or Emacs style
tagInfo :: DynFlags -> PrintUnqualified -> Bool -> Char -> Name -> RealSrcLoc
-> TagInfo
tagInfo dflags unqual exported kind name loc
= TagInfo exported kind
(showSDocForUser dflags unqual $ pprOccName (nameOccName name))
(showSDocForUser dflags unqual $ ftext (srcLocFile loc))
(srcLocLine loc) (srcLocCol loc) Nothing | 418 | tagInfo :: DynFlags -> PrintUnqualified -> Bool -> Char -> Name -> RealSrcLoc
-> TagInfo
tagInfo dflags unqual exported kind name loc
= TagInfo exported kind
(showSDocForUser dflags unqual $ pprOccName (nameOccName name))
(showSDocForUser dflags unqual $ ftext (srcLocFile loc))
(srcLocLine loc) (srcLocCol loc) Nothing | 355 | tagInfo dflags unqual exported kind name loc
= TagInfo exported kind
(showSDocForUser dflags unqual $ pprOccName (nameOccName name))
(showSDocForUser dflags unqual $ ftext (srcLocFile loc))
(srcLocLine loc) (srcLocCol loc) Nothing | 258 | true | true | 0 | 10 | 92 | 118 | 58 | 60 | null | null |
lancelotsix/hs-tls | core/Network/TLS/Util/Serialization.hs | bsd-3-clause | lengthBytes :: Integer -> Int
lengthBytes = numBytes | 52 | lengthBytes :: Integer -> Int
lengthBytes = numBytes | 52 | lengthBytes = numBytes | 22 | false | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
glutamate/probably-base | Math/Probably/StochFun.hs | bsd-3-clause | mvSampler :: Prob a -> Markov a
mvSampler sam = Mrkv (sampler sam) undefined id | 79 | mvSampler :: Prob a -> Markov a
mvSampler sam = Mrkv (sampler sam) undefined id | 79 | mvSampler sam = Mrkv (sampler sam) undefined id | 47 | false | true | 0 | 7 | 14 | 37 | 17 | 20 | null | null |
prashant007/AMPL | myAMPL/src/MyParser/InterpretAMPL.hs | mit | look_up_translation:: TRANSLATION -> String -> (Int,POLARITY)
look_up_translation [] str = error ("Channel name <"++str++"> not in scope") | 138 | look_up_translation:: TRANSLATION -> String -> (Int,POLARITY)
look_up_translation [] str = error ("Channel name <"++str++"> not in scope") | 138 | look_up_translation [] str = error ("Channel name <"++str++"> not in scope") | 76 | false | true | 0 | 8 | 16 | 46 | 24 | 22 | null | null |
EXio4/zyw-pl | src/Parser.hs | mit | sassig :: Parser Statement
sassig =
Sassig <$> variable
<*> (assigOp *> expr) | 92 | sassig :: Parser Statement
sassig =
Sassig <$> variable
<*> (assigOp *> expr) | 92 | sassig =
Sassig <$> variable
<*> (assigOp *> expr) | 65 | false | true | 0 | 7 | 27 | 29 | 15 | 14 | null | null |
diku-dk/futhark | src/Futhark/Test/Spec.hs | isc | parseNatural :: Parser () -> Parser Int
parseNatural sep =
lexeme sep $ foldl' addDigit 0 . map num <$> some digitChar
where
addDigit acc x = acc * 10 + x
num c = ord c - ord '0' | 190 | parseNatural :: Parser () -> Parser Int
parseNatural sep =
lexeme sep $ foldl' addDigit 0 . map num <$> some digitChar
where
addDigit acc x = acc * 10 + x
num c = ord c - ord '0' | 190 | parseNatural sep =
lexeme sep $ foldl' addDigit 0 . map num <$> some digitChar
where
addDigit acc x = acc * 10 + x
num c = ord c - ord '0' | 150 | false | true | 8 | 8 | 51 | 109 | 42 | 67 | null | null |
fmapfmapfmap/amazonka | amazonka-elb/gen/Network/AWS/ELB/DeregisterInstancesFromLoadBalancer.hs | mpl-2.0 | -- | The name of the load balancer.
diflbLoadBalancerName :: Lens' DeregisterInstancesFromLoadBalancer Text
diflbLoadBalancerName = lens _diflbLoadBalancerName (\ s a -> s{_diflbLoadBalancerName = a}) | 200 | diflbLoadBalancerName :: Lens' DeregisterInstancesFromLoadBalancer Text
diflbLoadBalancerName = lens _diflbLoadBalancerName (\ s a -> s{_diflbLoadBalancerName = a}) | 164 | diflbLoadBalancerName = lens _diflbLoadBalancerName (\ s a -> s{_diflbLoadBalancerName = a}) | 92 | true | true | 0 | 9 | 23 | 40 | 22 | 18 | null | null |
chrislewis/PropDoc | src/PropDoc/Core.hs | mit | splitOn cur acc d (x:xs) =
if x == d then splitOn "" (reverse cur : acc) d xs
else splitOn (x:cur) acc d xs | 111 | splitOn cur acc d (x:xs) =
if x == d then splitOn "" (reverse cur : acc) d xs
else splitOn (x:cur) acc d xs | 111 | splitOn cur acc d (x:xs) =
if x == d then splitOn "" (reverse cur : acc) d xs
else splitOn (x:cur) acc d xs | 111 | false | false | 0 | 9 | 28 | 70 | 35 | 35 | null | null |
ttylec/QLogic | src/QLogic/Poset.hs | gpl-3.0 | -- | Unsafe greatest lower bound (assumes that it exists).
unsafeInfIn :: POrdStruct p a => p -> a -> a -> a
unsafeInfIn poset a b = fromJust $ infIn poset a b | 159 | unsafeInfIn :: POrdStruct p a => p -> a -> a -> a
unsafeInfIn poset a b = fromJust $ infIn poset a b | 100 | unsafeInfIn poset a b = fromJust $ infIn poset a b | 50 | true | true | 0 | 8 | 33 | 56 | 26 | 30 | null | null |
keithodulaigh/Hets | CspCASL/SignCSP.hs | gpl-2.0 | relatedProcs :: CspCASLSign -> ProcProfile -> ProcProfile -> Bool
relatedProcs sig (ProcProfile l1 al1) (ProcProfile l2 al2) =
length l1 == length l2 &&
and (zipWith (relatedSorts sig) l1 l2)
&& relatedCommAlpha sig al1 al2 | 233 | relatedProcs :: CspCASLSign -> ProcProfile -> ProcProfile -> Bool
relatedProcs sig (ProcProfile l1 al1) (ProcProfile l2 al2) =
length l1 == length l2 &&
and (zipWith (relatedSorts sig) l1 l2)
&& relatedCommAlpha sig al1 al2 | 233 | relatedProcs sig (ProcProfile l1 al1) (ProcProfile l2 al2) =
length l1 == length l2 &&
and (zipWith (relatedSorts sig) l1 l2)
&& relatedCommAlpha sig al1 al2 | 167 | false | true | 4 | 11 | 44 | 80 | 39 | 41 | null | null |
Hrothen/dorfCAD | src/Main.hs | mit | go :: L.ByteString -> L.ByteString -> [B.ByteString] -> Opts -> Either String [Blueprint]
go alias config imgFiles opts = do
dict <- constructDict alias config
imgStrs <- mapM decodeImage imgFiles
sequence $ convertpngs reps startPos imgStrs phaseList dict
where
startPos = start opts
phaseList = phases opts
reps = repeat opts
{-toTup ls | null ls = Nothing
| length ls /= 2 = Nothing
| otherwise = Just (head ls,last ls)
-} | 495 | go :: L.ByteString -> L.ByteString -> [B.ByteString] -> Opts -> Either String [Blueprint]
go alias config imgFiles opts = do
dict <- constructDict alias config
imgStrs <- mapM decodeImage imgFiles
sequence $ convertpngs reps startPos imgStrs phaseList dict
where
startPos = start opts
phaseList = phases opts
reps = repeat opts
{-toTup ls | null ls = Nothing
| length ls /= 2 = Nothing
| otherwise = Just (head ls,last ls)
-} | 495 | go alias config imgFiles opts = do
dict <- constructDict alias config
imgStrs <- mapM decodeImage imgFiles
sequence $ convertpngs reps startPos imgStrs phaseList dict
where
startPos = start opts
phaseList = phases opts
reps = repeat opts
{-toTup ls | null ls = Nothing
| length ls /= 2 = Nothing
| otherwise = Just (head ls,last ls)
-} | 405 | false | true | 2 | 10 | 142 | 123 | 59 | 64 | null | null |
elitak/forest | Language/Forest/Shell.hs | epl-1.0 | execShellCmdWithXArgs :: (ForestMD md) => md -> String -> IO String
execShellCmdWithXArgs md cmd = execShellCmdWithXArgs' (listNonEmptyFiles md) cmd | 152 | execShellCmdWithXArgs :: (ForestMD md) => md -> String -> IO String
execShellCmdWithXArgs md cmd = execShellCmdWithXArgs' (listNonEmptyFiles md) cmd | 152 | execShellCmdWithXArgs md cmd = execShellCmdWithXArgs' (listNonEmptyFiles md) cmd | 84 | false | true | 0 | 8 | 22 | 47 | 23 | 24 | null | null |
mpickering/hlint | data/HLint_QuickCheck.hs | bsd-3-clause | a ==> b = Test False a b | 24 | a ==> b = Test False a b | 24 | a ==> b = Test False a b | 24 | false | false | 0 | 5 | 7 | 25 | 9 | 16 | null | null |
phaul/chess | Test/Perft/Main.hs | bsd-3-clause | ruyLopezPerftResult 4 = 1322527 | 36 | ruyLopezPerftResult 4 = 1322527 | 36 | ruyLopezPerftResult 4 = 1322527 | 36 | false | false | 0 | 5 | 8 | 9 | 4 | 5 | null | null |
JacksonGariety/euler.hs | 055.hs | bsd-3-clause | main :: IO ()
main = print . length . filter isLychrel $ [1..9999] | 66 | main :: IO ()
main = print . length . filter isLychrel $ [1..9999] | 66 | main = print . length . filter isLychrel $ [1..9999] | 52 | false | true | 0 | 7 | 13 | 36 | 18 | 18 | null | null |
pack-it-forms/msgfmt | src/PackItForms/MsgFmt.hs | apache-2.0 | parse :: String -> MsgFmt
parse p = MsgFmt (parseEnv p) (parseMap M.empty "" $ stripUnnecessary p) $ T.pack p | 111 | parse :: String -> MsgFmt
parse p = MsgFmt (parseEnv p) (parseMap M.empty "" $ stripUnnecessary p) $ T.pack p | 111 | parse p = MsgFmt (parseEnv p) (parseMap M.empty "" $ stripUnnecessary p) $ T.pack p | 83 | false | true | 0 | 10 | 21 | 55 | 26 | 29 | null | null |
beni55/haste-compiler | libraries/ghc-7.10/base/GHC/Event/PSQ.hs | bsd-3-clause | minView (Winner e t m) = Just (e, secondBest t m) | 49 | minView (Winner e t m) = Just (e, secondBest t m) | 49 | minView (Winner e t m) = Just (e, secondBest t m) | 49 | false | false | 0 | 7 | 10 | 34 | 16 | 18 | null | null |
kawu/french-tag | src/NLP/Partage4Xmg/Lexicon.hs | bsd-2-clause | getFamName :: L.Text -> Family
getFamName x = case L.stripPrefix "family[@name=" x of
Nothing -> error "getFamName: wrong prefix"
Just y -> case L.stripSuffix "]" y of
Nothing -> error "getFamName: wrong suffix"
Just z -> L.toStrict z
-- | Parse textual contents of the French TAG XML file. | 318 | getFamName :: L.Text -> Family
getFamName x = case L.stripPrefix "family[@name=" x of
Nothing -> error "getFamName: wrong prefix"
Just y -> case L.stripSuffix "]" y of
Nothing -> error "getFamName: wrong suffix"
Just z -> L.toStrict z
-- | Parse textual contents of the French TAG XML file. | 318 | getFamName x = case L.stripPrefix "family[@name=" x of
Nothing -> error "getFamName: wrong prefix"
Just y -> case L.stripSuffix "]" y of
Nothing -> error "getFamName: wrong suffix"
Just z -> L.toStrict z
-- | Parse textual contents of the French TAG XML file. | 287 | false | true | 0 | 12 | 76 | 84 | 39 | 45 | null | null |
haskellGardener/yusic | src/Yusic.hs | mit | fromOctave 6 = C6:Cs_Db6:D6:Ds_Eb6:E6:F6:Fs_Gb6:G6:Gs_Ab6:A6:As_Bb6:B6 :[] | 74 | fromOctave 6 = C6:Cs_Db6:D6:Ds_Eb6:E6:F6:Fs_Gb6:G6:Gs_Ab6:A6:As_Bb6:B6 :[] | 74 | fromOctave 6 = C6:Cs_Db6:D6:Ds_Eb6:E6:F6:Fs_Gb6:G6:Gs_Ab6:A6:As_Bb6:B6 :[] | 74 | false | false | 0 | 16 | 4 | 59 | 29 | 30 | null | null |
wangbj/excises | e292.hs | bsd-3-clause | main :: IO ()
main = hspec $ do
describe "pass all initial test cases" $ do
it "all success.." $ do
and (map (\(i, o) -> parseRangedInts i == o) testcases) `shouldBe` True | 183 | main :: IO ()
main = hspec $ do
describe "pass all initial test cases" $ do
it "all success.." $ do
and (map (\(i, o) -> parseRangedInts i == o) testcases) `shouldBe` True | 183 | main = hspec $ do
describe "pass all initial test cases" $ do
it "all success.." $ do
and (map (\(i, o) -> parseRangedInts i == o) testcases) `shouldBe` True | 169 | false | true | 0 | 21 | 45 | 81 | 40 | 41 | null | null |
dschalk/score | Haskell/old_stuff/Fmod5.hs | mit | scoreDiv :: (Eq a, Fractional a) => a -> a -> a
scoreDiv az bz | bz == 0 = 99999
| otherwise = (/) az bz | 123 | scoreDiv :: (Eq a, Fractional a) => a -> a -> a
scoreDiv az bz | bz == 0 = 99999
| otherwise = (/) az bz | 123 | scoreDiv az bz | bz == 0 = 99999
| otherwise = (/) az bz | 75 | false | true | 0 | 8 | 45 | 65 | 32 | 33 | null | null |
jsl/RunnyBabbot | src/RunnyBabbot/Spoonerize.hs | mit | swapWordBeginnings :: (Word, Word) -> (Word, Word)
swapWordBeginnings (wordA, wordB) =
(wordBeginning bCaseFlipped ++ wordEnding wordA,
wordBeginning aCaseFlipped ++ wordEnding wordB)
where (aCaseFlipped, bCaseFlipped) = swapWordCase (wordA, wordB) | 261 | swapWordBeginnings :: (Word, Word) -> (Word, Word)
swapWordBeginnings (wordA, wordB) =
(wordBeginning bCaseFlipped ++ wordEnding wordA,
wordBeginning aCaseFlipped ++ wordEnding wordB)
where (aCaseFlipped, bCaseFlipped) = swapWordCase (wordA, wordB) | 261 | swapWordBeginnings (wordA, wordB) =
(wordBeginning bCaseFlipped ++ wordEnding wordA,
wordBeginning aCaseFlipped ++ wordEnding wordB)
where (aCaseFlipped, bCaseFlipped) = swapWordCase (wordA, wordB) | 210 | false | true | 0 | 7 | 40 | 90 | 47 | 43 | null | null |
andrewthad/yesod-bootstrap | src/Yesod/Bootstrap.hs | mit | checkbox :: WidgetT site IO () -> WidgetT site IO ()
checkbox = div_ [("class","checkbox")] | 91 | checkbox :: WidgetT site IO () -> WidgetT site IO ()
checkbox = div_ [("class","checkbox")] | 91 | checkbox = div_ [("class","checkbox")] | 38 | false | true | 0 | 8 | 14 | 50 | 24 | 26 | null | null |
Lainepress/hledger | hledger-lib/Hledger/Data/Journal.hs | gpl-3.0 | -- | Calculate the account tree and all account balances from a journal's
-- postings, returning the results for efficient lookup.
journalAccountInfo :: Journal -> (Tree AccountName, Map.Map AccountName Account)
journalAccountInfo j = (ant, amap)
where
(ant, psof, _, inclbalof) = (groupPostings . journalPostings) j
amap = Map.fromList [(a, acctinfo a) | a <- flatten ant]
acctinfo a = Account a (psof a) (inclbalof a)
-- | Given a list of postings, return an account name tree and three query
-- functions that fetch postings, subaccount-excluding-balance and
-- subaccount-including-balance by account name. | 633 | journalAccountInfo :: Journal -> (Tree AccountName, Map.Map AccountName Account)
journalAccountInfo j = (ant, amap)
where
(ant, psof, _, inclbalof) = (groupPostings . journalPostings) j
amap = Map.fromList [(a, acctinfo a) | a <- flatten ant]
acctinfo a = Account a (psof a) (inclbalof a)
-- | Given a list of postings, return an account name tree and three query
-- functions that fetch postings, subaccount-excluding-balance and
-- subaccount-including-balance by account name. | 502 | journalAccountInfo j = (ant, amap)
where
(ant, psof, _, inclbalof) = (groupPostings . journalPostings) j
amap = Map.fromList [(a, acctinfo a) | a <- flatten ant]
acctinfo a = Account a (psof a) (inclbalof a)
-- | Given a list of postings, return an account name tree and three query
-- functions that fetch postings, subaccount-excluding-balance and
-- subaccount-including-balance by account name. | 421 | true | true | 2 | 9 | 114 | 134 | 73 | 61 | null | null |
nevrenato/HetsAlloy | CommonLogic/Analysis.hs | gpl-2.0 | retrieveBasicItem :: Sign.Sign -> AS_Anno.Annoted AS.BASIC_ITEMS -> Sign.Sign
retrieveBasicItem sig x = case AS_Anno.item x of
AS.Axiom_items xs -> List.foldl retrieveSign sig xs | 206 | retrieveBasicItem :: Sign.Sign -> AS_Anno.Annoted AS.BASIC_ITEMS -> Sign.Sign
retrieveBasicItem sig x = case AS_Anno.item x of
AS.Axiom_items xs -> List.foldl retrieveSign sig xs | 206 | retrieveBasicItem sig x = case AS_Anno.item x of
AS.Axiom_items xs -> List.foldl retrieveSign sig xs | 128 | false | true | 0 | 9 | 50 | 64 | 30 | 34 | null | null |
fffej/haskellprojects | ants/AntsVis.hs | bsd-2-clause | -- what is the S from Graphics.UI.Glut?
antInfo SW = (0,4,4,0) | 62 | antInfo SW = (0,4,4,0) | 22 | antInfo SW = (0,4,4,0) | 22 | true | false | 1 | 5 | 10 | 25 | 13 | 12 | null | null |
silky/csound-expression | src/Csound/Control/Overload/MidiInstr.hs | bsd-3-clause | sig2 :: Msg -> (Sig, Sig)
sig2 msg = (sig amp, sig cps)
where (amp, cps) = ampCps msg | 89 | sig2 :: Msg -> (Sig, Sig)
sig2 msg = (sig amp, sig cps)
where (amp, cps) = ampCps msg | 89 | sig2 msg = (sig amp, sig cps)
where (amp, cps) = ampCps msg | 63 | false | true | 0 | 8 | 22 | 59 | 29 | 30 | null | null |
mishun/tangles | src/Math/Topology/KnotTh/Tangle/TangleDef.hs | lgpl-3.0 | lonerUnderCrossing = lonerTangle UnderCrossing | 46 | lonerUnderCrossing = lonerTangle UnderCrossing | 46 | lonerUnderCrossing = lonerTangle UnderCrossing | 46 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
shlevy/ghc | compiler/deSugar/DsUtils.hs | bsd-3-clause | selectMatchVar (VarPat var) = return (localiseId (unLoc var)) | 62 | selectMatchVar (VarPat var) = return (localiseId (unLoc var)) | 62 | selectMatchVar (VarPat var) = return (localiseId (unLoc var)) | 62 | false | false | 0 | 9 | 8 | 30 | 14 | 16 | null | null |
ddssff/lens | src/Control/Exception/Lens.hs | bsd-3-clause | _DivideByZero :: AsArithException t => Prism' t ()
_DivideByZero = _ArithException . dimap seta (either id id) . right' . rmap (DivideByZero <$) where
seta DivideByZero = Right ()
seta t = Left (pure t)
| 215 | _DivideByZero :: AsArithException t => Prism' t ()
_DivideByZero = _ArithException . dimap seta (either id id) . right' . rmap (DivideByZero <$) where
seta DivideByZero = Right ()
seta t = Left (pure t)
| 215 | _DivideByZero = _ArithException . dimap seta (either id id) . right' . rmap (DivideByZero <$) where
seta DivideByZero = Right ()
seta t = Left (pure t)
| 164 | false | true | 0 | 10 | 47 | 88 | 43 | 45 | null | null |
passy/psc-ide | lib/Purescript/Ide/Externs.hs | bsd-3-clause | parseFunctionDecl :: Parser ExternDecl
parseFunctionDecl = do
string "foreign import"
spaces
(name, type') <- parseType
eof
return (FunctionDecl (T.pack name) (T.pack type')) | 194 | parseFunctionDecl :: Parser ExternDecl
parseFunctionDecl = do
string "foreign import"
spaces
(name, type') <- parseType
eof
return (FunctionDecl (T.pack name) (T.pack type')) | 194 | parseFunctionDecl = do
string "foreign import"
spaces
(name, type') <- parseType
eof
return (FunctionDecl (T.pack name) (T.pack type')) | 155 | false | true | 0 | 12 | 41 | 69 | 32 | 37 | null | null |
elieux/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | functorClassName = clsQual gHC_BASE (fsLit "Functor") functorClassKey | 73 | functorClassName = clsQual gHC_BASE (fsLit "Functor") functorClassKey | 73 | functorClassName = clsQual gHC_BASE (fsLit "Functor") functorClassKey | 73 | false | false | 0 | 7 | 10 | 19 | 9 | 10 | null | null |
PelleJuul/popl | src/Generator/Expression.hs | mit | generateExpr (CallExpr c) = "popl_" ++ (generateCall c) | 55 | generateExpr (CallExpr c) = "popl_" ++ (generateCall c) | 55 | generateExpr (CallExpr c) = "popl_" ++ (generateCall c) | 55 | false | false | 0 | 7 | 7 | 25 | 12 | 13 | null | null |
kwibus/myLang | tests/GenState.hs | bsd-3-clause | disableFromEnv :: Bound -> GenState n -> GenState n
disableFromEnv b s@State {tEnv = env } = s{tEnv = bDelete b env} | 116 | disableFromEnv :: Bound -> GenState n -> GenState n
disableFromEnv b s@State {tEnv = env } = s{tEnv = bDelete b env} | 116 | disableFromEnv b s@State {tEnv = env } = s{tEnv = bDelete b env} | 64 | false | true | 4 | 8 | 21 | 61 | 29 | 32 | null | null |
energyflowanalysis/efa-2.1 | src/EFA/Data/Record.hs | bsd-3-clause | mapWithTime :: (DV.Walker (NE (NE vec)),DV.Walker vec,
DV.Storage vec (Ord.Data a, vec1 a),
DV.Walker vec1, DV.Storage vec1 a)=>
(Ord.Data a -> a -> a) -> Record vec vec1 a -> Record vec vec1 a
mapWithTime f (Record rec) = Record $ DV.map (\(t,vec) -> (t,DV.map (f t) vec)) rec | 300 | mapWithTime :: (DV.Walker (NE (NE vec)),DV.Walker vec,
DV.Storage vec (Ord.Data a, vec1 a),
DV.Walker vec1, DV.Storage vec1 a)=>
(Ord.Data a -> a -> a) -> Record vec vec1 a -> Record vec vec1 a
mapWithTime f (Record rec) = Record $ DV.map (\(t,vec) -> (t,DV.map (f t) vec)) rec | 300 | mapWithTime f (Record rec) = Record $ DV.map (\(t,vec) -> (t,DV.map (f t) vec)) rec | 83 | false | true | 0 | 12 | 71 | 177 | 90 | 87 | null | null |
dimara/ganeti | src/Ganeti/Types.hs | bsd-2-clause | -- FIXME: this should check that 'address' is a valid ip
mkIPv4Address :: Monad m => String -> m IPv4Address
mkIPv4Address address =
return IPv4Address { fromIPv4Address = address } | 183 | mkIPv4Address :: Monad m => String -> m IPv4Address
mkIPv4Address address =
return IPv4Address { fromIPv4Address = address } | 126 | mkIPv4Address address =
return IPv4Address { fromIPv4Address = address } | 74 | true | true | 0 | 8 | 31 | 48 | 22 | 26 | null | null |
delta4d/codewars | kata/befunge-interpreter/Befunge93.hs | mit | pop_v (Inter g dir pos code (a:st) o) = (if a == 0 then move_down else move_up) (Inter g dir pos code st o) | 107 | pop_v (Inter g dir pos code (a:st) o) = (if a == 0 then move_down else move_up) (Inter g dir pos code st o) | 107 | pop_v (Inter g dir pos code (a:st) o) = (if a == 0 then move_down else move_up) (Inter g dir pos code st o) | 107 | false | false | 0 | 8 | 23 | 67 | 34 | 33 | null | null |
olsner/ghc | libraries/base/GHC/Ptr.hs | bsd-3-clause | -- |Given an arbitrary address and an alignment constraint,
-- 'alignPtr' yields the next higher address that fulfills the
-- alignment constraint. An alignment constraint @x@ is fulfilled by
-- any address divisible by @x@. This operation is idempotent.
alignPtr :: Ptr a -> Int -> Ptr a
alignPtr addr@(Ptr a) (I# i)
= case remAddr# a i of {
0# -> addr;
n -> Ptr (plusAddr# a (i -# n)) } | 404 | alignPtr :: Ptr a -> Int -> Ptr a
alignPtr addr@(Ptr a) (I# i)
= case remAddr# a i of {
0# -> addr;
n -> Ptr (plusAddr# a (i -# n)) } | 147 | alignPtr addr@(Ptr a) (I# i)
= case remAddr# a i of {
0# -> addr;
n -> Ptr (plusAddr# a (i -# n)) } | 113 | true | true | 0 | 12 | 87 | 91 | 48 | 43 | null | null |
KommuSoft/dep-software | Dep.Algorithms.Cpu.hs | gpl-3.0 | --116
insOperation Ne = [T,F,T,F,T] | 37 | insOperation Ne = [T,F,T,F,T] | 31 | insOperation Ne = [T,F,T,F,T] | 31 | true | false | 0 | 5 | 6 | 25 | 15 | 10 | null | null |
gafiatulin/codewars | src/8 kyu/ExclMark1.hs | mit | remove "!" = "" | 15 | remove "!" = "" | 15 | remove "!" = "" | 15 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
justinethier/husk-scheme | hs-src/Language/Scheme/Numerical.hs | mit | numRealPart [n@(Number _)] = return n | 37 | numRealPart [n@(Number _)] = return n | 37 | numRealPart [n@(Number _)] = return n | 37 | false | false | 0 | 9 | 5 | 24 | 12 | 12 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/nativeGen/SPARC/CodeGen/Expand.hs | bsd-3-clause | -- Can't take high partner for non-low reg.
fRegHi reg
= pprPanic "SPARC.CodeGen.Expand: can't take fRegHi from " (ppr reg) | 131 | fRegHi reg
= pprPanic "SPARC.CodeGen.Expand: can't take fRegHi from " (ppr reg) | 87 | fRegHi reg
= pprPanic "SPARC.CodeGen.Expand: can't take fRegHi from " (ppr reg) | 87 | true | false | 1 | 7 | 27 | 25 | 10 | 15 | null | null |
nayosx/postgrest | src/PostgREST/App.hs | mit | requestedSchema :: Text -> RequestHeaders -> Text
requestedSchema v1schema hdrs =
case verStr of
Just [[_, ver]] -> if ver == "1" then v1schema else cs ver
_ -> v1schema
where verRegex = "version[ ]*=[ ]*([0-9]+)" :: BS.ByteString
accept = cs <$> lookup hAccept hdrs :: Maybe BS.ByteString
verStr = (=~ verRegex) <$> accept :: Maybe [[BS.ByteString]] | 385 | requestedSchema :: Text -> RequestHeaders -> Text
requestedSchema v1schema hdrs =
case verStr of
Just [[_, ver]] -> if ver == "1" then v1schema else cs ver
_ -> v1schema
where verRegex = "version[ ]*=[ ]*([0-9]+)" :: BS.ByteString
accept = cs <$> lookup hAccept hdrs :: Maybe BS.ByteString
verStr = (=~ verRegex) <$> accept :: Maybe [[BS.ByteString]] | 385 | requestedSchema v1schema hdrs =
case verStr of
Just [[_, ver]] -> if ver == "1" then v1schema else cs ver
_ -> v1schema
where verRegex = "version[ ]*=[ ]*([0-9]+)" :: BS.ByteString
accept = cs <$> lookup hAccept hdrs :: Maybe BS.ByteString
verStr = (=~ verRegex) <$> accept :: Maybe [[BS.ByteString]] | 335 | false | true | 10 | 10 | 91 | 131 | 69 | 62 | null | null |
GaloisInc/saw-script | cryptol-saw-core/src/Verifier/SAW/Cryptol/Monadify.hs | bsd-3-clause | -- | Get the kind of a type constructor with kind @k@ applied to type @t@, or
-- return 'Nothing' if the kinds do not line up
applyKind :: MonKind -> MonType -> Maybe MonKind
applyKind (MKFun k1 k2) t
| Just kt <- monTypeKind t
, kt == k1 = Just k2 | 252 | applyKind :: MonKind -> MonType -> Maybe MonKind
applyKind (MKFun k1 k2) t
| Just kt <- monTypeKind t
, kt == k1 = Just k2 | 126 | applyKind (MKFun k1 k2) t
| Just kt <- monTypeKind t
, kt == k1 = Just k2 | 77 | true | true | 0 | 9 | 56 | 64 | 30 | 34 | null | null |
beni55/haste-compiler | libraries/haste-lib/src/Haste/App/Concurrent.hs | bsd-3-clause | -- | Read an MVar without affecting its contents.
-- If the MVar is empty, @peekMVar@ immediately returns @Nothing@.
peekMVar :: C.MVar a -> Client (Maybe a)
peekMVar = liftCIO . C.peekMVar | 191 | peekMVar :: C.MVar a -> Client (Maybe a)
peekMVar = liftCIO . C.peekMVar | 72 | peekMVar = liftCIO . C.peekMVar | 31 | true | true | 1 | 9 | 33 | 44 | 20 | 24 | null | null |
Russell91/pyfi | Python.hs | mit | fromPyObject :: (FromJSON a) => PyObject b -> IO a
fromPyObject (PyObject fr) = do
r2 <- withForeignPtr fr $ \r -> peekCString =<< pyString_AsString r
return $ case mydecode r2 of
Just x -> x
Nothing -> throw $ DecodeException | 264 | fromPyObject :: (FromJSON a) => PyObject b -> IO a
fromPyObject (PyObject fr) = do
r2 <- withForeignPtr fr $ \r -> peekCString =<< pyString_AsString r
return $ case mydecode r2 of
Just x -> x
Nothing -> throw $ DecodeException | 264 | fromPyObject (PyObject fr) = do
r2 <- withForeignPtr fr $ \r -> peekCString =<< pyString_AsString r
return $ case mydecode r2 of
Just x -> x
Nothing -> throw $ DecodeException | 213 | false | true | 0 | 12 | 78 | 103 | 47 | 56 | null | null |
agrafix/Spock | Spock-core/test/Web/Spock/SafeSpec.hs | bsd-3-clause | ctxApp :: SpockT IO ()
ctxApp =
prehook hook $
do
get "test" $ getContext >>= text
post "test" $ getContext >>= text
where
hook =
do
sid <- header "X-ApiKey"
case sid of
Just s -> return s
Nothing -> text "Missing ApiKey" | 287 | ctxApp :: SpockT IO ()
ctxApp =
prehook hook $
do
get "test" $ getContext >>= text
post "test" $ getContext >>= text
where
hook =
do
sid <- header "X-ApiKey"
case sid of
Just s -> return s
Nothing -> text "Missing ApiKey" | 287 | ctxApp =
prehook hook $
do
get "test" $ getContext >>= text
post "test" $ getContext >>= text
where
hook =
do
sid <- header "X-ApiKey"
case sid of
Just s -> return s
Nothing -> text "Missing ApiKey" | 264 | false | true | 3 | 11 | 109 | 109 | 45 | 64 | null | null |
GaloisInc/halvm-ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | readListDefault_RDR = varQual_RDR gHC_READ (fsLit "readListDefault") | 72 | readListDefault_RDR = varQual_RDR gHC_READ (fsLit "readListDefault") | 72 | readListDefault_RDR = varQual_RDR gHC_READ (fsLit "readListDefault") | 72 | false | false | 1 | 7 | 9 | 20 | 8 | 12 | null | null |
MoixaEnergy/blaze-react | src/Text/Blaze/Event.hs | mit | -- Keyboard events
-------------------------------------------------------------------------------
-- | The user has pressed a physical key while the target element was focused.
-- The callback will only be called if this key matches the one of the
-- specified Keycodes.
onKeyDown :: [Keycode] -> act -> Attribute act
onKeyDown keys = onKeyDownM keys . return | 361 | onKeyDown :: [Keycode] -> act -> Attribute act
onKeyDown keys = onKeyDownM keys . return | 88 | onKeyDown keys = onKeyDownM keys . return | 41 | true | true | 0 | 7 | 52 | 40 | 22 | 18 | null | null |
DM2014/pre-homework | src/PreHomework/Parser.hs | mit | user :: Parser UserID
user = string "review/userId: " >> line | 61 | user :: Parser UserID
user = string "review/userId: " >> line | 61 | user = string "review/userId: " >> line | 39 | false | true | 1 | 6 | 10 | 25 | 10 | 15 | null | null |
BartAdv/hoogle | src/General/Util.hs | bsd-3-clause | fromQName (Special Cons) = ":" | 30 | fromQName (Special Cons) = ":" | 30 | fromQName (Special Cons) = ":" | 30 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
dysinger/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/Types.hs | mpl-2.0 | -- | The instance ID.
seInstanceId :: Lens' ServiceError' (Maybe Text)
seInstanceId = lens _seInstanceId (\s a -> s { _seInstanceId = a }) | 138 | seInstanceId :: Lens' ServiceError' (Maybe Text)
seInstanceId = lens _seInstanceId (\s a -> s { _seInstanceId = a }) | 116 | seInstanceId = lens _seInstanceId (\s a -> s { _seInstanceId = a }) | 67 | true | true | 0 | 9 | 23 | 46 | 25 | 21 | null | null |
mmhat/cblrepo | src/PkgDB.hs | apache-2.0 | pkgFlags :: CblPkg -> FlagAssignment
pkgFlags (CP _ (RepoPkg d)) = rpFlags d | 76 | pkgFlags :: CblPkg -> FlagAssignment
pkgFlags (CP _ (RepoPkg d)) = rpFlags d | 76 | pkgFlags (CP _ (RepoPkg d)) = rpFlags d | 39 | false | true | 0 | 11 | 12 | 40 | 18 | 22 | null | null |
andorp/bead | src/Bead/View/DataBridge.hs | bsd-3-clause | parameterFold
:: ((a -> String) -> (String -> Maybe a) -> String -> (String -> String) -> String -> b)
-> Parameter a
-> b
parameterFold f (Parameter encode decode name decodeError notFound) =
f encode decode name decodeError notFound | 242 | parameterFold
:: ((a -> String) -> (String -> Maybe a) -> String -> (String -> String) -> String -> b)
-> Parameter a
-> b
parameterFold f (Parameter encode decode name decodeError notFound) =
f encode decode name decodeError notFound | 242 | parameterFold f (Parameter encode decode name decodeError notFound) =
f encode decode name decodeError notFound | 113 | false | true | 0 | 13 | 47 | 104 | 51 | 53 | null | null |
spinda/liquidhaskell | src/Language/Haskell/Liquid/Constraint/Types.hs | bsd-3-clause | fromListREnv = REnv . M.fromList | 45 | fromListREnv = REnv . M.fromList | 45 | fromListREnv = REnv . M.fromList | 45 | false | false | 0 | 6 | 17 | 12 | 6 | 6 | null | null |
mzini/gubs | src/GUBS/MaxPolynomial.hs | mit | -- * max elimination
splitMax :: (Ord v, IsNat c, SemiRing c) => MaxPoly v c -> [P.Polynomial v c]
splitMax (Var v) = [P.variable v] | 137 | splitMax :: (Ord v, IsNat c, SemiRing c) => MaxPoly v c -> [P.Polynomial v c]
splitMax (Var v) = [P.variable v] | 115 | splitMax (Var v) = [P.variable v] | 36 | true | true | 0 | 9 | 30 | 69 | 35 | 34 | null | null |
mmisamore/directed-cubical | Math/Topology/CubeCmplx/DirCubeCmplx.hs | bsd-3-clause | -- | Test whether vertex is less than another in cubical partial ordering.
vLT :: Vertex -> Vertex -> Bool
vLT v1 v2 = V.all (==True) $ V.zipWith (<=) (coords v1) (coords v2) | 174 | vLT :: Vertex -> Vertex -> Bool
vLT v1 v2 = V.all (==True) $ V.zipWith (<=) (coords v1) (coords v2) | 99 | vLT v1 v2 = V.all (==True) $ V.zipWith (<=) (coords v1) (coords v2) | 67 | true | true | 0 | 8 | 32 | 65 | 33 | 32 | null | null |
peter-fogg/pardoc | src/Text/Pandoc/Readers/TWiki.hs | gpl-2.0 | list :: String -> TWParser B.Blocks
list prefix = choice [ bulletList prefix
, orderedList prefix
, definitionList prefix] | 164 | list :: String -> TWParser B.Blocks
list prefix = choice [ bulletList prefix
, orderedList prefix
, definitionList prefix] | 164 | list prefix = choice [ bulletList prefix
, orderedList prefix
, definitionList prefix] | 128 | false | true | 0 | 8 | 60 | 49 | 22 | 27 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 3816131 = 2749 | 34 | getValueFromProduct 3816131 = 2749 | 34 | getValueFromProduct 3816131 = 2749 | 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
DavidAlphaFox/ghc | utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs | bsd-3-clause | -- type in ParseIface.y in GHC
pREC_CTX = 1 :: Int | 50 | pREC_CTX = 1 :: Int | 19 | pREC_CTX = 1 :: Int | 19 | true | false | 0 | 4 | 10 | 10 | 6 | 4 | null | null |
DNoved1/distill | src/Distill/Expr/TypeCheck.hs | mit | -- | Plural version of 'defineIn'.
definesIn :: [(b, Expr' b)] -> TCM b a -> TCM b a
definesIn newDefs = local (second (newDefs ++)) | 132 | definesIn :: [(b, Expr' b)] -> TCM b a -> TCM b a
definesIn newDefs = local (second (newDefs ++)) | 97 | definesIn newDefs = local (second (newDefs ++)) | 47 | true | true | 3 | 8 | 25 | 58 | 30 | 28 | null | null |
ganeti/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | defaultRbdPool :: String
defaultRbdPool = "rbd" | 47 | defaultRbdPool :: String
defaultRbdPool = "rbd" | 47 | defaultRbdPool = "rbd" | 22 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.