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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
grnet/snf-ganeti | src/Ganeti/OpParams.hs | bsd-2-clause | pDelayInterruptible :: Field
pDelayInterruptible =
withDoc "Allows socket-based interruption of a running OpTestDelay" .
renameField "DelayInterruptible" .
defaultField [| False |] $
simpleField "interruptible" [t| Bool |] | 230 | pDelayInterruptible :: Field
pDelayInterruptible =
withDoc "Allows socket-based interruption of a running OpTestDelay" .
renameField "DelayInterruptible" .
defaultField [| False |] $
simpleField "interruptible" [t| Bool |] | 230 | pDelayInterruptible =
withDoc "Allows socket-based interruption of a running OpTestDelay" .
renameField "DelayInterruptible" .
defaultField [| False |] $
simpleField "interruptible" [t| Bool |] | 201 | false | true | 0 | 8 | 34 | 44 | 24 | 20 | null | null |
iu-parfunc/containers | Data/Map/Base.hs | bsd-3-clause | mapAccumL f a (Bin sx kx x l r) =
let (a1,l') = mapAccumL f a l
(a2,x') = f a1 kx x
(a3,r') = mapAccumL f a2 r
in (a3,Bin sx kx x' l' r') | 153 | mapAccumL f a (Bin sx kx x l r) =
let (a1,l') = mapAccumL f a l
(a2,x') = f a1 kx x
(a3,r') = mapAccumL f a2 r
in (a3,Bin sx kx x' l' r') | 153 | mapAccumL f a (Bin sx kx x l r) =
let (a1,l') = mapAccumL f a l
(a2,x') = f a1 kx x
(a3,r') = mapAccumL f a2 r
in (a3,Bin sx kx x' l' r') | 153 | false | false | 0 | 9 | 51 | 110 | 54 | 56 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/Cabal/Distribution/Simple/BuildPaths.hs | bsd-3-clause | mkProfLibName :: LibraryName -> String
mkProfLibName (LibraryName lib) = "lib" ++ lib ++ "_p" <.> "a" | 102 | mkProfLibName :: LibraryName -> String
mkProfLibName (LibraryName lib) = "lib" ++ lib ++ "_p" <.> "a" | 102 | mkProfLibName (LibraryName lib) = "lib" ++ lib ++ "_p" <.> "a" | 63 | false | true | 0 | 7 | 16 | 36 | 18 | 18 | null | null |
sseefried/funky-foto | Settings.hs | bsd-2-clause | -- | Your application will keep a connection pool and take connections from
-- there as necessary instead of continually creating new connections. This
-- value gives the maximum number of connections to be open at a given time.
-- If your application requests a connection when all connections are in
-- use, that request will fail. Try to choose a number that will work well
-- with the system resources available to you while providing enough
-- connections for your expected load.
--
-- Also, connections are returned to the pool as quickly as possible by
-- Yesod to avoid resource exhaustion. A connection is only considered in
-- use while within a call to runDB.
connectionCount :: Int
connectionCount = 10 | 714 | connectionCount :: Int
connectionCount = 10 | 43 | connectionCount = 10 | 20 | true | true | 0 | 6 | 122 | 29 | 18 | 11 | null | null |
fmapfmapfmap/amazonka | amazonka-lambda/gen/Network/AWS/Lambda/Invoke.hs | mpl-2.0 | -- | Creates a value of 'InvokeResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'irsFunctionError'
--
-- * 'irsLogResult'
--
-- * 'irsPayload'
--
-- * 'irsStatusCode'
invokeResponse
:: Int -- ^ 'irsStatusCode'
-> InvokeResponse
invokeResponse pStatusCode_ =
InvokeResponse'
{ _irsFunctionError = Nothing
, _irsLogResult = Nothing
, _irsPayload = Nothing
, _irsStatusCode = pStatusCode_
} | 513 | invokeResponse
:: Int -- ^ 'irsStatusCode'
-> InvokeResponse
invokeResponse pStatusCode_ =
InvokeResponse'
{ _irsFunctionError = Nothing
, _irsLogResult = Nothing
, _irsPayload = Nothing
, _irsStatusCode = pStatusCode_
} | 252 | invokeResponse pStatusCode_ =
InvokeResponse'
{ _irsFunctionError = Nothing
, _irsLogResult = Nothing
, _irsPayload = Nothing
, _irsStatusCode = pStatusCode_
} | 183 | true | true | 0 | 7 | 106 | 65 | 40 | 25 | null | null |
nushio3/UFCORIN | test/LibSVMSpec.hs | mit | spec :: Spec
spec = do
describe "LibSVM" $ do
it "encodes properly." $
encode testObj `shouldBe` testEnco | 117 | spec :: Spec
spec = do
describe "LibSVM" $ do
it "encodes properly." $
encode testObj `shouldBe` testEnco | 117 | spec = do
describe "LibSVM" $ do
it "encodes properly." $
encode testObj `shouldBe` testEnco | 104 | false | true | 0 | 12 | 29 | 40 | 19 | 21 | null | null |
afcowie/detour | src/RuntimeProgram.hs | bsd-3-clause | main :: IO ()
main = do
Options{..} <- execParser commandLineParser
let level = if debug
then Debug
else Quiet
quit <- initializeProgram (package ++ "-" ++ version) level
-- Run selected component.
debugM "Main.main" "Running command"
-- Although none of the commands are daemons, we get off of the main thread
-- so that we can block the main thread on the quit semaphore, such that a
-- user interrupt will kill the program.
a <- async $ do
case component of
Status ->
putStrLn "Checking status"
Two _ ->
undefined
_ <- wait a
debugM "Main.main" "End" | 683 | main :: IO ()
main = do
Options{..} <- execParser commandLineParser
let level = if debug
then Debug
else Quiet
quit <- initializeProgram (package ++ "-" ++ version) level
-- Run selected component.
debugM "Main.main" "Running command"
-- Although none of the commands are daemons, we get off of the main thread
-- so that we can block the main thread on the quit semaphore, such that a
-- user interrupt will kill the program.
a <- async $ do
case component of
Status ->
putStrLn "Checking status"
Two _ ->
undefined
_ <- wait a
debugM "Main.main" "End" | 683 | main = do
Options{..} <- execParser commandLineParser
let level = if debug
then Debug
else Quiet
quit <- initializeProgram (package ++ "-" ++ version) level
-- Run selected component.
debugM "Main.main" "Running command"
-- Although none of the commands are daemons, we get off of the main thread
-- so that we can block the main thread on the quit semaphore, such that a
-- user interrupt will kill the program.
a <- async $ do
case component of
Status ->
putStrLn "Checking status"
Two _ ->
undefined
_ <- wait a
debugM "Main.main" "End" | 669 | false | true | 0 | 15 | 228 | 144 | 66 | 78 | null | null |
thalerjonathan/phd | coding/prototyping/haskell/HerosAndCowardsIO/src/HACAgent.hs | gpl-3.0 | posDir :: AgentPosition -> AgentPosition -> AgentPosition
posDir (x1, y1) (x2, y2) = (x2-x1, y2-y1) | 99 | posDir :: AgentPosition -> AgentPosition -> AgentPosition
posDir (x1, y1) (x2, y2) = (x2-x1, y2-y1) | 99 | posDir (x1, y1) (x2, y2) = (x2-x1, y2-y1) | 41 | false | true | 0 | 6 | 14 | 55 | 29 | 26 | null | null |
google-research/dex-lang | src/lib/Type.hs | bsd-3-clause | oneEffect :: Effect n -> EffectRow n
oneEffect eff = EffectRow (S.singleton eff) Nothing | 88 | oneEffect :: Effect n -> EffectRow n
oneEffect eff = EffectRow (S.singleton eff) Nothing | 88 | oneEffect eff = EffectRow (S.singleton eff) Nothing | 51 | false | true | 0 | 8 | 13 | 37 | 17 | 20 | null | null |
brendanhay/gogol | gogol-manufacturers/gen/Network/Google/Resource/Manufacturers/Accounts/Products/List.hs | mpl-2.0 | -- | The token returned by the previous request.
aplPageToken :: Lens' AccountsProductsList (Maybe Text)
aplPageToken
= lens _aplPageToken (\ s a -> s{_aplPageToken = a}) | 172 | aplPageToken :: Lens' AccountsProductsList (Maybe Text)
aplPageToken
= lens _aplPageToken (\ s a -> s{_aplPageToken = a}) | 123 | aplPageToken
= lens _aplPageToken (\ s a -> s{_aplPageToken = a}) | 67 | true | true | 1 | 9 | 27 | 50 | 25 | 25 | null | null |
ezyang/ghc | testsuite/tests/dependent/should_compile/dynamic-paper.hs | bsd-3-clause | compareTypeRep = undefined | 26 | compareTypeRep = undefined | 26 | compareTypeRep = undefined | 26 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
andorp/grin | grin/src/Grin/Parse/Basic.hs | bsd-3-clause | sc :: Parser ()
sc = L.space (void spaceChar) lineComment blockComment | 70 | sc :: Parser ()
sc = L.space (void spaceChar) lineComment blockComment | 70 | sc = L.space (void spaceChar) lineComment blockComment | 54 | false | true | 0 | 7 | 10 | 31 | 15 | 16 | null | null |
nevrenato/Hets_Fork | Common/Lib/Graph.hs | gpl-2.0 | labelNode :: LNode a -> Gr a b -> (Gr a b, a)
labelNode (v, l) (Gr m) = case Map.lookup v m of
Just c -> (Gr $ Map.insert v (c { nodeLabel = l }) m, nodeLabel c)
Nothing -> error $ "Common.Lib.Graph.labelNode no node: " ++ show v
-- | returns one new node id for the given graph | 287 | labelNode :: LNode a -> Gr a b -> (Gr a b, a)
labelNode (v, l) (Gr m) = case Map.lookup v m of
Just c -> (Gr $ Map.insert v (c { nodeLabel = l }) m, nodeLabel c)
Nothing -> error $ "Common.Lib.Graph.labelNode no node: " ++ show v
-- | returns one new node id for the given graph | 287 | labelNode (v, l) (Gr m) = case Map.lookup v m of
Just c -> (Gr $ Map.insert v (c { nodeLabel = l }) m, nodeLabel c)
Nothing -> error $ "Common.Lib.Graph.labelNode no node: " ++ show v
-- | returns one new node id for the given graph | 241 | false | true | 5 | 9 | 70 | 122 | 63 | 59 | null | null |
glguy/vty-hangman-helper | Options.hs | bsd-3-clause | setScrub :: Bool -> Options -> Options
setScrub x o = o { scrubOption = x } | 75 | setScrub :: Bool -> Options -> Options
setScrub x o = o { scrubOption = x } | 75 | setScrub x o = o { scrubOption = x } | 36 | false | true | 0 | 6 | 16 | 32 | 17 | 15 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2016/M08/D16/Solution.hs | mit | -- from the PropertiesJ, then convert that to a TimedTweet using t2tt.
{--
*Y2016.M08.D16.Solution> readGraphJSON twitterGraphUrl ~> tweets
*Y2016.M08.D16.Solution> let twit = last . nodes $ head tweets
*Y2016.M08.D16.Solution> twit ~>
NJ {idn = "255",labels = ["Tweet"],propsn = PJ (fromList [("created_at",...)])}
*Y2016.M08.D16.Solution> tweetFrom (propsn twit) ~>
Tweet {idx = "727179491756396546", txt = "April 2016 @1HaskellADay...", ...}
--}
-- Using the above definition, define the below
-- first, we need to know which nodes are tweets:
isTweet :: NodeJ -> Bool
isTweet = elem "Tweet" . labels | 608 | isTweet :: NodeJ -> Bool
isTweet = elem "Tweet" . labels | 56 | isTweet = elem "Tweet" . labels | 31 | true | true | 1 | 7 | 90 | 34 | 16 | 18 | null | null |
ghcjs/haddock-internal | vendor/attoparsec-0.10.4.0/Data/Attoparsec/ByteString/Internal.hs | bsd-2-clause | -- | Consume input as long as the predicate returns 'True', and return
-- the consumed input.
--
-- This parser requires the predicate to succeed on at least one byte
-- of input: it will fail if the predicate never returns 'True' or if
-- there is no input left.
takeWhile1 :: (Word8 -> Bool) -> Parser B.ByteString
takeWhile1 p = do
(`when` demandInput) =<< B.null <$> get
(h,t) <- B8.span p <$> get
when (B.null h) $ fail "takeWhile1"
put t
if B.null t
then (h<>) `fmap` takeWhile p
else return h
-- | Match any byte in a set.
--
-- >vowel = inClass "aeiou"
--
-- Range notation is supported.
--
-- >halfAlphabet = inClass "a-nA-N"
--
-- To add a literal @\'-\'@ to a set, place it at the beginning or end
-- of the string. | 745 | takeWhile1 :: (Word8 -> Bool) -> Parser B.ByteString
takeWhile1 p = do
(`when` demandInput) =<< B.null <$> get
(h,t) <- B8.span p <$> get
when (B.null h) $ fail "takeWhile1"
put t
if B.null t
then (h<>) `fmap` takeWhile p
else return h
-- | Match any byte in a set.
--
-- >vowel = inClass "aeiou"
--
-- Range notation is supported.
--
-- >halfAlphabet = inClass "a-nA-N"
--
-- To add a literal @\'-\'@ to a set, place it at the beginning or end
-- of the string. | 481 | takeWhile1 p = do
(`when` demandInput) =<< B.null <$> get
(h,t) <- B8.span p <$> get
when (B.null h) $ fail "takeWhile1"
put t
if B.null t
then (h<>) `fmap` takeWhile p
else return h
-- | Match any byte in a set.
--
-- >vowel = inClass "aeiou"
--
-- Range notation is supported.
--
-- >halfAlphabet = inClass "a-nA-N"
--
-- To add a literal @\'-\'@ to a set, place it at the beginning or end
-- of the string. | 428 | true | true | 0 | 11 | 159 | 146 | 81 | 65 | null | null |
mhwombat/creatur-examples | src/Tutorial/Chapter10/Plant.hs | bsd-3-clause | -- need two agents to mate
deductMatingEnergy :: Plant -> Plant
deductMatingEnergy p = p {plantEnergy=plantEnergy p - 1} | 121 | deductMatingEnergy :: Plant -> Plant
deductMatingEnergy p = p {plantEnergy=plantEnergy p - 1} | 93 | deductMatingEnergy p = p {plantEnergy=plantEnergy p - 1} | 56 | true | true | 0 | 9 | 19 | 40 | 19 | 21 | null | null |
ondrasej/heavenly-bodies | src/HBodies/Game/State.hs | apache-2.0 | -- | Generates a random value from the given range using the random
-- generator in the monad.
randomR :: Random.Random a => (a, a) -> Update a
randomR range = MonadState.state$ \d ->
let generator = getUpdateRandomGenerator d
(v, generator') = Random.randomR range generator
in (v, d { getUpdateRandomGenerator = generator' }) | 343 | randomR :: Random.Random a => (a, a) -> Update a
randomR range = MonadState.state$ \d ->
let generator = getUpdateRandomGenerator d
(v, generator') = Random.randomR range generator
in (v, d { getUpdateRandomGenerator = generator' }) | 248 | randomR range = MonadState.state$ \d ->
let generator = getUpdateRandomGenerator d
(v, generator') = Random.randomR range generator
in (v, d { getUpdateRandomGenerator = generator' }) | 199 | true | true | 0 | 12 | 68 | 96 | 51 | 45 | null | null |
steveshogren/language-safety-data-collector | src/Database.hs | bsd-3-clause | updateRepoBugCountT :: Language -> Repository -> Int -> MutateDb
updateRepoBugCountT = updateRepoFieldCountT bug_count | 118 | updateRepoBugCountT :: Language -> Repository -> Int -> MutateDb
updateRepoBugCountT = updateRepoFieldCountT bug_count | 118 | updateRepoBugCountT = updateRepoFieldCountT bug_count | 53 | false | true | 0 | 7 | 12 | 26 | 13 | 13 | null | null |
petester42/haskell-hockey | src/Hockey/Database/Internal.hs | mit | db :: (MonadIO m) => Logger b c -> Connection m a b -> Result a c
db logger connection stmt = logger $ connection $ query stmt | 126 | db :: (MonadIO m) => Logger b c -> Connection m a b -> Result a c
db logger connection stmt = logger $ connection $ query stmt | 126 | db logger connection stmt = logger $ connection $ query stmt | 60 | false | true | 0 | 8 | 27 | 63 | 30 | 33 | null | null |
headprogrammingczar/cabal | Cabal/Distribution/PackageDescription/Check.hs | bsd-3-clause | checkConditionals :: GenericPackageDescription -> [PackageCheck]
checkConditionals pkg =
catMaybes [
check (not $ null unknownOSs) $
PackageDistInexcusable $
"Unknown operating system name "
++ commaSep (map quote unknownOSs)
, check (not $ null unknownArches) $
PackageDistInexcusable $
"Unknown architecture name "
++ commaSep (map quote unknownArches)
, check (not $ null unknownImpls) $
PackageDistInexcusable $
"Unknown compiler name "
++ commaSep (map quote unknownImpls)
]
where
unknownOSs = [ os | OS (OtherOS os) <- conditions ]
unknownArches = [ arch | Arch (OtherArch arch) <- conditions ]
unknownImpls = [ impl | Impl (OtherCompiler impl) _ <- conditions ]
conditions = concatMap (fvs . snd) (condLibraries pkg)
++ concatMap (fvs . snd) (condExecutables pkg)
fvs (CondNode _ _ ifs) = concatMap compfv ifs -- free variables
compfv (c, ct, mct) = condfv c ++ fvs ct ++ maybe [] fvs mct
condfv c = case c of
Var v -> [v]
Lit _ -> []
CNot c1 -> condfv c1
COr c1 c2 -> condfv c1 ++ condfv c2
CAnd c1 c2 -> condfv c1 ++ condfv c2 | 1,237 | checkConditionals :: GenericPackageDescription -> [PackageCheck]
checkConditionals pkg =
catMaybes [
check (not $ null unknownOSs) $
PackageDistInexcusable $
"Unknown operating system name "
++ commaSep (map quote unknownOSs)
, check (not $ null unknownArches) $
PackageDistInexcusable $
"Unknown architecture name "
++ commaSep (map quote unknownArches)
, check (not $ null unknownImpls) $
PackageDistInexcusable $
"Unknown compiler name "
++ commaSep (map quote unknownImpls)
]
where
unknownOSs = [ os | OS (OtherOS os) <- conditions ]
unknownArches = [ arch | Arch (OtherArch arch) <- conditions ]
unknownImpls = [ impl | Impl (OtherCompiler impl) _ <- conditions ]
conditions = concatMap (fvs . snd) (condLibraries pkg)
++ concatMap (fvs . snd) (condExecutables pkg)
fvs (CondNode _ _ ifs) = concatMap compfv ifs -- free variables
compfv (c, ct, mct) = condfv c ++ fvs ct ++ maybe [] fvs mct
condfv c = case c of
Var v -> [v]
Lit _ -> []
CNot c1 -> condfv c1
COr c1 c2 -> condfv c1 ++ condfv c2
CAnd c1 c2 -> condfv c1 ++ condfv c2 | 1,237 | checkConditionals pkg =
catMaybes [
check (not $ null unknownOSs) $
PackageDistInexcusable $
"Unknown operating system name "
++ commaSep (map quote unknownOSs)
, check (not $ null unknownArches) $
PackageDistInexcusable $
"Unknown architecture name "
++ commaSep (map quote unknownArches)
, check (not $ null unknownImpls) $
PackageDistInexcusable $
"Unknown compiler name "
++ commaSep (map quote unknownImpls)
]
where
unknownOSs = [ os | OS (OtherOS os) <- conditions ]
unknownArches = [ arch | Arch (OtherArch arch) <- conditions ]
unknownImpls = [ impl | Impl (OtherCompiler impl) _ <- conditions ]
conditions = concatMap (fvs . snd) (condLibraries pkg)
++ concatMap (fvs . snd) (condExecutables pkg)
fvs (CondNode _ _ ifs) = concatMap compfv ifs -- free variables
compfv (c, ct, mct) = condfv c ++ fvs ct ++ maybe [] fvs mct
condfv c = case c of
Var v -> [v]
Lit _ -> []
CNot c1 -> condfv c1
COr c1 c2 -> condfv c1 ++ condfv c2
CAnd c1 c2 -> condfv c1 ++ condfv c2 | 1,172 | false | true | 7 | 12 | 380 | 442 | 206 | 236 | null | null |
mvr/abyme | haskell-model/src/Abyme/Shapey/Universe.hs | bsd-3-clause | halo :: HasSquares a => Universe -> a -> [Location]
halo uni a = nub $ u ++ d ++ l ++ r
where (u, _) = fringe uni Up a
(d, _) = fringe uni Down a
(l, _) = fringe uni LEft a
(r, _) = fringe uni RIght a | 226 | halo :: HasSquares a => Universe -> a -> [Location]
halo uni a = nub $ u ++ d ++ l ++ r
where (u, _) = fringe uni Up a
(d, _) = fringe uni Down a
(l, _) = fringe uni LEft a
(r, _) = fringe uni RIght a | 226 | halo uni a = nub $ u ++ d ++ l ++ r
where (u, _) = fringe uni Up a
(d, _) = fringe uni Down a
(l, _) = fringe uni LEft a
(r, _) = fringe uni RIght a | 174 | false | true | 3 | 8 | 77 | 125 | 66 | 59 | null | null |
atsukotakahashi/wi | src/library/Yi/Keymap/Vim/VisualMap.hs | gpl-2.0 | mkOperatorBinding :: VimOperator -> VimBinding
mkOperatorBinding op = VimBindingE f
where
f evs (VimState { vsMode = (Visual _) }) =
action <$ evs `matchesString` Ev (_unOp $ operatorName op)
f _ _ = NoMatch
action = do
(Visual style) <- vsMode <$> getEditorDyn
region <- withCurrentBuffer regionOfSelectionB
count <- getCountE
token <- operatorApplyToRegionE op count $ StyledRegion style region
resetCountE
clrStatus
withCurrentBuffer $ do
setVisibleSelection False
putRegionStyle Inclusive
return token | 613 | mkOperatorBinding :: VimOperator -> VimBinding
mkOperatorBinding op = VimBindingE f
where
f evs (VimState { vsMode = (Visual _) }) =
action <$ evs `matchesString` Ev (_unOp $ operatorName op)
f _ _ = NoMatch
action = do
(Visual style) <- vsMode <$> getEditorDyn
region <- withCurrentBuffer regionOfSelectionB
count <- getCountE
token <- operatorApplyToRegionE op count $ StyledRegion style region
resetCountE
clrStatus
withCurrentBuffer $ do
setVisibleSelection False
putRegionStyle Inclusive
return token | 613 | mkOperatorBinding op = VimBindingE f
where
f evs (VimState { vsMode = (Visual _) }) =
action <$ evs `matchesString` Ev (_unOp $ operatorName op)
f _ _ = NoMatch
action = do
(Visual style) <- vsMode <$> getEditorDyn
region <- withCurrentBuffer regionOfSelectionB
count <- getCountE
token <- operatorApplyToRegionE op count $ StyledRegion style region
resetCountE
clrStatus
withCurrentBuffer $ do
setVisibleSelection False
putRegionStyle Inclusive
return token | 566 | false | true | 4 | 11 | 178 | 191 | 83 | 108 | null | null |
josefs/hl | src/Text/Blaze/Bootstrap.hs | bsd-3-clause | span5 :: Html -> Html
span5 = div !. "span5 col-md-5" | 53 | span5 :: Html -> Html
span5 = div !. "span5 col-md-5" | 53 | span5 = div !. "span5 col-md-5" | 31 | false | true | 0 | 5 | 10 | 19 | 10 | 9 | null | null |
rfranek/duckling | Duckling/Time/FR/Rules.hs | bsd-3-clause | ruleIntersectByMaisparExempleplutt :: Rule
ruleIntersectByMaisparExempleplutt = Rule
{ name = "intersect by 'mais/par exemple/plutôt'"
, pattern =
[ Predicate isNotLatent
, regex "mais|par exemple|plut(\x00f4|o)t"
, Predicate isNotLatent
]
, prod = \tokens -> case tokens of
(Token Time td1:_:Token Time td2:_) ->
Token Time <$> intersect td1 td2
_ -> Nothing
} | 405 | ruleIntersectByMaisparExempleplutt :: Rule
ruleIntersectByMaisparExempleplutt = Rule
{ name = "intersect by 'mais/par exemple/plutôt'"
, pattern =
[ Predicate isNotLatent
, regex "mais|par exemple|plut(\x00f4|o)t"
, Predicate isNotLatent
]
, prod = \tokens -> case tokens of
(Token Time td1:_:Token Time td2:_) ->
Token Time <$> intersect td1 td2
_ -> Nothing
} | 405 | ruleIntersectByMaisparExempleplutt = Rule
{ name = "intersect by 'mais/par exemple/plutôt'"
, pattern =
[ Predicate isNotLatent
, regex "mais|par exemple|plut(\x00f4|o)t"
, Predicate isNotLatent
]
, prod = \tokens -> case tokens of
(Token Time td1:_:Token Time td2:_) ->
Token Time <$> intersect td1 td2
_ -> Nothing
} | 362 | false | true | 0 | 16 | 94 | 111 | 57 | 54 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/simplCore/CoreMonad.hs | bsd-3-clause | -- | Output a string debugging message at verbosity level of @-v@ or higher
debugTraceMsgS :: String -> CoreM ()
debugTraceMsgS = debugTraceMsg . text | 150 | debugTraceMsgS :: String -> CoreM ()
debugTraceMsgS = debugTraceMsg . text | 74 | debugTraceMsgS = debugTraceMsg . text | 37 | true | true | 0 | 8 | 24 | 31 | 14 | 17 | null | null |
myShoggoth/shakespeare | Text/Hamlet/Parse.hs | mit | nonD3AttrsToDoc :: [Attribute] -> String -> DocMode -> [Doc]
nonD3AttrsToDoc attrs varname docMode = concatMap (\a -> attrToContent a docMode varname) (filter (not . isD3Attribute) attrs) | 187 | nonD3AttrsToDoc :: [Attribute] -> String -> DocMode -> [Doc]
nonD3AttrsToDoc attrs varname docMode = concatMap (\a -> attrToContent a docMode varname) (filter (not . isD3Attribute) attrs) | 187 | nonD3AttrsToDoc attrs varname docMode = concatMap (\a -> attrToContent a docMode varname) (filter (not . isD3Attribute) attrs) | 126 | false | true | 0 | 9 | 25 | 71 | 37 | 34 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/cabal-install/Distribution/Client/Dependency/Modular/Dependency.hs | bsd-3-clause | simplifyVar (S qsn) = S qsn | 33 | simplifyVar (S qsn) = S qsn | 33 | simplifyVar (S qsn) = S qsn | 33 | false | false | 0 | 6 | 11 | 19 | 8 | 11 | null | null |
damianfral/clay | src/Clay/Pseudo.hs | bsd-3-clause | onlyChild = ":only-child" | 29 | onlyChild = ":only-child" | 29 | onlyChild = ":only-child" | 29 | false | false | 0 | 4 | 6 | 6 | 3 | 3 | null | null |
vTurbine/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | -- Promoted List
promotedConsDataCon, promotedNilDataCon :: TyCon
promotedConsDataCon = promoteDataCon consDataCon | 116 | promotedConsDataCon, promotedNilDataCon :: TyCon
promotedConsDataCon = promoteDataCon consDataCon | 99 | promotedConsDataCon = promoteDataCon consDataCon | 50 | true | true | 2 | 6 | 12 | 28 | 11 | 17 | null | null |
ndmitchell/firstify | Yhc/Core/Firstify/Super.hs | bsd-3-clause | foFunc :: CoreFuncName -> M Int
foFunc x = do
s <- get
func <- return $ coreFuncMap (core s) x
when (isCoreFunc func && x `Set.notMember` done s && x `Set.notMember` pending s) $ do
modify $ \s -> s{pending = Set.insert x (pending s)}
(args,body) <- liftM fromCoreLam $ foBody (coreFuncBody func)
modify $ \s -> s{core = Map.insert x (CoreFunc x (coreFuncArgs func ++ args) body) (core s)
,pending = Set.delete x (pending s)
,done = Set.insert x (done s)
}
return $ coreFuncArity $ coreFuncMap (core s) x | 616 | foFunc :: CoreFuncName -> M Int
foFunc x = do
s <- get
func <- return $ coreFuncMap (core s) x
when (isCoreFunc func && x `Set.notMember` done s && x `Set.notMember` pending s) $ do
modify $ \s -> s{pending = Set.insert x (pending s)}
(args,body) <- liftM fromCoreLam $ foBody (coreFuncBody func)
modify $ \s -> s{core = Map.insert x (CoreFunc x (coreFuncArgs func ++ args) body) (core s)
,pending = Set.delete x (pending s)
,done = Set.insert x (done s)
}
return $ coreFuncArity $ coreFuncMap (core s) x | 616 | foFunc x = do
s <- get
func <- return $ coreFuncMap (core s) x
when (isCoreFunc func && x `Set.notMember` done s && x `Set.notMember` pending s) $ do
modify $ \s -> s{pending = Set.insert x (pending s)}
(args,body) <- liftM fromCoreLam $ foBody (coreFuncBody func)
modify $ \s -> s{core = Map.insert x (CoreFunc x (coreFuncArgs func ++ args) body) (core s)
,pending = Set.delete x (pending s)
,done = Set.insert x (done s)
}
return $ coreFuncArity $ coreFuncMap (core s) x | 584 | false | true | 0 | 19 | 203 | 273 | 135 | 138 | null | null |
NicolasT/leveldbmgr | src/Data/Digest/CRC32C.hs | gpl-2.0 | -- | Calculate the 'CRC32' checksum of some data.
crc32c :: ByteString -> CRC32
crc32c = extend 0 | 97 | crc32c :: ByteString -> CRC32
crc32c = extend 0 | 47 | crc32c = extend 0 | 17 | true | true | 0 | 7 | 17 | 25 | 11 | 14 | null | null |
Fuuzetsu/yi-emacs-colours | src/Yi/Style/EmacsColours.hs | gpl-2.0 | -- | Names: @["azure"]@
--
-- R240 G255 B255, 0xf0ffff
azure :: Color
azure = RGB 240 255 255 | 93 | azure :: Color
azure = RGB 240 255 255 | 38 | azure = RGB 240 255 255 | 23 | true | true | 0 | 6 | 18 | 27 | 13 | 14 | null | null |
imalsogreg/reffit | src/Reffit/Handlers/HandleViewUser.hs | gpl-3.0 | allUserBlockSplices :: T.Text -> Map.Map DocumentId Document
-> Set.Set UserName -> Splices (SnapletISplice App)
allUserBlockSplices nodeName docs userNames =
nodeName ## renderUserBlocks docs (Set.toList userNames) | 240 | allUserBlockSplices :: T.Text -> Map.Map DocumentId Document
-> Set.Set UserName -> Splices (SnapletISplice App)
allUserBlockSplices nodeName docs userNames =
nodeName ## renderUserBlocks docs (Set.toList userNames) | 240 | allUserBlockSplices nodeName docs userNames =
nodeName ## renderUserBlocks docs (Set.toList userNames) | 104 | false | true | 0 | 10 | 49 | 70 | 33 | 37 | null | null |
jbracker/supermonad-plugin | examples/monad/hmtc/supermonad/PPTAMCode.hs | bsd-3-clause | fmtAddr (ST d) = "[ST " ++ fmtDisp d ++ "]" | 45 | fmtAddr (ST d) = "[ST " ++ fmtDisp d ++ "]" | 45 | fmtAddr (ST d) = "[ST " ++ fmtDisp d ++ "]" | 45 | false | false | 0 | 7 | 12 | 26 | 12 | 14 | null | null |
fryguybob/LaTeXGrapher | src/LaTeXGrapher/Output.hs | bsd-3-clause | eto a = (point a) ++ " moveto"
li | 33 | moveto a = (point a) ++ " moveto" | 33 | moveto a = (point a) ++ " moveto" | 33 | false | false | 1 | 7 | 8 | 26 | 10 | 16 | null | null |
rdnetto/persistent | persistent-template/Database/Persist/TH.hs | mit | unKeyExp :: EntityDef -> Exp
unKeyExp = VarE . unKeyName | 56 | unKeyExp :: EntityDef -> Exp
unKeyExp = VarE . unKeyName | 56 | unKeyExp = VarE . unKeyName | 27 | false | true | 0 | 5 | 9 | 19 | 10 | 9 | null | null |
jgm/texmath | src/Text/TeXMath/Writers/Pandoc.hs | gpl-2.0 | expToInlines _ (EText tt' x) = Just $ renderStr (Just tt') x | 60 | expToInlines _ (EText tt' x) = Just $ renderStr (Just tt') x | 60 | expToInlines _ (EText tt' x) = Just $ renderStr (Just tt') x | 60 | false | false | 0 | 8 | 11 | 34 | 16 | 18 | null | null |
HJvT/com | System/Win32/Com/HDirect/HDirect.hs | bsd-3-clause | --Ptr marshallers:
marshallPointer :: Ptr a -> IO (Ptr a)
marshallPointer p = return p | 87 | marshallPointer :: Ptr a -> IO (Ptr a)
marshallPointer p = return p | 67 | marshallPointer p = return p | 28 | true | true | 0 | 8 | 15 | 34 | 16 | 18 | null | null |
rueshyna/gogol | gogol-sheets/gen/Network/Google/Resource/Sheets/Spreadsheets/Values/Append.hs | mpl-2.0 | -- | OAuth access token.
svaAccessToken :: Lens' SpreadsheetsValuesAppend (Maybe Text)
svaAccessToken
= lens _svaAccessToken
(\ s a -> s{_svaAccessToken = a}) | 166 | svaAccessToken :: Lens' SpreadsheetsValuesAppend (Maybe Text)
svaAccessToken
= lens _svaAccessToken
(\ s a -> s{_svaAccessToken = a}) | 141 | svaAccessToken
= lens _svaAccessToken
(\ s a -> s{_svaAccessToken = a}) | 79 | true | true | 0 | 8 | 29 | 49 | 25 | 24 | null | null |
stevenremot/fronsduk | src/Qzitche/Compile.hs | gpl-3.0 | popBinding :: CompilationState -> String -> CompilationState
popBinding cs i =
CompilationState (insertWith (\_ a -> tail a) i [] $ bindings cs) $ depth cs | 157 | popBinding :: CompilationState -> String -> CompilationState
popBinding cs i =
CompilationState (insertWith (\_ a -> tail a) i [] $ bindings cs) $ depth cs | 157 | popBinding cs i =
CompilationState (insertWith (\_ a -> tail a) i [] $ bindings cs) $ depth cs | 96 | false | true | 0 | 11 | 27 | 71 | 33 | 38 | null | null |
msiegenthaler/haskell-xbee | System/Hardware/XBee/Connector/Common.hs | bsd-3-clause | -- | Parses CommandIn from bytes.
bytesToCmdIn :: Transform Word8 CommandIn
bytesToCmdIn = T.map BS.singleton . byteStringToCmdIn | 129 | bytesToCmdIn :: Transform Word8 CommandIn
bytesToCmdIn = T.map BS.singleton . byteStringToCmdIn | 95 | bytesToCmdIn = T.map BS.singleton . byteStringToCmdIn | 53 | true | true | 0 | 7 | 16 | 28 | 14 | 14 | null | null |
patperry/hs-linear-algebra | tests-old/TriMatrix.hs | bsd-3-clause | prop_tri_sapplyMatrix k (TriMatrixMM (t :: TM) a b) =
sapplyMatrix k t b ~== sapplyMatrix k a b | 99 | prop_tri_sapplyMatrix k (TriMatrixMM (t :: TM) a b) =
sapplyMatrix k t b ~== sapplyMatrix k a b | 99 | prop_tri_sapplyMatrix k (TriMatrixMM (t :: TM) a b) =
sapplyMatrix k t b ~== sapplyMatrix k a b | 99 | false | false | 0 | 9 | 21 | 46 | 22 | 24 | null | null |
plaimi/tempuhs-server | src/Tempuhs/Server/Requests.hs | agpl-3.0 | userRequests :: ConnectionPool -> ScottyE ()
userRequests p = do
get "/users" $ users p
post "/users" $ postUser p
put "/users" $ replaceUser p
delete "/users" $ deleteUser p
delete "/users/purge" $ unsafeDeleteUser p
patch "/users" $ patchUser p
patch "/userAttributes" $ patchUserAttribute p | 408 | userRequests :: ConnectionPool -> ScottyE ()
userRequests p = do
get "/users" $ users p
post "/users" $ postUser p
put "/users" $ replaceUser p
delete "/users" $ deleteUser p
delete "/users/purge" $ unsafeDeleteUser p
patch "/users" $ patchUser p
patch "/userAttributes" $ patchUserAttribute p | 408 | userRequests p = do
get "/users" $ users p
post "/users" $ postUser p
put "/users" $ replaceUser p
delete "/users" $ deleteUser p
delete "/users/purge" $ unsafeDeleteUser p
patch "/users" $ patchUser p
patch "/userAttributes" $ patchUserAttribute p | 363 | false | true | 0 | 8 | 159 | 114 | 46 | 68 | null | null |
squest/Zenx-trainer-training | haskell/alfa.hs | epl-1.0 | sqr 0 = 0 | 9 | sqr 0 = 0 | 9 | sqr 0 = 0 | 9 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
kmate/HaRe | old/testing/removeField/A2AST.hs | bsd-3-clause | (C1 (C1 x y) b) = 89 | 20 | (C1 (C1 x y) b) = 89 | 20 | (C1 (C1 x y) b) = 89 | 20 | false | false | 0 | 8 | 6 | 23 | 11 | 12 | null | null |
tedkornish/stack | src/Stack/Types/Package.hs | bsd-3-clause | -- | Maybe get the main name from the .cabal descriptor.
dotCabalMain :: DotCabalDescriptor -> Maybe FilePath
dotCabalMain (DotCabalMain m) = Just m | 148 | dotCabalMain :: DotCabalDescriptor -> Maybe FilePath
dotCabalMain (DotCabalMain m) = Just m | 91 | dotCabalMain (DotCabalMain m) = Just m | 38 | true | true | 0 | 7 | 22 | 31 | 15 | 16 | null | null |
zhiyuanshi/include | Include.hs | mit | emitOne :: AbstractLine -> IO String
emitOne (S s) = return s | 61 | emitOne :: AbstractLine -> IO String
emitOne (S s) = return s | 61 | emitOne (S s) = return s | 24 | false | true | 0 | 9 | 11 | 35 | 15 | 20 | null | null |
seanhess/serials | server/Serials/Model/Change.hs | mit | list :: (RethinkIO m) => m [Change]
list = runDb $ table # orderBy [desc "createdAt"] | 85 | list :: (RethinkIO m) => m [Change]
list = runDb $ table # orderBy [desc "createdAt"] | 85 | list = runDb $ table # orderBy [desc "createdAt"] | 49 | false | true | 0 | 8 | 15 | 43 | 22 | 21 | null | null |
jeroenk/iTRSsImplemented | RuleAndSystem.hs | agpl-3.0 | -- Apply a rewrite rule l -> r to a term t at position p.
rewriteStep :: (Signature s, Variables v)
=> Term s v -> Step s v -> Term s v
rewriteStep t (p, Rule l r)
| p `positionOf` t = replaceSubterm t sigma_r p
| otherwise = error "Rewrite step applied at invalid position"
where sigma_r = substitute (match l $ subterm t p) r
-- Apply multiple rewrite steps in sequence, yielding a list of terms. | 426 | rewriteStep :: (Signature s, Variables v)
=> Term s v -> Step s v -> Term s v
rewriteStep t (p, Rule l r)
| p `positionOf` t = replaceSubterm t sigma_r p
| otherwise = error "Rewrite step applied at invalid position"
where sigma_r = substitute (match l $ subterm t p) r
-- Apply multiple rewrite steps in sequence, yielding a list of terms. | 368 | rewriteStep t (p, Rule l r)
| p `positionOf` t = replaceSubterm t sigma_r p
| otherwise = error "Rewrite step applied at invalid position"
where sigma_r = substitute (match l $ subterm t p) r
-- Apply multiple rewrite steps in sequence, yielding a list of terms. | 286 | true | true | 1 | 10 | 108 | 123 | 61 | 62 | null | null |
gahara/parsers-for-dummies | test6.hs | bsd-3-clause | Empty = Empty | 13 | Empty = Empty | 13 | Empty = Empty | 13 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
portnov/haskell-gettext | Data/Gettext/Parsers.hs | bsd-3-clause | pSimpleExpr :: Parser Expr
pSimpleExpr = buildExpressionParser table term <?> "simple expression"
where
term = parens pExpr <|> (symbol "n" >> return N) <|> (Literal `fmap` natural)
table =
[ [prefix "-" Negate, prefix "!" Not],
[binary "*" Multiply AssocLeft, binary "/" Divide AssocLeft, binary "%" Mod AssocLeft],
[binary "+" Plus AssocLeft, binary "-" Minus AssocLeft],
[binary "==" Equals AssocLeft, binary "!=" NotEquals AssocLeft,
binary ">" Greater AssocLeft, binary "<=" NotGreater AssocLeft,
binary "<" Less AssocLeft, binary ">=" NotLess AssocLeft],
[binary "&&" And AssocLeft, binary "||" Or AssocLeft, binary "^" Xor AssocLeft]
]
binary name fun assoc = Infix (do{ reservedOp name; return (Binary fun) }) assoc
prefix name fun = Prefix (do{ reservedOp name; return fun })
-- postfix name fun = Postfix (do{ reservedOp name; return fun })
-- | Parse plural form selection expression.
-- Note: this parses only part which goes after @plural=@. | 1,056 | pSimpleExpr :: Parser Expr
pSimpleExpr = buildExpressionParser table term <?> "simple expression"
where
term = parens pExpr <|> (symbol "n" >> return N) <|> (Literal `fmap` natural)
table =
[ [prefix "-" Negate, prefix "!" Not],
[binary "*" Multiply AssocLeft, binary "/" Divide AssocLeft, binary "%" Mod AssocLeft],
[binary "+" Plus AssocLeft, binary "-" Minus AssocLeft],
[binary "==" Equals AssocLeft, binary "!=" NotEquals AssocLeft,
binary ">" Greater AssocLeft, binary "<=" NotGreater AssocLeft,
binary "<" Less AssocLeft, binary ">=" NotLess AssocLeft],
[binary "&&" And AssocLeft, binary "||" Or AssocLeft, binary "^" Xor AssocLeft]
]
binary name fun assoc = Infix (do{ reservedOp name; return (Binary fun) }) assoc
prefix name fun = Prefix (do{ reservedOp name; return fun })
-- postfix name fun = Postfix (do{ reservedOp name; return fun })
-- | Parse plural form selection expression.
-- Note: this parses only part which goes after @plural=@. | 1,056 | pSimpleExpr = buildExpressionParser table term <?> "simple expression"
where
term = parens pExpr <|> (symbol "n" >> return N) <|> (Literal `fmap` natural)
table =
[ [prefix "-" Negate, prefix "!" Not],
[binary "*" Multiply AssocLeft, binary "/" Divide AssocLeft, binary "%" Mod AssocLeft],
[binary "+" Plus AssocLeft, binary "-" Minus AssocLeft],
[binary "==" Equals AssocLeft, binary "!=" NotEquals AssocLeft,
binary ">" Greater AssocLeft, binary "<=" NotGreater AssocLeft,
binary "<" Less AssocLeft, binary ">=" NotLess AssocLeft],
[binary "&&" And AssocLeft, binary "||" Or AssocLeft, binary "^" Xor AssocLeft]
]
binary name fun assoc = Infix (do{ reservedOp name; return (Binary fun) }) assoc
prefix name fun = Prefix (do{ reservedOp name; return fun })
-- postfix name fun = Postfix (do{ reservedOp name; return fun })
-- | Parse plural form selection expression.
-- Note: this parses only part which goes after @plural=@. | 1,029 | false | true | 3 | 12 | 248 | 315 | 161 | 154 | null | null |
kseo/fp | src/FP/Interpreter.hs | bsd-3-clause | interpFunApp (Composition f g) o = do
o' <- interpFunApp g o
interpFunApp f o' | 86 | interpFunApp (Composition f g) o = do
o' <- interpFunApp g o
interpFunApp f o' | 86 | interpFunApp (Composition f g) o = do
o' <- interpFunApp g o
interpFunApp f o' | 86 | false | false | 0 | 8 | 22 | 39 | 17 | 22 | null | null |
ulricha/dsh | src/Database/DSH/Common/Type.hs | bsd-3-clause | isList :: Type -> Bool
isList (ListT _) = True | 46 | isList :: Type -> Bool
isList (ListT _) = True | 46 | isList (ListT _) = True | 23 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | implausibly = id | 16 | implausibly = id | 16 | implausibly = id | 16 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
thalerjonathan/phd | coding/libraries/chimera/examples/ABS/SIRExamples/FrSIR/Tests/Agent.hs | gpl-3.0 | test_agent_group :: TestTree
test_agent_group =
testGroup "gotInfected"
[] | 86 | test_agent_group :: TestTree
test_agent_group =
testGroup "gotInfected"
[] | 86 | test_agent_group =
testGroup "gotInfected"
[] | 57 | false | true | 0 | 6 | 19 | 18 | 9 | 9 | null | null |
kim/amazonka | amazonka-sns/gen/Network/AWS/SNS/ListTopics.hs | mpl-2.0 | -- | Token returned by the previous 'ListTopics' request.
ltNextToken :: Lens' ListTopics (Maybe Text)
ltNextToken = lens _ltNextToken (\s a -> s { _ltNextToken = a }) | 167 | ltNextToken :: Lens' ListTopics (Maybe Text)
ltNextToken = lens _ltNextToken (\s a -> s { _ltNextToken = a }) | 109 | ltNextToken = lens _ltNextToken (\s a -> s { _ltNextToken = a }) | 64 | true | true | 0 | 9 | 27 | 46 | 25 | 21 | null | null |
lykahb/aeson | Data/Aeson/TH.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- Convenience
--------------------------------------------------------------------------------
-- | Generates both 'ToJSON' and 'FromJSON' instance declarations for the given
-- data type.
--
-- This is a convienience function which is equivalent to calling both
-- 'deriveToJSON' and 'deriveFromJSON'.
deriveJSON :: Options
-- ^ Encoding options.
-> Name
-- ^ Name of the type for which to generate 'ToJSON' and 'FromJSON'
-- instances.
-> Q [Dec]
deriveJSON opts name =
liftM2 (++)
(deriveToJSON opts name)
(deriveFromJSON opts name) | 701 | deriveJSON :: Options
-- ^ Encoding options.
-> Name
-- ^ Name of the type for which to generate 'ToJSON' and 'FromJSON'
-- instances.
-> Q [Dec]
deriveJSON opts name =
liftM2 (++)
(deriveToJSON opts name)
(deriveFromJSON opts name) | 315 | deriveJSON opts name =
liftM2 (++)
(deriveToJSON opts name)
(deriveFromJSON opts name) | 114 | true | true | 0 | 8 | 158 | 66 | 39 | 27 | null | null |
rueshyna/gogol | gogol-books/gen/Network/Google/Books/Types/Product.hs | mpl-2.0 | -- | User-created data for this annotation.
aaData :: Lens' Annotation (Maybe Text)
aaData = lens _aaData (\ s a -> s{_aaData = a}) | 131 | aaData :: Lens' Annotation (Maybe Text)
aaData = lens _aaData (\ s a -> s{_aaData = a}) | 87 | aaData = lens _aaData (\ s a -> s{_aaData = a}) | 47 | true | true | 1 | 9 | 23 | 51 | 25 | 26 | null | null |
agrafix/hackage-server | Distribution/Server/Util/CabalRevisions.hs | bsd-3-clause | checkCabalFileRevision :: Check String
checkCabalFileRevision old new = do
(pkg, warns) <- parseCabalFile old
(pkg', warns') <- parseCabalFile new
let pkgid = packageId pkg
filename = display pkgid ++ ".cabal"
checkGenericPackageDescription pkg pkg'
checkParserWarnings filename warns warns'
checkPackageChecks pkg pkg'
where
parseCabalFile fileContent =
case parsePackageDescription fileContent of
ParseFailed err -> fail (formatErrorMsg (locatedErrorMsg err))
ParseOk warnings pkg -> return (pkg, warnings)
formatErrorMsg (Nothing, msg) = msg
formatErrorMsg (Just n, msg) = "Line " ++ show n ++ ": " ++ msg
checkParserWarnings filename warns warns' =
case warns' \\ warns of
[] -> return ()
newwarns -> fail $ "New parse warning: "
++ unlines (map (showPWarning filename) newwarns)
checkPackageChecks pkg pkg' =
let checks = checkPackage pkg Nothing
checks' = checkPackage pkg' Nothing
in case checks' \\ checks of
[] -> return ()
newchecks -> fail $ unlines (map explanation newchecks) | 1,193 | checkCabalFileRevision :: Check String
checkCabalFileRevision old new = do
(pkg, warns) <- parseCabalFile old
(pkg', warns') <- parseCabalFile new
let pkgid = packageId pkg
filename = display pkgid ++ ".cabal"
checkGenericPackageDescription pkg pkg'
checkParserWarnings filename warns warns'
checkPackageChecks pkg pkg'
where
parseCabalFile fileContent =
case parsePackageDescription fileContent of
ParseFailed err -> fail (formatErrorMsg (locatedErrorMsg err))
ParseOk warnings pkg -> return (pkg, warnings)
formatErrorMsg (Nothing, msg) = msg
formatErrorMsg (Just n, msg) = "Line " ++ show n ++ ": " ++ msg
checkParserWarnings filename warns warns' =
case warns' \\ warns of
[] -> return ()
newwarns -> fail $ "New parse warning: "
++ unlines (map (showPWarning filename) newwarns)
checkPackageChecks pkg pkg' =
let checks = checkPackage pkg Nothing
checks' = checkPackage pkg' Nothing
in case checks' \\ checks of
[] -> return ()
newchecks -> fail $ unlines (map explanation newchecks) | 1,193 | checkCabalFileRevision old new = do
(pkg, warns) <- parseCabalFile old
(pkg', warns') <- parseCabalFile new
let pkgid = packageId pkg
filename = display pkgid ++ ".cabal"
checkGenericPackageDescription pkg pkg'
checkParserWarnings filename warns warns'
checkPackageChecks pkg pkg'
where
parseCabalFile fileContent =
case parsePackageDescription fileContent of
ParseFailed err -> fail (formatErrorMsg (locatedErrorMsg err))
ParseOk warnings pkg -> return (pkg, warnings)
formatErrorMsg (Nothing, msg) = msg
formatErrorMsg (Just n, msg) = "Line " ++ show n ++ ": " ++ msg
checkParserWarnings filename warns warns' =
case warns' \\ warns of
[] -> return ()
newwarns -> fail $ "New parse warning: "
++ unlines (map (showPWarning filename) newwarns)
checkPackageChecks pkg pkg' =
let checks = checkPackage pkg Nothing
checks' = checkPackage pkg' Nothing
in case checks' \\ checks of
[] -> return ()
newchecks -> fail $ unlines (map explanation newchecks) | 1,154 | false | true | 5 | 17 | 347 | 331 | 159 | 172 | null | null |
jkozlowski/better-bot | src/Network/Better/Types.hs | mit | emptyBooking = Booking
{ _bookingParentId = 0
, _bookingParentTitle = Nothing
, _bookingName = ""
, _bookingId = 0
, _bookingRemainingSlots = 0
, _bookingInstructor = ""
, _bookingLocation = ""
, _bookingFacility = ""
, _bookingFacilityId = 0
, _bookingDate = ""
, _bookingStartTime = ""
, _bookingEndTime = ""
, _bookingCanCancel = False
, _bookingStatus = ""
, _bookingCanSelectCourt = False
} | 513 | emptyBooking = Booking
{ _bookingParentId = 0
, _bookingParentTitle = Nothing
, _bookingName = ""
, _bookingId = 0
, _bookingRemainingSlots = 0
, _bookingInstructor = ""
, _bookingLocation = ""
, _bookingFacility = ""
, _bookingFacilityId = 0
, _bookingDate = ""
, _bookingStartTime = ""
, _bookingEndTime = ""
, _bookingCanCancel = False
, _bookingStatus = ""
, _bookingCanSelectCourt = False
} | 513 | emptyBooking = Booking
{ _bookingParentId = 0
, _bookingParentTitle = Nothing
, _bookingName = ""
, _bookingId = 0
, _bookingRemainingSlots = 0
, _bookingInstructor = ""
, _bookingLocation = ""
, _bookingFacility = ""
, _bookingFacilityId = 0
, _bookingDate = ""
, _bookingStartTime = ""
, _bookingEndTime = ""
, _bookingCanCancel = False
, _bookingStatus = ""
, _bookingCanSelectCourt = False
} | 513 | false | false | 1 | 7 | 181 | 105 | 65 | 40 | null | null |
adityagupta1089/Project-Euler-Haskell | src/problems/Problem150.hs | bsd-3-clause | triangle :: V.Vector (W.Vector Int)
triangle =
V.fromList $ (W.singleton 0 :) $ map (W.fromList . scanl (+) 0) $ snd $ mapAccumL
(\vals n -> swap $ splitAt n vals)
(map (s @!) [0 .. n2 - 1])
[1 .. n] | 227 | triangle :: V.Vector (W.Vector Int)
triangle =
V.fromList $ (W.singleton 0 :) $ map (W.fromList . scanl (+) 0) $ snd $ mapAccumL
(\vals n -> swap $ splitAt n vals)
(map (s @!) [0 .. n2 - 1])
[1 .. n] | 227 | triangle =
V.fromList $ (W.singleton 0 :) $ map (W.fromList . scanl (+) 0) $ snd $ mapAccumL
(\vals n -> swap $ splitAt n vals)
(map (s @!) [0 .. n2 - 1])
[1 .. n] | 191 | false | true | 4 | 11 | 69 | 134 | 66 | 68 | null | null |
massysett/penny | penny/lib/Penny/Popularity.hs | bsd-3-clause | groupers
:: History
-> Maybe Commodity
-> (Seq (Seq (GrpRadCom Char ())), Seq (Seq (GrpRadPer Char ())))
groupers (History hist) mayCy = fromMaybe allGroupers $ do
cy <- mayCy
cyHist <- M.lookup cy hist
return . partitionEithers . fmap snd $ cyHist
where
allGroupers = partitionEithers . fmap snd $ allHist
allHist = mconcat . M.elems $ hist | 363 | groupers
:: History
-> Maybe Commodity
-> (Seq (Seq (GrpRadCom Char ())), Seq (Seq (GrpRadPer Char ())))
groupers (History hist) mayCy = fromMaybe allGroupers $ do
cy <- mayCy
cyHist <- M.lookup cy hist
return . partitionEithers . fmap snd $ cyHist
where
allGroupers = partitionEithers . fmap snd $ allHist
allHist = mconcat . M.elems $ hist | 363 | groupers (History hist) mayCy = fromMaybe allGroupers $ do
cy <- mayCy
cyHist <- M.lookup cy hist
return . partitionEithers . fmap snd $ cyHist
where
allGroupers = partitionEithers . fmap snd $ allHist
allHist = mconcat . M.elems $ hist | 252 | false | true | 1 | 15 | 79 | 165 | 76 | 89 | null | null |
dagit/edit-patterns | src/WeaveUtils.hs | bsd-3-clause | wpl False (LeftHole h) = [wl h False] | 39 | wpl False (LeftHole h) = [wl h False] | 39 | wpl False (LeftHole h) = [wl h False] | 39 | false | false | 0 | 7 | 9 | 27 | 12 | 15 | null | null |
zerobuzz/webtest | src/Test/WebApp/WebDriver.hs | agpl-3.0 | -- | Trigger angular service factory and store created service into
-- the scope (under its own name). Accepts a list of angular modules
-- required for constructing the injector ("ng" is implicit).
evalRegisterService :: (WebDriver wd) => ST -> [ST] -> ST -> wd ()
evalRegisterService serviceNick angularModules serviceName =
evalJS' [("mods", JSArg ("ng" : angularModules)), ("service", JSArg serviceName)]
[ "var i = angular.injector(mods);"
, jsscopeSet serviceNick $ "i.get(service)"
] | 519 | evalRegisterService :: (WebDriver wd) => ST -> [ST] -> ST -> wd ()
evalRegisterService serviceNick angularModules serviceName =
evalJS' [("mods", JSArg ("ng" : angularModules)), ("service", JSArg serviceName)]
[ "var i = angular.injector(mods);"
, jsscopeSet serviceNick $ "i.get(service)"
] | 319 | evalRegisterService serviceNick angularModules serviceName =
evalJS' [("mods", JSArg ("ng" : angularModules)), ("service", JSArg serviceName)]
[ "var i = angular.injector(mods);"
, jsscopeSet serviceNick $ "i.get(service)"
] | 252 | true | true | 0 | 10 | 99 | 99 | 54 | 45 | null | null |
YoshikuniJujo/forest | subprojects/tls-analysis/ecc/testEcc.hs | bsd-3-clause | mp = m `mul` p | 14 | mp = m `mul` p | 14 | mp = m `mul` p | 14 | false | false | 0 | 5 | 4 | 12 | 7 | 5 | null | null |
ducis/haAni | hs/common/Graphics/UI/GLUT/Menu.hs | gpl-2.0 | -- | Returns 'True' if the given menu identifier refers to a real menu, not
-- a pseudo one.
isRealMenu :: MenuID -> Bool
isRealMenu = (/= 0) | 142 | isRealMenu :: MenuID -> Bool
isRealMenu = (/= 0) | 48 | isRealMenu = (/= 0) | 19 | true | true | 0 | 5 | 28 | 21 | 13 | 8 | null | null |
tittoassini/flat | src/Flat/Filler.hs | bsd-3-clause | -- |Length of a filler in bits
fillerLength :: Num a => Filler -> a
fillerLength FillerEnd = 1 | 98 | fillerLength :: Num a => Filler -> a
fillerLength FillerEnd = 1 | 67 | fillerLength FillerEnd = 1 | 30 | true | true | 0 | 8 | 22 | 32 | 14 | 18 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/course/2014-06-upenn/cis194/src/HW08_HC.hs | unlicense | ------------------------------------------------------------------------------
-- Exercise 5 -- TODO
ex5 :: T.Test
ex5 = T.TestList
[
] | 144 | ex5 :: T.Test
ex5 = T.TestList
[
] | 42 | ex5 = T.TestList
[
] | 28 | true | true | 0 | 6 | 22 | 22 | 12 | 10 | null | null |
hferreiro/replay | compiler/cmm/PprC.hs | bsd-3-clause | pprLit1 lit@(CmmLabelDiffOff _ _ _) = parens (pprLit lit) | 57 | pprLit1 lit@(CmmLabelDiffOff _ _ _) = parens (pprLit lit) | 57 | pprLit1 lit@(CmmLabelDiffOff _ _ _) = parens (pprLit lit) | 57 | false | false | 1 | 7 | 8 | 36 | 15 | 21 | null | null |
rahulmutt/ghcvm | compiler/Eta/CodeGen/Prim.hs | bsd-3-clause | simpleOp FloatFabsOp = Just $
normalOp $ invokestatic $ mkMethodRef "java/lang/Math" "abs" [jfloat] (ret jfloat) | 114 | simpleOp FloatFabsOp = Just $
normalOp $ invokestatic $ mkMethodRef "java/lang/Math" "abs" [jfloat] (ret jfloat) | 114 | simpleOp FloatFabsOp = Just $
normalOp $ invokestatic $ mkMethodRef "java/lang/Math" "abs" [jfloat] (ret jfloat) | 114 | false | false | 0 | 8 | 16 | 39 | 19 | 20 | null | null |
vimster/stocker | src/Yahoofinance.hs | bsd-3-clause | transformHistoricalData :: Maybe QuoteList -> QuoteMap
transformHistoricalData (Just (QuoteList q)) =
Map.fromList $ map (\a -> (symbol (head a), sort a)) groupedBySymbol
where
groupedBySymbol = groupBy (Func.on (==) symbol) q | 234 | transformHistoricalData :: Maybe QuoteList -> QuoteMap
transformHistoricalData (Just (QuoteList q)) =
Map.fromList $ map (\a -> (symbol (head a), sort a)) groupedBySymbol
where
groupedBySymbol = groupBy (Func.on (==) symbol) q | 234 | transformHistoricalData (Just (QuoteList q)) =
Map.fromList $ map (\a -> (symbol (head a), sort a)) groupedBySymbol
where
groupedBySymbol = groupBy (Func.on (==) symbol) q | 179 | false | true | 0 | 12 | 37 | 95 | 48 | 47 | null | null |
lpeterse/koka | src/Core/Parse.hs | apache-2.0 | typeParams1 env
= angles (tbinders env) | 42 | typeParams1 env
= angles (tbinders env) | 42 | typeParams1 env
= angles (tbinders env) | 42 | false | false | 0 | 7 | 8 | 18 | 8 | 10 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | happyReduce_165 = happyMonadReduce 6# 51# happyReduction_165 | 60 | happyReduce_165 = happyMonadReduce 6# 51# happyReduction_165 | 60 | happyReduce_165 = happyMonadReduce 6# 51# happyReduction_165 | 60 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
mvidner/projecteuler | src/PE0028.hs | mit | sumCorners :: Integer -> Integer
sumCorners 0 = 1 | 49 | sumCorners :: Integer -> Integer
sumCorners 0 = 1 | 49 | sumCorners 0 = 1 | 16 | false | true | 0 | 7 | 8 | 24 | 10 | 14 | null | null |
abakst/liquidhaskell | src/Language/Haskell/Liquid/Constraint/Split.hs | bsd-3-clause | splitW :: WfC -> CG [FixWfC]
--------------------------------------------------------------------------------
splitW (WfC γ t@(RFun x t1 t2 _))
= do ws <- bsplitW γ t
ws' <- splitW (WfC γ t1)
γ' <- (γ, "splitW") += (x, t1)
ws'' <- splitW (WfC γ' t2)
return $ ws ++ ws' ++ ws'' | 317 | splitW :: WfC -> CG [FixWfC]
splitW (WfC γ t@(RFun x t1 t2 _))
= do ws <- bsplitW γ t
ws' <- splitW (WfC γ t1)
γ' <- (γ, "splitW") += (x, t1)
ws'' <- splitW (WfC γ' t2)
return $ ws ++ ws' ++ ws'' | 236 | splitW (WfC γ t@(RFun x t1 t2 _))
= do ws <- bsplitW γ t
ws' <- splitW (WfC γ t1)
γ' <- (γ, "splitW") += (x, t1)
ws'' <- splitW (WfC γ' t2)
return $ ws ++ ws' ++ ws'' | 206 | true | true | 0 | 10 | 88 | 134 | 66 | 68 | null | null |
andyarvanitis/Idris-dev | src/Idris/Core/ProofTerm.hs | bsd-3-clause | bound_in_term _ = [] | 20 | bound_in_term _ = [] | 20 | bound_in_term _ = [] | 20 | false | false | 0 | 5 | 3 | 11 | 5 | 6 | null | null |
jberryman/wai | warp/test/RunSpec.hs | mit | ignoreBody :: CounterApplication
ignoreBody icount req f = do
if (requestMethod req `elem` ["GET", "POST"])
then incr icount
else err icount ("Invalid request method" :: String, requestMethod req)
f $ responseLBS status200 [] "Ignored the body" | 268 | ignoreBody :: CounterApplication
ignoreBody icount req f = do
if (requestMethod req `elem` ["GET", "POST"])
then incr icount
else err icount ("Invalid request method" :: String, requestMethod req)
f $ responseLBS status200 [] "Ignored the body" | 268 | ignoreBody icount req f = do
if (requestMethod req `elem` ["GET", "POST"])
then incr icount
else err icount ("Invalid request method" :: String, requestMethod req)
f $ responseLBS status200 [] "Ignored the body" | 235 | false | true | 0 | 10 | 59 | 83 | 43 | 40 | null | null |
binarybana/grn-pathways | GRN/Sparse.hs | bsd-2-clause | normalizeSSD :: SSD -> (Double,SSA)
normalizeSSD ssd = let fac=U.sum ssd in (fac, U.map (*(1/fac)) ssd) | 103 | normalizeSSD :: SSD -> (Double,SSA)
normalizeSSD ssd = let fac=U.sum ssd in (fac, U.map (*(1/fac)) ssd) | 103 | normalizeSSD ssd = let fac=U.sum ssd in (fac, U.map (*(1/fac)) ssd) | 67 | false | true | 0 | 11 | 15 | 64 | 34 | 30 | null | null |
hpacheco/jasminv | src/Language/Jasmin/TypeChecker.hs | gpl-3.0 | tt_lvalue_r p (PLArray x pi) = do
x' <- tt_var x True
i <- tt_index pi
ty <- tt_as_array p (locTyNote "tt_lvalue_array" x')
return (PLArray x' i,Just ty) | 169 | tt_lvalue_r p (PLArray x pi) = do
x' <- tt_var x True
i <- tt_index pi
ty <- tt_as_array p (locTyNote "tt_lvalue_array" x')
return (PLArray x' i,Just ty) | 169 | tt_lvalue_r p (PLArray x pi) = do
x' <- tt_var x True
i <- tt_index pi
ty <- tt_as_array p (locTyNote "tt_lvalue_array" x')
return (PLArray x' i,Just ty) | 169 | false | false | 0 | 10 | 43 | 81 | 36 | 45 | null | null |
bermanjosh/bloodhound | tests/V1/tests.hs | bsd-3-clause | exampleTweet :: Tweet
exampleTweet = Tweet { user = "bitemyapp"
, postDate = UTCTime
(ModifiedJulianDay 55000)
(secondsToDiffTime 10)
, message = "Use haskell!"
, age = 10000
, location = Location 40.12 (-71.34)
, extra = Nothing } | 414 | exampleTweet :: Tweet
exampleTweet = Tweet { user = "bitemyapp"
, postDate = UTCTime
(ModifiedJulianDay 55000)
(secondsToDiffTime 10)
, message = "Use haskell!"
, age = 10000
, location = Location 40.12 (-71.34)
, extra = Nothing } | 414 | exampleTweet = Tweet { user = "bitemyapp"
, postDate = UTCTime
(ModifiedJulianDay 55000)
(secondsToDiffTime 10)
, message = "Use haskell!"
, age = 10000
, location = Location 40.12 (-71.34)
, extra = Nothing } | 392 | false | true | 0 | 9 | 220 | 76 | 44 | 32 | null | null |
diffusionkinetics/open | dampf/lib/Dampf/Browse.hs | mit | browse :: (MonadIO m, MonadThrow m) => Backend -> DampfT m ()
browse b =
let go (Browser name' spec args) = do
(hosts, argsTweak, container_names, netName) <- fakeHostsArgs
void . runDockerT $ runWith (args . argsTweak) name' spec
cleanUp netName (name' : container_names)
in case b of
VNC -> go chrome_vnc
X11 -> go chrome_x11 | 378 | browse :: (MonadIO m, MonadThrow m) => Backend -> DampfT m ()
browse b =
let go (Browser name' spec args) = do
(hosts, argsTweak, container_names, netName) <- fakeHostsArgs
void . runDockerT $ runWith (args . argsTweak) name' spec
cleanUp netName (name' : container_names)
in case b of
VNC -> go chrome_vnc
X11 -> go chrome_x11 | 378 | browse b =
let go (Browser name' spec args) = do
(hosts, argsTweak, container_names, netName) <- fakeHostsArgs
void . runDockerT $ runWith (args . argsTweak) name' spec
cleanUp netName (name' : container_names)
in case b of
VNC -> go chrome_vnc
X11 -> go chrome_x11 | 316 | false | true | 0 | 14 | 106 | 145 | 71 | 74 | null | null |
mikeroll/fcm | library/FCM.hs | mit | nextMemberships :: DistanceFunc -> Double -> [Vector] -> [Vector] -> Matrix
nextMemberships df m objects centers = transpose $ map nextMembership objects
where
nextMembership object = map nextCoef centers
where
nextCoef center = (1 /) . sum $ map term centers
where
term center' = (df object center / df object center') ** (2 / (m - 1))
-- | converges memberships matrix to within given threshold | 439 | nextMemberships :: DistanceFunc -> Double -> [Vector] -> [Vector] -> Matrix
nextMemberships df m objects centers = transpose $ map nextMembership objects
where
nextMembership object = map nextCoef centers
where
nextCoef center = (1 /) . sum $ map term centers
where
term center' = (df object center / df object center') ** (2 / (m - 1))
-- | converges memberships matrix to within given threshold | 439 | nextMemberships df m objects centers = transpose $ map nextMembership objects
where
nextMembership object = map nextCoef centers
where
nextCoef center = (1 /) . sum $ map term centers
where
term center' = (df object center / df object center') ** (2 / (m - 1))
-- | converges memberships matrix to within given threshold | 363 | false | true | 0 | 9 | 109 | 141 | 71 | 70 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/Selection.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/Selection.collapseToStart Mozilla Selection.collapseToStart documentation>
collapseToStart :: (MonadDOM m) => Selection -> m ()
collapseToStart self
= liftDOM (void (self ^. jsf "collapseToStart" ())) | 258 | collapseToStart :: (MonadDOM m) => Selection -> m ()
collapseToStart self
= liftDOM (void (self ^. jsf "collapseToStart" ())) | 127 | collapseToStart self
= liftDOM (void (self ^. jsf "collapseToStart" ())) | 74 | true | true | 0 | 11 | 27 | 56 | 28 | 28 | null | null |
spechub/Hets | HasCASL/HToken.hs | gpl-2.0 | -- | constructor 'Id'
hconsId :: GenParser Char st Id
hconsId = mixId (barS : hascasl_reserved_ops, hascasl_reserved_words) hcKeys | 130 | hconsId :: GenParser Char st Id
hconsId = mixId (barS : hascasl_reserved_ops, hascasl_reserved_words) hcKeys | 108 | hconsId = mixId (barS : hascasl_reserved_ops, hascasl_reserved_words) hcKeys | 76 | true | true | 1 | 7 | 17 | 39 | 18 | 21 | null | null |
rueshyna/gogol | gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs | mpl-2.0 | -- | A format describing how number values should be represented to the user.
cfNumberFormat :: Lens' CellFormat (Maybe NumberFormat)
cfNumberFormat
= lens _cfNumberFormat
(\ s a -> s{_cfNumberFormat = a}) | 213 | cfNumberFormat :: Lens' CellFormat (Maybe NumberFormat)
cfNumberFormat
= lens _cfNumberFormat
(\ s a -> s{_cfNumberFormat = a}) | 135 | cfNumberFormat
= lens _cfNumberFormat
(\ s a -> s{_cfNumberFormat = a}) | 79 | true | true | 1 | 9 | 38 | 51 | 25 | 26 | null | null |
shnarazk/mios | src/SAT/Mios/Util/DIMACS/Writer.hs | gpl-3.0 | toLatexString :: [[Int]] -> String
toLatexString l = "\\begin{eqnarray*}\n" ++ intercalate a ["(" ++ intercalate o [ lit x | x <- c] ++ ")" | c <- l] ++ "\n\\end{eqnarray*}"
where
lit x
| 0 <= x = "X_{" ++ show x ++ "}"
| otherwise = "\\overline{X_{" ++ show (abs x) ++ "}}"
a = " \n\\wedge "
o = " \\vee " | 333 | toLatexString :: [[Int]] -> String
toLatexString l = "\\begin{eqnarray*}\n" ++ intercalate a ["(" ++ intercalate o [ lit x | x <- c] ++ ")" | c <- l] ++ "\n\\end{eqnarray*}"
where
lit x
| 0 <= x = "X_{" ++ show x ++ "}"
| otherwise = "\\overline{X_{" ++ show (abs x) ++ "}}"
a = " \n\\wedge "
o = " \\vee " | 333 | toLatexString l = "\\begin{eqnarray*}\n" ++ intercalate a ["(" ++ intercalate o [ lit x | x <- c] ++ ")" | c <- l] ++ "\n\\end{eqnarray*}"
where
lit x
| 0 <= x = "X_{" ++ show x ++ "}"
| otherwise = "\\overline{X_{" ++ show (abs x) ++ "}}"
a = " \n\\wedge "
o = " \\vee " | 297 | false | true | 2 | 14 | 91 | 145 | 70 | 75 | null | null |
athanclark/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reflectErasure RNotErased = Var (tacN "NotErased") | 50 | reflectErasure RNotErased = Var (tacN "NotErased") | 50 | reflectErasure RNotErased = Var (tacN "NotErased") | 50 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
dicomgrid/dicom-haskell-library | src/Data/DICOM/Dictionary.hs | gpl-3.0 | regionlocationminx0 :: B.ByteString -> Element
regionlocationminx0 = ul $ tag (TagGroup 0x0018) (TagElement 0x6018) | 115 | regionlocationminx0 :: B.ByteString -> Element
regionlocationminx0 = ul $ tag (TagGroup 0x0018) (TagElement 0x6018) | 115 | regionlocationminx0 = ul $ tag (TagGroup 0x0018) (TagElement 0x6018) | 68 | false | true | 2 | 7 | 13 | 45 | 20 | 25 | null | null |
spacekitteh/smcghc | libraries/base/GHC/Event/Internal.hs | bsd-3-clause | evtConcat :: [Event] -> Event
evtConcat = foldl' evtCombine evtNothing | 70 | evtConcat :: [Event] -> Event
evtConcat = foldl' evtCombine evtNothing | 70 | evtConcat = foldl' evtCombine evtNothing | 40 | false | true | 0 | 6 | 9 | 23 | 12 | 11 | null | null |
grafi-tt/Maizul | fpu-misc/original/fadd-grafi/Test.hs | bsd-2-clause | wordToDouble :: Word64 -> Double
wordToDouble x = runST (cast x) | 64 | wordToDouble :: Word64 -> Double
wordToDouble x = runST (cast x) | 64 | wordToDouble x = runST (cast x) | 31 | false | true | 0 | 7 | 10 | 33 | 14 | 19 | null | null |
spinda/liquidhaskell | tests/gsoc15/unknown/pos/RBTree-col-height.hs | bsd-3-clause | makeBlack Leaf = Leaf | 31 | makeBlack Leaf = Leaf | 31 | makeBlack Leaf = Leaf | 31 | false | false | 0 | 5 | 13 | 9 | 4 | 5 | null | null |
bkoropoff/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | pprintRaw bound (RForce r) =
enclose lparen rparen . group . align . hang 2 $
vsep [text "RForce", pprintRaw bound r] | 121 | pprintRaw bound (RForce r) =
enclose lparen rparen . group . align . hang 2 $
vsep [text "RForce", pprintRaw bound r] | 121 | pprintRaw bound (RForce r) =
enclose lparen rparen . group . align . hang 2 $
vsep [text "RForce", pprintRaw bound r] | 121 | false | false | 1 | 7 | 25 | 63 | 27 | 36 | null | null |
mightymoose/liquidhaskell | benchmarks/vector-0.10.0.1/Data/Vector/Mutable.hs | bsd-3-clause | grow = G.grow | 13 | grow = G.grow | 13 | grow = G.grow | 13 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
ardumont/haskell-lab | src/programming-in-haskell/ch5.hs | gpl-2.0 | -- prime 1 -- False
-- prime 2 -- True
-- prime 3 -- True
-- prime 4 -- False
-- prime 7 -- True
primes :: Int -> [Int]
primes n = [x | x <- [1..n], prime x] | 158 | primes :: Int -> [Int]
primes n = [x | x <- [1..n], prime x] | 60 | primes n = [x | x <- [1..n], prime x] | 37 | true | true | 0 | 8 | 40 | 49 | 28 | 21 | null | null |
amccausl/Swish | Swish/HaskellRDF/RDFDatatypeXsdInteger.hs | lgpl-2.1 | axiomsXsdInteger =
[ mkAxiom "dt" "xsd:integer rdf:type rdfs:Datatype ."
] | 89 | axiomsXsdInteger =
[ mkAxiom "dt" "xsd:integer rdf:type rdfs:Datatype ."
] | 89 | axiomsXsdInteger =
[ mkAxiom "dt" "xsd:integer rdf:type rdfs:Datatype ."
] | 89 | false | false | 0 | 6 | 24 | 14 | 7 | 7 | null | null |
cabrera/ghc-mod | Language/Haskell/GhcMod/Error.hs | bsd-3-clause | modifyError' :: MonadError e m => m a -> (e -> e) -> m a
modifyError' = flip modifyError | 88 | modifyError' :: MonadError e m => m a -> (e -> e) -> m a
modifyError' = flip modifyError | 88 | modifyError' = flip modifyError | 31 | false | true | 0 | 9 | 18 | 44 | 21 | 23 | null | null |
oldmanmike/opensandbox | test/OpenSandbox/CommandLineSpec.hs | gpl-3.0 | main :: IO ()
main = hspec spec | 31 | main :: IO ()
main = hspec spec | 31 | main = hspec spec | 17 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
GaloisInc/saw-script | src/SAWScript/Prover/MRSolver/Monad.hs | bsd-3-clause | -- | Run a compuation under an additional co-inductive assumption
withCoIndHyp :: CoIndHyp -> MRM a -> MRM a
withCoIndHyp hyp m =
do debugPretty 2 ("withCoIndHyp" <+> ppInEmptyCtx hyp)
hyps' <- Map.insert (coIndHypLHSFun hyp,
coIndHypRHSFun hyp) hyp <$> mrCoIndHyps
local (\info -> info { mriCoIndHyps = hyps' }) m
-- | Generate fresh evars for the context of a 'CoIndHyp' and
-- substitute them into its arguments and right-hand side | 473 | withCoIndHyp :: CoIndHyp -> MRM a -> MRM a
withCoIndHyp hyp m =
do debugPretty 2 ("withCoIndHyp" <+> ppInEmptyCtx hyp)
hyps' <- Map.insert (coIndHypLHSFun hyp,
coIndHypRHSFun hyp) hyp <$> mrCoIndHyps
local (\info -> info { mriCoIndHyps = hyps' }) m
-- | Generate fresh evars for the context of a 'CoIndHyp' and
-- substitute them into its arguments and right-hand side | 407 | withCoIndHyp hyp m =
do debugPretty 2 ("withCoIndHyp" <+> ppInEmptyCtx hyp)
hyps' <- Map.insert (coIndHypLHSFun hyp,
coIndHypRHSFun hyp) hyp <$> mrCoIndHyps
local (\info -> info { mriCoIndHyps = hyps' }) m
-- | Generate fresh evars for the context of a 'CoIndHyp' and
-- substitute them into its arguments and right-hand side | 364 | true | true | 0 | 11 | 109 | 105 | 52 | 53 | null | null |
stulli/projectEuler | eu17.hs | bsd-3-clause | t 13 = "thirteen" | 17 | t 13 = "thirteen" | 17 | t 13 = "thirteen" | 17 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.