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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
gereeter/bounded-intmap | src/Data/IntMap/Bounded/Strict.hs | mit | -- | /O(n)/. Map values and separate the 'Left' and 'Right' results.
--
-- > let f a = if a < "c" then Left a else Right a
-- > mapEither f (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])
-- > == (fromList [(3,"b"), (5,"a")], fromList [(1,"x"), (7,"z")])
-- >
-- > mapEither (\ a -> Right a) (fromList [(5,"a"), (3,"... | 559 | mapEither :: (a -> Either b c) -> IntMap a -> (IntMap b, IntMap c)
mapEither f (IntMap m) = let (m1, m2) = W.mapEither f m in (IntMap m1, IntMap m2) | 148 | mapEither f (IntMap m) = let (m1, m2) = W.mapEither f m in (IntMap m1, IntMap m2) | 81 | true | true | 0 | 10 | 110 | 108 | 55 | 53 | null | null |
vito/atomo | src/Atomo/Environment.hs | bsd-3-clause | define :: Message Pattern -> Expr -> VM ()
define !p !e = do
is <- gets primitives
newp <- matchable p
m <- method newp e
os <- targets is newp
forM_ os (flip defineOn m)
where
method p' (EPrimitive _ v) = return (Slot p' v)
method p' e' = gets top >>= \t -> return (Responder p' t e')
--... | 389 | define :: Message Pattern -> Expr -> VM ()
define !p !e = do
is <- gets primitives
newp <- matchable p
m <- method newp e
os <- targets is newp
forM_ os (flip defineOn m)
where
method p' (EPrimitive _ v) = return (Slot p' v)
method p' e' = gets top >>= \t -> return (Responder p' t e')
--... | 389 | define !p !e = do
is <- gets primitives
newp <- matchable p
m <- method newp e
os <- targets is newp
forM_ os (flip defineOn m)
where
method p' (EPrimitive _ v) = return (Slot p' v)
method p' e' = gets top >>= \t -> return (Responder p' t e')
-- | Swap out a reference match with PThis, f... | 346 | false | true | 0 | 9 | 107 | 162 | 73 | 89 | null | null |
brendanhay/gogol | gogol-people/gen/Network/Google/People/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'FileAs' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'faValue'
--
-- * 'faMetadata'
fileAs
:: FileAs
fileAs = FileAs' {_faValue = Nothing, _faMetadata = Nothing} | 278 | fileAs
:: FileAs
fileAs = FileAs' {_faValue = Nothing, _faMetadata = Nothing} | 81 | fileAs = FileAs' {_faValue = Nothing, _faMetadata = Nothing} | 60 | true | true | 0 | 6 | 53 | 32 | 22 | 10 | null | null |
cryptica/CodeEval | Challenges/132_TheMajorElement/main.hs | gpl-3.0 | processLine :: T.Text -> T.Text
processLine line =
let elements = T.split (==',') line
major = majorElement elements
in case major of
Nothing -> T.pack "None"
Just m -> m | 211 | processLine :: T.Text -> T.Text
processLine line =
let elements = T.split (==',') line
major = majorElement elements
in case major of
Nothing -> T.pack "None"
Just m -> m | 211 | processLine line =
let elements = T.split (==',') line
major = majorElement elements
in case major of
Nothing -> T.pack "None"
Just m -> m | 179 | false | true | 0 | 11 | 70 | 76 | 37 | 39 | null | null |
goshakkk/hadis | src/Hadis/Util/Commands.hs | mit | on :: Pred -> (Maybe Value -> a) -> (a -> ReplyVal) -> Key -> CommandReply
on pred mapper val k = ensure pred k >> gets (val . mapper . Map.lookup k) | 149 | on :: Pred -> (Maybe Value -> a) -> (a -> ReplyVal) -> Key -> CommandReply
on pred mapper val k = ensure pred k >> gets (val . mapper . Map.lookup k) | 149 | on pred mapper val k = ensure pred k >> gets (val . mapper . Map.lookup k) | 74 | false | true | 0 | 10 | 32 | 85 | 41 | 44 | null | null |
Gabriel439/suns-search | src/AMQP/Error.hs | gpl-3.0 | -- | Wrapper around 'A.bindQueue' that outputs additional debug information
bindQueue :: A.Channel -> QueueName -> ExchangeName -> RoutingKey -> IO ()
bindQueue channel qName xName routingKey = do
A.bindQueue channel qName xName routingKey
info $ debugBindQueue qName xName routingKey | 292 | bindQueue :: A.Channel -> QueueName -> ExchangeName -> RoutingKey -> IO ()
bindQueue channel qName xName routingKey = do
A.bindQueue channel qName xName routingKey
info $ debugBindQueue qName xName routingKey | 216 | bindQueue channel qName xName routingKey = do
A.bindQueue channel qName xName routingKey
info $ debugBindQueue qName xName routingKey | 141 | true | true | 0 | 10 | 47 | 72 | 34 | 38 | null | null |
jfischoff/th-instances | src/Language/Haskell/TH/Instances.hs | bsd-3-clause | replace_symbol x = x | 20 | replace_symbol x = x | 20 | replace_symbol x = x | 20 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
jwiegley/ghc-release | libraries/base/GHC/Event/TimerManager.hs | gpl-3.0 | editTimeouts :: TimerManager -> TimeoutEdit -> IO ()
editTimeouts mgr g = atomicModifyIORef' (emTimeouts mgr) $ \tq -> (g tq, ()) | 129 | editTimeouts :: TimerManager -> TimeoutEdit -> IO ()
editTimeouts mgr g = atomicModifyIORef' (emTimeouts mgr) $ \tq -> (g tq, ()) | 129 | editTimeouts mgr g = atomicModifyIORef' (emTimeouts mgr) $ \tq -> (g tq, ()) | 76 | false | true | 0 | 8 | 20 | 58 | 29 | 29 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Vector.Unboxed.hs | bsd-3-clause | concat = G.concat | 17 | concat = G.concat | 17 | concat = G.concat | 17 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
ppenzin/neko-lib-hs | src/lib/Binary/Neko/Instructions.hs | bsd-2-clause | hasParam (SetIndex _) = True | 30 | hasParam (SetIndex _) = True | 30 | hasParam (SetIndex _) = True | 30 | false | false | 0 | 7 | 6 | 15 | 7 | 8 | null | null |
brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/AggregatedList.hs | mpl-2.0 | -- | Sorts list results by a certain order. By default, results are returned
-- in alphanumerical order based on the resource name. You can also sort
-- results in descending order based on the creation timestamp using
-- \`orderBy=\"creationTimestamp desc\"\`. This sorts results based on the
-- \`creationTimestamp\` f... | 693 | tvgalOrderBy :: Lens' TargetVPNGatewaysAggregatedList (Maybe Text)
tvgalOrderBy
= lens _tvgalOrderBy (\ s a -> s{_tvgalOrderBy = a}) | 134 | tvgalOrderBy
= lens _tvgalOrderBy (\ s a -> s{_tvgalOrderBy = a}) | 67 | true | true | 1 | 9 | 103 | 59 | 32 | 27 | null | null |
cdepillabout/lens | src/Control/Lens/Wrapped.hs | bsd-3-clause | getRecConError :: RecConError -> String
getRecConError (RecConError x) = x | 74 | getRecConError :: RecConError -> String
getRecConError (RecConError x) = x | 74 | getRecConError (RecConError x) = x | 34 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
dorchard/array-memoize | benchmark.hs | bsd-2-clause | main = defaultMain [
bcompare[ bench "memoFix 1000" $ whnf (memoFix fib') 1000,
bench "memoFix 5000" $ whnf (memoFix fib') 5000,
bench "arryMemoFix 1000/1000" $ whnf (fibS 1000) 1000,
bench "arrayMemoFix 1000/5000" $ whnf (fibS 5000) 1000,
... | 627 | main = defaultMain [
bcompare[ bench "memoFix 1000" $ whnf (memoFix fib') 1000,
bench "memoFix 5000" $ whnf (memoFix fib') 5000,
bench "arryMemoFix 1000/1000" $ whnf (fibS 1000) 1000,
bench "arrayMemoFix 1000/5000" $ whnf (fibS 5000) 1000,
... | 627 | main = defaultMain [
bcompare[ bench "memoFix 1000" $ whnf (memoFix fib') 1000,
bench "memoFix 5000" $ whnf (memoFix fib') 5000,
bench "arryMemoFix 1000/1000" $ whnf (fibS 1000) 1000,
bench "arrayMemoFix 1000/5000" $ whnf (fibS 5000) 1000,
... | 627 | false | false | 0 | 12 | 216 | 183 | 87 | 96 | null | null |
kvelicka/Fizz | CellTypes.hs | lgpl-2.1 | locateTriPrism n A = Vertex3 n (2*n) 0.0 | 43 | locateTriPrism n A = Vertex3 n (2*n) 0.0 | 43 | locateTriPrism n A = Vertex3 n (2*n) 0.0 | 43 | false | false | 0 | 7 | 10 | 25 | 12 | 13 | null | null |
suhailshergill/liboleg | Language/TEval/TInfLetP.hs | bsd-3-clause | freevars (t1 :> t2) = freevars t1 ++ freevars t2 | 48 | freevars (t1 :> t2) = freevars t1 ++ freevars t2 | 48 | freevars (t1 :> t2) = freevars t1 ++ freevars t2 | 48 | false | false | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
mcschroeder/ghc | compiler/hsSyn/HsBinds.hs | bsd-3-clause | ppr_sig (IdSig id) = pprVarSig [id] (ppr (varType id)) | 64 | ppr_sig (IdSig id) = pprVarSig [id] (ppr (varType id)) | 64 | ppr_sig (IdSig id) = pprVarSig [id] (ppr (varType id)) | 64 | false | false | 0 | 9 | 18 | 36 | 17 | 19 | null | null |
antalsz/hs-to-coq | src/lib/HsToCoq/ConvertHaskell/Parameters/Parsers/Lexing.hs | mit | tokenDescription TokNewline = "newline" | 43 | tokenDescription TokNewline = "newline" | 43 | tokenDescription TokNewline = "newline" | 43 | false | false | 0 | 5 | 7 | 9 | 4 | 5 | null | null |
GaloisInc/ivory | ivory-opts/src/Ivory/Opts/AssertFold.hs | bsd-3-clause | expFoldDefault :: ExpFold -> I.Type -> I.Expr -> FolderStmt ()
expFoldDefault asserter ty e = case e of
I.ExpSym{} -> go e
I.ExpExtern{} -> go e
I.ExpVar{} -> go e
I.ExpLit{} -> go e
I.ExpLabel ty' e0 _str -> do go e
... | 1,500 | expFoldDefault :: ExpFold -> I.Type -> I.Expr -> FolderStmt ()
expFoldDefault asserter ty e = case e of
I.ExpSym{} -> go e
I.ExpExtern{} -> go e
I.ExpVar{} -> go e
I.ExpLit{} -> go e
I.ExpLabel ty' e0 _str -> do go e
... | 1,500 | expFoldDefault asserter ty e = case e of
I.ExpSym{} -> go e
I.ExpExtern{} -> go e
I.ExpVar{} -> go e
I.ExpLit{} -> go e
I.ExpLabel ty' e0 _str -> do go e
expFold ty' e0
I.ExpIndex tIdx... | 1,436 | false | true | 8 | 9 | 629 | 239 | 131 | 108 | null | null |
codemac/yi-editor | src/Yi/Completion.hs | gpl-2.0 | -------------------------------------------
-- General completion
mkIsPrefixOf :: Bool -> String -> String -> Bool
mkIsPrefixOf caseSensitive = if caseSensitive
then isPrefixOf
else isPrefixOfIC
where isPrefixOfIC x y = map toLower x `isPrefixOf` map toLower... | 384 | mkIsPrefixOf :: Bool -> String -> String -> Bool
mkIsPrefixOf caseSensitive = if caseSensitive
then isPrefixOf
else isPrefixOfIC
where isPrefixOfIC x y = map toLower x `isPrefixOf` map toLower y
-- | Prefix matching function, for use with 'completeInList' | 317 | mkIsPrefixOf caseSensitive = if caseSensitive
then isPrefixOf
else isPrefixOfIC
where isPrefixOfIC x y = map toLower x `isPrefixOf` map toLower y
-- | Prefix matching function, for use with 'completeInList' | 268 | true | true | 0 | 7 | 105 | 65 | 35 | 30 | null | null |
maffh92/AFP-ANT | src/Abstractions.hs | bsd-3-clause | -- | Pickup always
pickup__ :: (MonadFix m, Label l)
=> AntT m l ()
pickup__ = pickup (return ()) (return ()) | 118 | pickup__ :: (MonadFix m, Label l)
=> AntT m l ()
pickup__ = pickup (return ()) (return ()) | 99 | pickup__ = pickup (return ()) (return ()) | 41 | true | true | 0 | 8 | 30 | 57 | 29 | 28 | null | null |
tsbattman/havro | src/Data/Avro/Encoding.hs | apache-2.0 | shiftLogicalR :: FiniteBits a => a -> Int -> a
shiftLogicalR a n = (a `shiftR` n) .&. complement mask
where mask = setBit zeroBits (finiteBitSize a - 1) `shiftR` (n - 1) | 171 | shiftLogicalR :: FiniteBits a => a -> Int -> a
shiftLogicalR a n = (a `shiftR` n) .&. complement mask
where mask = setBit zeroBits (finiteBitSize a - 1) `shiftR` (n - 1) | 171 | shiftLogicalR a n = (a `shiftR` n) .&. complement mask
where mask = setBit zeroBits (finiteBitSize a - 1) `shiftR` (n - 1) | 124 | false | true | 0 | 9 | 34 | 83 | 43 | 40 | null | null |
DanGrayson/cubicaltt | Resolver.hs | mit | resolveWhere :: ExpWhere -> Resolver Ter
resolveWhere = resolveExp . unWhere | 76 | resolveWhere :: ExpWhere -> Resolver Ter
resolveWhere = resolveExp . unWhere | 76 | resolveWhere = resolveExp . unWhere | 35 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
gbaz/cabal | cabal-install/Distribution/Client/Dependency/Modular/Cycles.hs | bsd-3-clause | -- | Find and reject any solutions that are cyclic
detectCyclesPhase :: Tree QGoalReasonChain -> Tree QGoalReasonChain
detectCyclesPhase = (`runReader` CS.empty) . cata go
where
-- Most cases are simple; we just need to remember which choices we made
go :: TreeF QGoalReasonChain (DetectCycles (Tree QGoalReas... | 1,456 | detectCyclesPhase :: Tree QGoalReasonChain -> Tree QGoalReasonChain
detectCyclesPhase = (`runReader` CS.empty) . cata go
where
-- Most cases are simple; we just need to remember which choices we made
go :: TreeF QGoalReasonChain (DetectCycles (Tree QGoalReasonChain)) -> DetectCycles (Tree QGoalReasonChain)
... | 1,405 | detectCyclesPhase = (`runReader` CS.empty) . cata go
where
-- Most cases are simple; we just need to remember which choices we made
go :: TreeF QGoalReasonChain (DetectCycles (Tree QGoalReasonChain)) -> DetectCycles (Tree QGoalReasonChain)
go (PChoiceF qpn gr cs) = PChoice qpn gr <$> local (CS.in... | 1,337 | true | true | 2 | 12 | 369 | 374 | 179 | 195 | null | null |
phylake/avm3 | vm/store.hs | mit | xform_opCode {- 0x86 -} i u d s m t (Abc.AsType u30) = [AsType u30 $ m u30] | 75 | xform_opCode {- 0x86 -} i u d s m t (Abc.AsType u30) = [AsType u30 $ m u30] | 75 | xform_opCode {- 0x86 -} i u d s m t (Abc.AsType u30) = [AsType u30 $ m u30] | 75 | false | false | 0 | 8 | 17 | 43 | 21 | 22 | null | null |
google/cabal2bazel | src/Google/Utils/List.hs | apache-2.0 | -- | Removes duplicates, preserving order.
ordNub :: (Ord a) => [a] -> [a]
ordNub = ordNubOn id | 95 | ordNub :: (Ord a) => [a] -> [a]
ordNub = ordNubOn id | 52 | ordNub = ordNubOn id | 20 | true | true | 0 | 7 | 17 | 34 | 19 | 15 | null | null |
odanielb/Spanish-Syllabification | syllabification.hs | mit | isStrong "u" = False | 20 | isStrong "u" = False | 20 | isStrong "u" = False | 20 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 70395 = 4633 | 32 | getValueFromProduct 70395 = 4633 | 32 | getValueFromProduct 70395 = 4633 | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
kim/amazonka | amazonka-iam/gen/Network/AWS/IAM/ListUsers.hs | mpl-2.0 | -- | 'ListUsers' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'luMarker' @::@ 'Maybe' 'Text'
--
-- * 'luMaxItems' @::@ 'Maybe' 'Natural'
--
-- * 'luPathPrefix' @::@ 'Maybe' 'Text'
--
listUsers :: ListUsers
listUsers = ListUsers
{ _luPathPrefix = Nothing
, _luMarker = No... | 361 | listUsers :: ListUsers
listUsers = ListUsers
{ _luPathPrefix = Nothing
, _luMarker = Nothing
, _luMaxItems = Nothing
} | 140 | listUsers = ListUsers
{ _luPathPrefix = Nothing
, _luMarker = Nothing
, _luMaxItems = Nothing
} | 117 | true | true | 0 | 7 | 75 | 45 | 30 | 15 | null | null |
ihc/futhark | src/Futhark/CodeGen/ImpGen/Kernels/ToOpenCL.hs | isc | kernelAndWorkgroupSize (AnyKernel kernel) =
([sizeToExp (kernelNumGroups kernel) *
sizeToExp (kernelGroupSize kernel)],
[sizeToExp $ kernelGroupSize kernel]) | 166 | kernelAndWorkgroupSize (AnyKernel kernel) =
([sizeToExp (kernelNumGroups kernel) *
sizeToExp (kernelGroupSize kernel)],
[sizeToExp $ kernelGroupSize kernel]) | 166 | kernelAndWorkgroupSize (AnyKernel kernel) =
([sizeToExp (kernelNumGroups kernel) *
sizeToExp (kernelGroupSize kernel)],
[sizeToExp $ kernelGroupSize kernel]) | 166 | false | false | 0 | 10 | 23 | 56 | 28 | 28 | null | null |
Garygunn94/DFS | AuthServer/.stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/autogen/Paths_AuthServer.hs | bsd-3-clause | getSysconfDir = catchIO (getEnv "AuthServer_sysconfdir") (\_ -> return sysconfdir) | 82 | getSysconfDir = catchIO (getEnv "AuthServer_sysconfdir") (\_ -> return sysconfdir) | 82 | getSysconfDir = catchIO (getEnv "AuthServer_sysconfdir") (\_ -> return sysconfdir) | 82 | false | false | 0 | 8 | 8 | 28 | 14 | 14 | null | null |
music-suite/music-preludes | examples/annotatations.hs | bsd-3-clause | ntervalAnnotations :: [Interval] -> (Score StandardNote -> Score StandardNote)
intervalAnnotations = foldr1 (.) . zipWith notate (map spanify [0..])
where
spanify :: Duration -> Span
spanify t = (0 .+^ t) >-> 1
notate :: Span -> Interval -> (Score StandardNote -> Score StandardNote)
notate s n = anno... | 413 | intervalAnnotations :: [Interval] -> (Score StandardNote -> Score StandardNote)
intervalAnnotations = foldr1 (.) . zipWith notate (map spanify [0..])
where
spanify :: Duration -> Span
spanify t = (0 .+^ t) >-> 1
notate :: Span -> Interval -> (Score StandardNote -> Score StandardNote)
notate s n = ann... | 413 | intervalAnnotations = foldr1 (.) . zipWith notate (map spanify [0..])
where
spanify :: Duration -> Span
spanify t = (0 .+^ t) >-> 1
notate :: Span -> Interval -> (Score StandardNote -> Score StandardNote)
notate s n = annotateSpan s (" " ++ showIntervalName n)
showIntervalName = filter (/... | 333 | false | true | 1 | 11 | 93 | 173 | 82 | 91 | null | null |
bartfrenk/jira-client | src/Concepts.hs | bsd-3-clause | computeTimeSpent :: ZonedTime -> ZonedTime -> TimeSpent
computeTimeSpent start finish =
let delta = diffUTCTime (zonedTimeToUTC finish) (zonedTimeToUTC start)
in fromSeconds $ truncate (realToFrac delta :: Double) | 217 | computeTimeSpent :: ZonedTime -> ZonedTime -> TimeSpent
computeTimeSpent start finish =
let delta = diffUTCTime (zonedTimeToUTC finish) (zonedTimeToUTC start)
in fromSeconds $ truncate (realToFrac delta :: Double) | 217 | computeTimeSpent start finish =
let delta = diffUTCTime (zonedTimeToUTC finish) (zonedTimeToUTC start)
in fromSeconds $ truncate (realToFrac delta :: Double) | 161 | false | true | 0 | 11 | 30 | 68 | 33 | 35 | null | null |
tijko/Project-Euler | haskell_1-10/Euler_8.hs | mit | main =
do
let big_string = "73167176531330624919225119674426574742355349194934\
\96983520312774506326239578318016984801869478851843\
\85861560789112949495459501737958331952853208805511\
\12540698747158523863050715693290963295227443043557\
... | 1,528 | main =
do
let big_string = "73167176531330624919225119674426574742355349194934\
\96983520312774506326239578318016984801869478851843\
\85861560789112949495459501737958331952853208805511\
\12540698747158523863050715693290963295227443043557\
... | 1,528 | main =
do
let big_string = "73167176531330624919225119674426574742355349194934\
\96983520312774506326239578318016984801869478851843\
\85861560789112949495459501737958331952853208805511\
\12540698747158523863050715693290963295227443043557\
... | 1,528 | false | false | 0 | 9 | 439 | 29 | 13 | 16 | null | null |
robinp/nemnem | tsrc/Test4.hs | bsd-3-clause | foo x = 1 :: Int | 16 | foo x = 1 :: Int | 16 | foo x = 1 :: Int | 16 | false | false | 0 | 4 | 5 | 12 | 6 | 6 | null | null |
diku-dk/futhark | src/Futhark/Optimise/Fusion/LoopKernel.hs | isc | pullReshape :: SOAC -> SOAC.ArrayTransforms -> TryFusion (SOAC, SOAC.ArrayTransforms)
pullReshape (SOAC.Screma _ form inps) ots
| Just maplam <- Futhark.isMapSOAC form,
SOAC.Reshape cs shape SOAC.:< ots' <- SOAC.viewf ots,
all primType $ lambdaReturnType maplam = do
let mapw' = case reverse $ newDims shap... | 1,581 | pullReshape :: SOAC -> SOAC.ArrayTransforms -> TryFusion (SOAC, SOAC.ArrayTransforms)
pullReshape (SOAC.Screma _ form inps) ots
| Just maplam <- Futhark.isMapSOAC form,
SOAC.Reshape cs shape SOAC.:< ots' <- SOAC.viewf ots,
all primType $ lambdaReturnType maplam = do
let mapw' = case reverse $ newDims shap... | 1,581 | pullReshape (SOAC.Screma _ form inps) ots
| Just maplam <- Futhark.isMapSOAC form,
SOAC.Reshape cs shape SOAC.:< ots' <- SOAC.viewf ots,
all primType $ lambdaReturnType maplam = do
let mapw' = case reverse $ newDims shape of
[] -> intConst Int64 0
d : _ -> d
inputs' = map (SOAC... | 1,495 | false | true | 0 | 21 | 528 | 529 | 255 | 274 | null | null |
shlevy/ghc | compiler/iface/BuildTyCl.hs | bsd-3-clause | newTyConRepName :: Name -> TcRnIf gbl lcl TyConRepName
newTyConRepName tc_name
| Just mod <- nameModule_maybe tc_name
, (mod, occ) <- tyConRepModOcc mod (nameOccName tc_name)
= newGlobalBinder mod occ noSrcSpan
| otherwise
= newImplicitBinder tc_name mkTyConRepOcc | 274 | newTyConRepName :: Name -> TcRnIf gbl lcl TyConRepName
newTyConRepName tc_name
| Just mod <- nameModule_maybe tc_name
, (mod, occ) <- tyConRepModOcc mod (nameOccName tc_name)
= newGlobalBinder mod occ noSrcSpan
| otherwise
= newImplicitBinder tc_name mkTyConRepOcc | 274 | newTyConRepName tc_name
| Just mod <- nameModule_maybe tc_name
, (mod, occ) <- tyConRepModOcc mod (nameOccName tc_name)
= newGlobalBinder mod occ noSrcSpan
| otherwise
= newImplicitBinder tc_name mkTyConRepOcc | 219 | false | true | 0 | 11 | 44 | 89 | 41 | 48 | null | null |
alexander-at-github/eta | compiler/ETA/BasicTypes/MkId.hs | bsd-3-clause | -- If the type constructor is a representation type of a data instance, wrap
-- the expression into a cast adjusting the expression type, which is an
-- instance of the representation type, to the corresponding instance of the
-- family instance type.
-- See Note [Wrappers for data instance tycons]
wrapFamInstBody :: T... | 542 | wrapFamInstBody :: TyCon -> [Type] -> CoreExpr -> CoreExpr
wrapFamInstBody tycon args body
| Just co_con <- tyConFamilyCoercion_maybe tycon
= mkCast body (mkSymCo (mkUnbranchedAxInstCo Representational co_con args))
| otherwise
= body | 242 | wrapFamInstBody tycon args body
| Just co_con <- tyConFamilyCoercion_maybe tycon
= mkCast body (mkSymCo (mkUnbranchedAxInstCo Representational co_con args))
| otherwise
= body | 183 | true | true | 0 | 9 | 89 | 93 | 44 | 49 | null | null |
osa1/psc-lua | src/Language/PureScript/CodeGen/Lua.hs | mit | extendObj :: L.Exp -> [(String, L.Exp)] -> CG L.Exp
extendObj obj extensions = do
-- local `fresh` = {}
-- for k, v in pairs(obj) do
-- `fresh`[k] = v
-- end
-- for k, v in `extensions` do
-- `fresh`[k] = `extensions`[k]
-- end
-- return `fresh`
newObjName <- fresh
let newObj... | 1,097 | extendObj :: L.Exp -> [(String, L.Exp)] -> CG L.Exp
extendObj obj extensions = do
-- local `fresh` = {}
-- for k, v in pairs(obj) do
-- `fresh`[k] = v
-- end
-- for k, v in `extensions` do
-- `fresh`[k] = `extensions`[k]
-- end
-- return `fresh`
newObjName <- fresh
let newObj... | 1,097 | extendObj obj extensions = do
-- local `fresh` = {}
-- for k, v in pairs(obj) do
-- `fresh`[k] = v
-- end
-- for k, v in `extensions` do
-- `fresh`[k] = `extensions`[k]
-- end
-- return `fresh`
newObjName <- fresh
let newObj = L.LocalAssign [newObjName] (Just [L.TableConst []... | 1,045 | false | true | 0 | 18 | 402 | 361 | 188 | 173 | null | null |
BeerAndProgramming/BeerAndProgrammingSite | devel.hs | bsd-2-clause | terminateDevel :: IO ()
terminateDevel = exitSuccess | 52 | terminateDevel :: IO ()
terminateDevel = exitSuccess | 52 | terminateDevel = exitSuccess | 28 | false | true | 1 | 6 | 6 | 20 | 8 | 12 | null | null |
gregberns/HaskellKoans | src/Koan.hs | apache-2.0 | koan msg action = it (yellow msg) action | 40 | koan msg action = it (yellow msg) action | 40 | koan msg action = it (yellow msg) action | 40 | false | false | 1 | 7 | 7 | 27 | 10 | 17 | null | null |
joelburget/frankenstein | src/Planetary/Support/Parser.hs | bsd-3-clause | parseLet :: MonadicParsing m => m Tm'
parseLet =
let parser = do
reserved "let"
name <- identifier
_ <- colon
ty <- parsePolyty
_ <- assign
rhs <- parseTm
reserved "in"
body <- parseTm
pure (Let rhs ty name body)
in parser <?> "Let" | 308 | parseLet :: MonadicParsing m => m Tm'
parseLet =
let parser = do
reserved "let"
name <- identifier
_ <- colon
ty <- parsePolyty
_ <- assign
rhs <- parseTm
reserved "in"
body <- parseTm
pure (Let rhs ty name body)
in parser <?> "Let" | 308 | parseLet =
let parser = do
reserved "let"
name <- identifier
_ <- colon
ty <- parsePolyty
_ <- assign
rhs <- parseTm
reserved "in"
body <- parseTm
pure (Let rhs ty name body)
in parser <?> "Let" | 270 | false | true | 0 | 13 | 120 | 108 | 47 | 61 | null | null |
minoki/LambdaQuest | src/LambdaQuest/SystemFsub/Subtype.hs | bsd-3-clause | primSubType _ _ = False | 23 | primSubType _ _ = False | 23 | primSubType _ _ = False | 23 | false | false | 1 | 5 | 4 | 12 | 5 | 7 | null | null |
spockwangs/scheme.in.haskell | list6.4.hs | unlicense | symbolToString [Atom s] = return $ String s | 43 | symbolToString [Atom s] = return $ String s | 43 | symbolToString [Atom s] = return $ String s | 43 | false | false | 0 | 6 | 7 | 23 | 10 | 13 | null | null |
kishoredbn/barrelfish | hake/LibDepTree.hs | mit | ldtDriverModules :: LibDepTree2 -> [(DepEl,DepEl)]
-- concat $ map depS (indices $ gGraph t)
ldtDriverModules t = depS =<< indices (gGraph t)
where
triFst (a,_,_) = a
toNode :: Vertex -> DepEl
toNode = triFst . gNodeFromVertex t
depS :: Vertex -> [(DepEl,DepEl)]
depS = step . ldtDepDfs t . toNode... | 561 | ldtDriverModules :: LibDepTree2 -> [(DepEl,DepEl)]
ldtDriverModules t = depS =<< indices (gGraph t)
where
triFst (a,_,_) = a
toNode :: Vertex -> DepEl
toNode = triFst . gNodeFromVertex t
depS :: Vertex -> [(DepEl,DepEl)]
depS = step . ldtDepDfs t . toNode
step :: Tree DepEl -> [(DepEl,DepEl)... | 519 | ldtDriverModules t = depS =<< indices (gGraph t)
where
triFst (a,_,_) = a
toNode :: Vertex -> DepEl
toNode = triFst . gNodeFromVertex t
depS :: Vertex -> [(DepEl,DepEl)]
depS = step . ldtDepDfs t . toNode
step :: Tree DepEl -> [(DepEl,DepEl)]
step (Node (DepApp arch name) cs) = [ ((DepAp... | 468 | true | true | 2 | 11 | 152 | 279 | 136 | 143 | null | null |
ddssff/lens | src/Data/Vector/Lens.hs | bsd-3-clause | -- | Similar to 'toListOf', but returning a 'Vector'.
--
-- >>> toVectorOf both (8,15) == Vector.fromList [8,15]
-- True
toVectorOf :: Getting (Endo [a]) s a -> s -> Vector a
toVectorOf l s = fromList (toListOf l s) | 215 | toVectorOf :: Getting (Endo [a]) s a -> s -> Vector a
toVectorOf l s = fromList (toListOf l s) | 94 | toVectorOf l s = fromList (toListOf l s) | 40 | true | true | 0 | 9 | 39 | 58 | 30 | 28 | null | null |
catch22/gitit-tasks | src/Network/Gitit/Plugin/Tasks.hs | bsd-3-clause | lookupAggregator _ = Nothing | 28 | lookupAggregator _ = Nothing | 28 | lookupAggregator _ = Nothing | 28 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
cglazner/ibd_particle | src/MyPart.hs | bsd-3-clause | compose :: [a -> a] -> a -> a
compose = foldr (.) id | 52 | compose :: [a -> a] -> a -> a
compose = foldr (.) id | 52 | compose = foldr (.) id | 22 | false | true | 0 | 8 | 13 | 39 | 19 | 20 | null | null |
nevrenato/HetsAlloy | Comorphisms/SuleCFOL2SoftFOL.hs | gpl-2.0 | -- extended formula translation for CASL
formTrCASL :: FormulaTranslator () ()
formTrCASL _ _ = error "SuleCFOL2SoftFOL: No extended formulas allowed in CASL" | 158 | formTrCASL :: FormulaTranslator () ()
formTrCASL _ _ = error "SuleCFOL2SoftFOL: No extended formulas allowed in CASL" | 117 | formTrCASL _ _ = error "SuleCFOL2SoftFOL: No extended formulas allowed in CASL" | 79 | true | true | 0 | 6 | 22 | 29 | 14 | 15 | null | null |
wellposed/hblas | tests/HBLAS/BLAS/Level3Spec.hs | bsd-3-clause | matmatTest1ZSYR2K :: IO ()
matmatTest1ZSYR2K = do
a <- Matrix.generateMutableDenseMatrix (Matrix.SColumn) (3,2) (\(x, y) -> [1:+1, 3, 5, 2, 4, 6] !! (x + y * 3))
b <- Matrix.generateMutableDenseMatrix (Matrix.SColumn) (3,2) (\(x, y) -> [1:+1, 3, 5, 2, 4, 6] !! (x + y * 3))
c <- Matrix.generateMutableDenseMa... | 706 | matmatTest1ZSYR2K :: IO ()
matmatTest1ZSYR2K = do
a <- Matrix.generateMutableDenseMatrix (Matrix.SColumn) (3,2) (\(x, y) -> [1:+1, 3, 5, 2, 4, 6] !! (x + y * 3))
b <- Matrix.generateMutableDenseMatrix (Matrix.SColumn) (3,2) (\(x, y) -> [1:+1, 3, 5, 2, 4, 6] !! (x + y * 3))
c <- Matrix.generateMutableDenseMa... | 706 | matmatTest1ZSYR2K = do
a <- Matrix.generateMutableDenseMatrix (Matrix.SColumn) (3,2) (\(x, y) -> [1:+1, 3, 5, 2, 4, 6] !! (x + y * 3))
b <- Matrix.generateMutableDenseMatrix (Matrix.SColumn) (3,2) (\(x, y) -> [1:+1, 3, 5, 2, 4, 6] !! (x + y * 3))
c <- Matrix.generateMutableDenseMatrix (Matrix.SColumn) (3,3)... | 679 | false | true | 0 | 14 | 127 | 404 | 225 | 179 | null | null |
Soares/tagwiki | src/Text/Symbols.hs | mit | oLink = "|" | 11 | oLink = "|" | 11 | oLink = "|" | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
yihuang/cabal-install | Distribution/Client/Dependency/TopDown.hs | bsd-3-clause | addTopLevelVersionConstraint :: PackageName -> VersionRange
-> Constraints
-> Satisfiable Constraints
[PackageIdentifier] ExclusionReason
addTopLevelVersionConstraint pkg ver constraints =
Constraints.constrain taggedDep reaso... | 484 | addTopLevelVersionConstraint :: PackageName -> VersionRange
-> Constraints
-> Satisfiable Constraints
[PackageIdentifier] ExclusionReason
addTopLevelVersionConstraint pkg ver constraints =
Constraints.constrain taggedDep reaso... | 484 | addTopLevelVersionConstraint pkg ver constraints =
Constraints.constrain taggedDep reason constraints
where
dep = Dependency pkg ver
taggedDep = TaggedDependency NoInstalledConstraint dep
reason = ExcludedByTopLevelDependency dep | 254 | false | true | 2 | 9 | 152 | 86 | 39 | 47 | null | null |
pandaychen/PFQ | Development/SimpleBuilder.hs | gpl-2.0 | evalCmd opt (DynamicCmd fun) = fun opt | 38 | evalCmd opt (DynamicCmd fun) = fun opt | 38 | evalCmd opt (DynamicCmd fun) = fun opt | 38 | false | false | 0 | 6 | 6 | 22 | 9 | 13 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F08.hs | bsd-3-clause | ptr_glFlushVertexArrayRangeNV :: FunPtr (IO ())
ptr_glFlushVertexArrayRangeNV = unsafePerformIO $ getCommand "glFlushVertexArrayRangeNV" | 136 | ptr_glFlushVertexArrayRangeNV :: FunPtr (IO ())
ptr_glFlushVertexArrayRangeNV = unsafePerformIO $ getCommand "glFlushVertexArrayRangeNV" | 136 | ptr_glFlushVertexArrayRangeNV = unsafePerformIO $ getCommand "glFlushVertexArrayRangeNV" | 88 | false | true | 0 | 9 | 10 | 34 | 15 | 19 | null | null |
noinia/hsync-client | src/Yesod/Client.hs | bsd-3-clause | -- | Get the cookiejar
cookieJar :: Monad m => YesodClientT cli m (Maybe CookieJar)
cookieJar = cookieJar' <$> get | 114 | cookieJar :: Monad m => YesodClientT cli m (Maybe CookieJar)
cookieJar = cookieJar' <$> get | 91 | cookieJar = cookieJar' <$> get | 30 | true | true | 0 | 8 | 19 | 36 | 18 | 18 | null | null |
timjb/lens | src/Data/ByteString/Strict/Lens.hs | bsd-3-clause | -- | 'Data.ByteString.Char8.unpack' (or 'Data.ByteString.Char8.pack') a list of characters into a 'ByteString'
--
-- When writing back to the 'ByteString' it is assumed that every 'Char'
-- lies between @'\x00'@ and @'\xff'@.
--
-- @
-- 'unpackedChars' ≡ 'from' 'packedChars'
-- 'Data.ByteString.Char8.unpack' x ≡ x '^.'... | 550 | unpackedChars :: Iso' ByteString String
unpackedChars = from packedChars | 72 | unpackedChars = from packedChars | 32 | true | true | 0 | 5 | 71 | 32 | 22 | 10 | null | null |
acarno/slicer | valgrind/auxprogs/DotToScc.hs | gpl-2.0 | - ==========================================================--
--
utSetSubtraction :: (Ord a) => Set a -> Set a -> Set a
utSetSubtraction (MkSet []) (MkSet []) = (MkSet [])
| 183 | utSetSubtraction :: (Ord a) => Set a -> Set a -> Set a
utSetSubtraction (MkSet []) (MkSet []) = (MkSet []) | 115 | utSetSubtraction (MkSet []) (MkSet []) = (MkSet []) | 60 | true | true | 1 | 8 | 34 | 128 | 93 | 35 | null | null |
ben-schulz/Idris-dev | src/IRTS/DumpBC.hs | bsd-3-clause | serialize :: [(Name, [BC])] -> String
serialize decls =
interMap decls "\n\n" serializeDecl
where
serializeDecl :: (Name, [BC]) -> String
serializeDecl (name, bcs) =
show name ++ ":\n" ++ interMap bcs "\n" (serializeBC 1) | 241 | serialize :: [(Name, [BC])] -> String
serialize decls =
interMap decls "\n\n" serializeDecl
where
serializeDecl :: (Name, [BC]) -> String
serializeDecl (name, bcs) =
show name ++ ":\n" ++ interMap bcs "\n" (serializeBC 1) | 241 | serialize decls =
interMap decls "\n\n" serializeDecl
where
serializeDecl :: (Name, [BC]) -> String
serializeDecl (name, bcs) =
show name ++ ":\n" ++ interMap bcs "\n" (serializeBC 1) | 203 | false | true | 2 | 8 | 53 | 96 | 51 | 45 | null | null |
jecisc/TP_PF_L3 | PF-TP5/src/PF-TP_Interprete_Fini_FerlicotDelbecque_Cyril/Main.hs | mit | interpreteM envi (Var a) = return (fromJust (lookup a envi)) | 60 | interpreteM envi (Var a) = return (fromJust (lookup a envi)) | 60 | interpreteM envi (Var a) = return (fromJust (lookup a envi)) | 60 | false | false | 0 | 9 | 9 | 36 | 16 | 20 | null | null |
expipiplus1/spir-v | Language/SpirV/OpCode.hs | mit | instructionSize OpAtomicISub = Fixed 7 | 38 | instructionSize OpAtomicISub = Fixed 7 | 38 | instructionSize OpAtomicISub = Fixed 7 | 38 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
beni55/haste-compiler | libraries/ghc-7.8/base/GHC/Event/PSQ.hs | bsd-3-clause | (<>) :: Sequ a -> Sequ a -> Sequ a
Sequ x1 <> Sequ x2 = Sequ (\as -> x1 (x2 as)) | 80 | (<>) :: Sequ a -> Sequ a -> Sequ a
Sequ x1 <> Sequ x2 = Sequ (\as -> x1 (x2 as)) | 80 | Sequ x1 <> Sequ x2 = Sequ (\as -> x1 (x2 as)) | 45 | false | true | 0 | 10 | 21 | 64 | 30 | 34 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/HTMLImageElement.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement.crossOrigin Mozilla HTMLImageElement.crossOrigin documentation>
getCrossOrigin ::
(MonadDOM m, FromJSString result) =>
HTMLImageElement -> m (Maybe result)
getCrossOrigin self
= liftDOM ((self ^. js "crossOrigin")... | 343 | getCrossOrigin ::
(MonadDOM m, FromJSString result) =>
HTMLImageElement -> m (Maybe result)
getCrossOrigin self
= liftDOM ((self ^. js "crossOrigin") >>= fromMaybeJSString) | 206 | getCrossOrigin self
= liftDOM ((self ^. js "crossOrigin") >>= fromMaybeJSString) | 82 | true | true | 0 | 10 | 62 | 63 | 32 | 31 | null | null |
asilvestre/haskell-neo4j-rest-client | tests/IntegrationTests.hs | mit | case_changeUnexistingNodeLabels :: Assertion
case_changeUnexistingNodeLabels = do
n <- withAuthConnection host port creds $ createNode someProperties
let expException = Neo4jNoEntityException $ runNodeIdentifier n
assertException expException $ withAuthConnection host port creds $ do
deleteNode n
... | 386 | case_changeUnexistingNodeLabels :: Assertion
case_changeUnexistingNodeLabels = do
n <- withAuthConnection host port creds $ createNode someProperties
let expException = Neo4jNoEntityException $ runNodeIdentifier n
assertException expException $ withAuthConnection host port creds $ do
deleteNode n
... | 386 | case_changeUnexistingNodeLabels = do
n <- withAuthConnection host port creds $ createNode someProperties
let expException = Neo4jNoEntityException $ runNodeIdentifier n
assertException expException $ withAuthConnection host port creds $ do
deleteNode n
changeLabels ["mylabel"] n
-- | Remov... | 341 | false | true | 0 | 11 | 73 | 87 | 39 | 48 | null | null |
spikelynch/annales | app/Annales/Descriptions.hs | bsd-3-clause | descOmen :: Empire -> TextGenCh
descOmen e = inc [ collective, phenom, w "in", place ]
where phenom = vocabGet e "phenomena"
place = vocabGet e "places" | 162 | descOmen :: Empire -> TextGenCh
descOmen e = inc [ collective, phenom, w "in", place ]
where phenom = vocabGet e "phenomena"
place = vocabGet e "places" | 162 | descOmen e = inc [ collective, phenom, w "in", place ]
where phenom = vocabGet e "phenomena"
place = vocabGet e "places" | 130 | false | true | 1 | 7 | 36 | 66 | 31 | 35 | null | null |
Zemyla/these | Data/Align.hs | bsd-3-clause | -- | Align two structures as in 'zipWith', but filling in blanks with 'Nothing'.
padZipWith :: (Align f) => (Maybe a -> Maybe b -> c) -> f a -> f b -> f c
padZipWith f xs ys = uncurry f <$> padZip xs ys | 202 | padZipWith :: (Align f) => (Maybe a -> Maybe b -> c) -> f a -> f b -> f c
padZipWith f xs ys = uncurry f <$> padZip xs ys | 121 | padZipWith f xs ys = uncurry f <$> padZip xs ys | 47 | true | true | 0 | 10 | 45 | 78 | 37 | 41 | null | null |
kojiromike/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | fmapMB f (Pi c i t k) = liftM2 (Pi c i) (f t) (f k) | 51 | fmapMB f (Pi c i t k) = liftM2 (Pi c i) (f t) (f k) | 51 | fmapMB f (Pi c i t k) = liftM2 (Pi c i) (f t) (f k) | 51 | false | false | 0 | 7 | 15 | 52 | 24 | 28 | null | null |
rueshyna/gogol | gogol-gmail/gen/Network/Google/Gmail/Types/Product.hs | mpl-2.0 | -- | List of labels to remove from the message.
faRemoveLabelIds :: Lens' FilterAction [Text]
faRemoveLabelIds
= lens _faRemoveLabelIds
(\ s a -> s{_faRemoveLabelIds = a})
. _Default
. _Coerce | 212 | faRemoveLabelIds :: Lens' FilterAction [Text]
faRemoveLabelIds
= lens _faRemoveLabelIds
(\ s a -> s{_faRemoveLabelIds = a})
. _Default
. _Coerce | 164 | faRemoveLabelIds
= lens _faRemoveLabelIds
(\ s a -> s{_faRemoveLabelIds = a})
. _Default
. _Coerce | 118 | true | true | 0 | 11 | 49 | 53 | 28 | 25 | null | null |
alios/geojson-types | src/Data/GeoJSON/Intern.hs | bsd-3-clause | toAeson (Bson.Int32 a) = toJSON a | 35 | toAeson (Bson.Int32 a) = toJSON a | 35 | toAeson (Bson.Int32 a) = toJSON a | 35 | false | false | 0 | 7 | 7 | 21 | 9 | 12 | null | null |
sdiehl/ghc | compiler/utils/Util.hs | bsd-3-clause | -- | @(lengthIs xs n) = (length xs == n)@
lengthIs :: [a] -> Int -> Bool
lengthIs lst n
| n < 0
= False
| otherwise
= atLength null False lst n | 151 | lengthIs :: [a] -> Int -> Bool
lengthIs lst n
| n < 0
= False
| otherwise
= atLength null False lst n | 109 | lengthIs lst n
| n < 0
= False
| otherwise
= atLength null False lst n | 78 | true | true | 0 | 8 | 41 | 58 | 28 | 30 | null | null |
seereason/ghcjs | src/Gen2/Object.hs | mit | getState :: Monad m => StrictStateT s m s
getState = StrictStateT (\c s -> c s s) | 81 | getState :: Monad m => StrictStateT s m s
getState = StrictStateT (\c s -> c s s) | 81 | getState = StrictStateT (\c s -> c s s) | 39 | false | true | 0 | 8 | 17 | 43 | 21 | 22 | null | null |
mathfur/grep-tree | src/Helpers.hs | mit | initOrBlank :: [a] -> [a]
initOrBlank [] = [] | 45 | initOrBlank :: [a] -> [a]
initOrBlank [] = [] | 45 | initOrBlank [] = [] | 19 | false | true | 0 | 8 | 8 | 34 | 16 | 18 | null | null |
JadenGeller/Tart | Sources/DTLC.hs | mit | prettyError a b = error ("not implemented " ++ show a ++ " ::: " ++ show b) | 75 | prettyError a b = error ("not implemented " ++ show a ++ " ::: " ++ show b) | 75 | prettyError a b = error ("not implemented " ++ show a ++ " ::: " ++ show b) | 75 | false | false | 0 | 10 | 17 | 35 | 16 | 19 | null | null |
PeterHajdu/hs | app/Main.hs | bsd-3-clause | printApple :: Apple -> String
printApple (Apple pos) = (moveCursor pos) ++ (setColour Red) ++ "@" | 97 | printApple :: Apple -> String
printApple (Apple pos) = (moveCursor pos) ++ (setColour Red) ++ "@" | 97 | printApple (Apple pos) = (moveCursor pos) ++ (setColour Red) ++ "@" | 67 | false | true | 0 | 9 | 15 | 50 | 23 | 27 | null | null |
bergmark/purescript | src/Language/PureScript/Parser/Declarations.hs | mit | parseStringLiteral :: P.Parsec String ParseState Value
parseStringLiteral = StringLiteral <$> C.stringLiteral | 109 | parseStringLiteral :: P.Parsec String ParseState Value
parseStringLiteral = StringLiteral <$> C.stringLiteral | 109 | parseStringLiteral = StringLiteral <$> C.stringLiteral | 54 | false | true | 0 | 6 | 10 | 26 | 13 | 13 | null | null |
daleooo/barrelfish | hake/RuleDefs.hs | mit | generatedObjectFilePath :: Options -> String -> String
generatedObjectFilePath opts src = (removeSuffix src) ++ ".o" | 116 | generatedObjectFilePath :: Options -> String -> String
generatedObjectFilePath opts src = (removeSuffix src) ++ ".o" | 116 | generatedObjectFilePath opts src = (removeSuffix src) ++ ".o" | 61 | false | true | 0 | 7 | 14 | 34 | 17 | 17 | null | null |
clchiou/gwab | lib/Telnet/Internal/Utils.hs | gpl-3.0 | ack :: Packet -> Packet
ack (PacketWill opt) = PacketDo opt | 61 | ack :: Packet -> Packet
ack (PacketWill opt) = PacketDo opt | 61 | ack (PacketWill opt) = PacketDo opt | 37 | false | true | 0 | 9 | 12 | 32 | 14 | 18 | null | null |
mariefarrell/Hets | HasCASL/PrintSubst.hs | gpl-2.0 | prettyRule :: (Pretty key, Pretty val) => (key, SRule val) -> Doc
prettyRule (k, v) = pretty k <+> pretty v | 107 | prettyRule :: (Pretty key, Pretty val) => (key, SRule val) -> Doc
prettyRule (k, v) = pretty k <+> pretty v | 107 | prettyRule (k, v) = pretty k <+> pretty v | 41 | false | true | 0 | 8 | 20 | 58 | 30 | 28 | null | null |
jokusi/mso | src/Data/Formula.hs | apache-2.0 | eval _ v1 v2 (a `In` as) = v1 a `elem` v2 as | 52 | eval _ v1 v2 (a `In` as) = v1 a `elem` v2 as | 52 | eval _ v1 v2 (a `In` as) = v1 a `elem` v2 as | 52 | false | false | 0 | 7 | 20 | 36 | 19 | 17 | null | null |
brendanhay/gogol | gogol-cloudasset/gen/Network/Google/CloudAsset/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'GoogleIdentityAccesscontextManagerV1MethodSelector' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'giamvmsMethod'
--
-- * 'giamvmsPermission'
googleIdentityAccesscontextManagerV1MethodSelector
:: GoogleId... | 530 | googleIdentityAccesscontextManagerV1MethodSelector
:: GoogleIdentityAccesscontextManagerV1MethodSelector
googleIdentityAccesscontextManagerV1MethodSelector =
GoogleIdentityAccesscontextManagerV1MethodSelector'
{_giamvmsMethod = Nothing, _giamvmsPermission = Nothing} | 276 | googleIdentityAccesscontextManagerV1MethodSelector =
GoogleIdentityAccesscontextManagerV1MethodSelector'
{_giamvmsMethod = Nothing, _giamvmsPermission = Nothing} | 167 | true | true | 1 | 7 | 59 | 39 | 23 | 16 | null | null |
KaneTW/Idris-dev | src/Idris/REPL.hs | bsd-3-clause | runIdeModeCommand h id orig fn mods (IdeMode.ProofSearch r line name hints depth) =
doProofSearch fn False r line (sUN name) (map sUN hints) depth | 148 | runIdeModeCommand h id orig fn mods (IdeMode.ProofSearch r line name hints depth) =
doProofSearch fn False r line (sUN name) (map sUN hints) depth | 148 | runIdeModeCommand h id orig fn mods (IdeMode.ProofSearch r line name hints depth) =
doProofSearch fn False r line (sUN name) (map sUN hints) depth | 148 | false | false | 0 | 8 | 25 | 64 | 31 | 33 | null | null |
grwlf/vsim | src/VSim.hs | gpl-3.0 | -- unHierPath p = error "unHierPath: unsupported " ++ (show p)
gen_appl' :: (AsIdent n) => n -> [HS.Exp] -> HS.Exp
gen_appl' n [] = error "gen_appl': no args" | 162 | gen_appl' :: (AsIdent n) => n -> [HS.Exp] -> HS.Exp
gen_appl' n [] = error "gen_appl': no args" | 95 | gen_appl' n [] = error "gen_appl': no args" | 43 | true | true | 0 | 9 | 32 | 46 | 24 | 22 | null | null |
ribag/ganeti-experiments | src/Ganeti/Rpc.hs | gpl-2.0 | parseHttpReply call (Right (CurlOK, body)) = parseHttpResponse call body | 72 | parseHttpReply call (Right (CurlOK, body)) = parseHttpResponse call body | 72 | parseHttpReply call (Right (CurlOK, body)) = parseHttpResponse call body | 72 | false | false | 0 | 8 | 8 | 28 | 14 | 14 | null | null |
y-usuzumi/survive-the-course | www.icourse163.org/ZJU-93001/第五周编程作业/1.hs | bsd-3-clause | getPath :: IOArray Int Int -> Int -> IO [Int]
getPath _ 0 = return [] | 69 | getPath :: IOArray Int Int -> Int -> IO [Int]
getPath _ 0 = return [] | 69 | getPath _ 0 = return [] | 23 | false | true | 0 | 8 | 15 | 40 | 19 | 21 | null | null |
fmapfmapfmap/amazonka | amazonka-ec2/test/Test/AWS/Gen/EC2.hs | mpl-2.0 | testDescribeInstancesResponse :: DescribeInstancesResponse -> TestTree
testDescribeInstancesResponse = res
"DescribeInstancesResponse"
"fixture/DescribeInstancesResponse.proto"
eC2
(Proxy :: Proxy DescribeInstances) | 231 | testDescribeInstancesResponse :: DescribeInstancesResponse -> TestTree
testDescribeInstancesResponse = res
"DescribeInstancesResponse"
"fixture/DescribeInstancesResponse.proto"
eC2
(Proxy :: Proxy DescribeInstances) | 231 | testDescribeInstancesResponse = res
"DescribeInstancesResponse"
"fixture/DescribeInstancesResponse.proto"
eC2
(Proxy :: Proxy DescribeInstances) | 160 | false | true | 0 | 7 | 30 | 33 | 17 | 16 | null | null |
keera-studios/hsQt | Qtc/Enums/Gui/QPrinter.hs | bsd-2-clause | ieQPrinterPrintRange :: Int -> QPrinterPrintRange
ieQPrinterPrintRange x = QEnum (CQPrinterPrintRange x) | 104 | ieQPrinterPrintRange :: Int -> QPrinterPrintRange
ieQPrinterPrintRange x = QEnum (CQPrinterPrintRange x) | 104 | ieQPrinterPrintRange x = QEnum (CQPrinterPrintRange x) | 54 | false | true | 0 | 7 | 10 | 32 | 14 | 18 | null | null |
nevrenato/Hets_Fork | CSL/AnEvenTool.hs | gpl-2.0 | getStODS :: Sh AnEvenState [(String, Guarded EPRange)]
getStODS = getStGeneric stODS "Ordered Dependency Store not initialized." | 128 | getStODS :: Sh AnEvenState [(String, Guarded EPRange)]
getStODS = getStGeneric stODS "Ordered Dependency Store not initialized." | 128 | getStODS = getStGeneric stODS "Ordered Dependency Store not initialized." | 73 | false | true | 1 | 8 | 15 | 38 | 17 | 21 | null | null |
nevrenato/HetsAlloy | Common/Lexer.hs | gpl-2.0 | octEscape :: CharParser st String
octEscape = char 'o' <:> many1 octDigit `checkWith` valueCheck 8 | 98 | octEscape :: CharParser st String
octEscape = char 'o' <:> many1 octDigit `checkWith` valueCheck 8 | 98 | octEscape = char 'o' <:> many1 octDigit `checkWith` valueCheck 8 | 64 | false | true | 2 | 6 | 14 | 41 | 18 | 23 | null | null |
outlikealambda/trustocracy | src/Main.hs | bsd-3-clause | hasAncestor :: Inf.Uid -> Inf.Puid -> TMap.Map Inf.Uid Influence -> STM Bool
hasAncestor uid targetUid tmap = do
influenceM <- TMap.lookup uid tmap
case influenceM of
Just (Influence _ nextUid _ _)
| nextUid == targetUid -> return True
| otherwise -> hasAncestor nextUid targetUid... | 357 | hasAncestor :: Inf.Uid -> Inf.Puid -> TMap.Map Inf.Uid Influence -> STM Bool
hasAncestor uid targetUid tmap = do
influenceM <- TMap.lookup uid tmap
case influenceM of
Just (Influence _ nextUid _ _)
| nextUid == targetUid -> return True
| otherwise -> hasAncestor nextUid targetUid... | 357 | hasAncestor uid targetUid tmap = do
influenceM <- TMap.lookup uid tmap
case influenceM of
Just (Influence _ nextUid _ _)
| nextUid == targetUid -> return True
| otherwise -> hasAncestor nextUid targetUid tmap
Nothing -> return False | 280 | false | true | 0 | 13 | 97 | 126 | 57 | 69 | null | null |
yousufmsoliman/music | Source (Haskell)/GeneralSpecies.hs | gpl-3.0 | toBool = fromMaybe False | 24 | toBool = fromMaybe False | 24 | toBool = fromMaybe False | 24 | false | false | 1 | 5 | 3 | 12 | 4 | 8 | null | null |
zachsully/hakaru | haskell/Language/Hakaru/CodeGen/Types.hs | bsd-3-clause | arrayPtrData :: CExpr -> CExpr
arrayPtrData e = CMember e (Ident "data") False | 78 | arrayPtrData :: CExpr -> CExpr
arrayPtrData e = CMember e (Ident "data") False | 78 | arrayPtrData e = CMember e (Ident "data") False | 47 | false | true | 0 | 7 | 12 | 31 | 15 | 16 | null | null |
dillonhuff/AFL | test/ParserTests.hs | bsd-3-clause | parseExprCases =
[("1", iLit 1),
("1 - 4", cAp (cAp (cve "-") (iLit 1)) (iLit 4)),
("3 * 3", cAp (cAp (cve "*") (iLit 3)) (iLit 3)),
("5 / 873", cAp (cAp (cve "/") (iLit 5)) (iLit 873)),
("x / 4", cAp (cAp (cve "/") (cve "x")) (iLit 4)),
("1 + 7", cAp (cAp (cve "+") (iLit 1)) (iLit 7)),
("2 /(4 + 2)... | 2,207 | parseExprCases =
[("1", iLit 1),
("1 - 4", cAp (cAp (cve "-") (iLit 1)) (iLit 4)),
("3 * 3", cAp (cAp (cve "*") (iLit 3)) (iLit 3)),
("5 / 873", cAp (cAp (cve "/") (iLit 5)) (iLit 873)),
("x / 4", cAp (cAp (cve "/") (cve "x")) (iLit 4)),
("1 + 7", cAp (cAp (cve "+") (iLit 1)) (iLit 7)),
("2 /(4 + 2)... | 2,207 | parseExprCases =
[("1", iLit 1),
("1 - 4", cAp (cAp (cve "-") (iLit 1)) (iLit 4)),
("3 * 3", cAp (cAp (cve "*") (iLit 3)) (iLit 3)),
("5 / 873", cAp (cAp (cve "/") (iLit 5)) (iLit 873)),
("x / 4", cAp (cAp (cve "/") (cve "x")) (iLit 4)),
("1 + 7", cAp (cAp (cve "+") (iLit 1)) (iLit 7)),
("2 /(4 + 2)... | 2,207 | false | false | 1 | 22 | 519 | 1,400 | 724 | 676 | null | null |
mitochon/hexercise | src/haskellbook/ch18/ch18.hs | mit | l1 :: Monad m => (a -> b) -> m a -> m b
l1 = (<$>) | 50 | l1 :: Monad m => (a -> b) -> m a -> m b
l1 = (<$>) | 50 | l1 = (<$>) | 10 | false | true | 0 | 8 | 16 | 41 | 21 | 20 | null | null |
Garygunn94/DFS | AuthServer/app/Main.hs | bsd-3-clause | main :: IO ()
main = mkApp | 26 | main :: IO ()
main = mkApp | 26 | main = mkApp | 12 | false | true | 0 | 6 | 6 | 16 | 8 | 8 | null | null |
gcampax/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | isDivOp _ = False | 32 | isDivOp _ = False | 32 | isDivOp _ = False | 32 | false | false | 0 | 5 | 18 | 9 | 4 | 5 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F30.hs | bsd-3-clause | -- glVertexAttrib4d ------------------------------------------------------------
-- | Manual pages for <https://www.opengl.org/sdk/docs/man2/xhtml/glVertexAttrib.xml OpenGL 2.x> or <https://www.opengl.org/sdk/docs/man3/xhtml/glVertexAttrib.xml OpenGL 3.x> or <https://www.opengl.org/sdk/docs/man4/html/glVertexAttrib.xh... | 648 | glVertexAttrib4d
:: MonadIO m
=> GLuint -- ^ @index@.
-> GLdouble -- ^ @x@.
-> GLdouble -- ^ @y@.
-> GLdouble -- ^ @z@.
-> GLdouble -- ^ @w@.
-> m ()
glVertexAttrib4d v1 v2 v3 v4 v5 = liftIO $ dyn906 ptr_glVertexAttrib4d v1 v2 v3 v4 v5 | 249 | glVertexAttrib4d v1 v2 v3 v4 v5 = liftIO $ dyn906 ptr_glVertexAttrib4d v1 v2 v3 v4 v5 | 85 | true | true | 0 | 13 | 89 | 82 | 42 | 40 | null | null |
HJvT/com | System/Win32/Com/HDirect/HDirect.hs | bsd-3-clause | unmarshallBool :: Int32 -> IO Bool
unmarshallBool v = return (v /= 0) | 69 | unmarshallBool :: Int32 -> IO Bool
unmarshallBool v = return (v /= 0) | 69 | unmarshallBool v = return (v /= 0) | 34 | false | true | 0 | 7 | 12 | 31 | 15 | 16 | null | null |
nickbart1980/pandoc | src/Text/Pandoc/Writers/Textile.hs | gpl-2.0 | -- | Convert Pandoc inline element to Textile.
inlineToTextile :: WriterOptions -> Inline -> State WriterState String
inlineToTextile opts (Span _ lst) =
inlineListToTextile opts lst | 185 | inlineToTextile :: WriterOptions -> Inline -> State WriterState String
inlineToTextile opts (Span _ lst) =
inlineListToTextile opts lst | 137 | inlineToTextile opts (Span _ lst) =
inlineListToTextile opts lst | 66 | true | true | 0 | 7 | 28 | 47 | 22 | 25 | null | null |
kelecorix/api-hasoffers | src/HasOffers/API/Brand/Offer.hs | bsd-3-clause | removeRevenue params =
Call "Offer"
"removeRevenue"
"POST"
[ Param "id" True $ getParam params 0
, Param "affiliate_id" True $ getParam params 1
, Param "goal_id" False $ getParam params 2
] | 253 | removeRevenue params =
Call "Offer"
"removeRevenue"
"POST"
[ Param "id" True $ getParam params 0
, Param "affiliate_id" True $ getParam params 1
, Param "goal_id" False $ getParam params 2
] | 253 | removeRevenue params =
Call "Offer"
"removeRevenue"
"POST"
[ Param "id" True $ getParam params 0
, Param "affiliate_id" True $ getParam params 1
, Param "goal_id" False $ getParam params 2
] | 253 | false | false | 0 | 8 | 94 | 69 | 32 | 37 | null | null |
GregorySchwartz/dotfiles | .xmonad/xmonad.hs | gpl-2.0 | colors "blue" = "#83a598" | 32 | colors "blue" = "#83a598" | 32 | colors "blue" = "#83a598" | 32 | false | false | 0 | 5 | 10 | 9 | 4 | 5 | null | null |
triplepointfive/hogldev | tutorial26/Tutorial26.hs | mit | idleCB :: IORef GLfloat -> IORef Camera -> IdleCallback
idleCB gScale cameraRef = do
gScale $~! (+ 0.01)
cameraRef $~! cameraOnRender
postRedisplay Nothing | 167 | idleCB :: IORef GLfloat -> IORef Camera -> IdleCallback
idleCB gScale cameraRef = do
gScale $~! (+ 0.01)
cameraRef $~! cameraOnRender
postRedisplay Nothing | 167 | idleCB gScale cameraRef = do
gScale $~! (+ 0.01)
cameraRef $~! cameraOnRender
postRedisplay Nothing | 111 | false | true | 0 | 8 | 34 | 54 | 25 | 29 | null | null |
green-haskell/ghc | libraries/base/Data/OldList.hs | bsd-3-clause | pairWithNil x = (x, []) | 23 | pairWithNil x = (x, []) | 23 | pairWithNil x = (x, []) | 23 | false | false | 0 | 6 | 4 | 17 | 9 | 8 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.