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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
chpatrick/hmidi | System/MIDI/MacOSX.hs | bsd-3-clause | etEventsUntil' :: Connection -> TimeStamp -> STM [MidiEvent]
getEventsUntil' conn until = do
m <- checkNextEvent' conn
case m of
Nothing -> return []
Just ev@(MidiEvent ts _) -> do
if ts < until
then do
getNextEvent' conn -- remove from the buffer
evs <- getEventsUntil' co... | 452 | getEventsUntil' :: Connection -> TimeStamp -> STM [MidiEvent]
getEventsUntil' conn until = do
m <- checkNextEvent' conn
case m of
Nothing -> return []
Just ev@(MidiEvent ts _) -> do
if ts < until
then do
getNextEvent' conn -- remove from the buffer
evs <- getEventsUntil' c... | 452 | getEventsUntil' conn until = do
m <- checkNextEvent' conn
case m of
Nothing -> return []
Just ev@(MidiEvent ts _) -> do
if ts < until
then do
getNextEvent' conn -- remove from the buffer
evs <- getEventsUntil' conn until
return (ev:evs)
else
ret... | 390 | false | true | 0 | 17 | 149 | 131 | 62 | 69 | null | null |
ghcjs/ghcjs | src/Gen2/Prim.hs | mit | genPrim _ _ ReadTVarIOOp [r] [tv] = PrimInline $ r |= app "h$readTVarIO" [tv] | 77 | genPrim _ _ ReadTVarIOOp [r] [tv] = PrimInline $ r |= app "h$readTVarIO" [tv] | 77 | genPrim _ _ ReadTVarIOOp [r] [tv] = PrimInline $ r |= app "h$readTVarIO" [tv] | 77 | false | false | 0 | 7 | 13 | 39 | 20 | 19 | null | null |
alang9/qp | src/Numeric/QpOases.hs | bsd-3-clause | hotstartSparseSQPSchur :: SQProblemSchur -> CSC Double -> Vector Double -> Matrix Double
-> Vector Double -> Vector Double -> Maybe Double
-> ExceptT OasesError IO (Vector Double, Double)
hotstartSparseSQPSchur sqp h g a lbA ubA m'cpuTime =
vec' (cscVals h) $ \_hValsSize hValsPtr -... | 1,827 | hotstartSparseSQPSchur :: SQProblemSchur -> CSC Double -> Vector Double -> Matrix Double
-> Vector Double -> Vector Double -> Maybe Double
-> ExceptT OasesError IO (Vector Double, Double)
hotstartSparseSQPSchur sqp h g a lbA ubA m'cpuTime =
vec' (cscVals h) $ \_hValsSize hValsPtr -... | 1,827 | hotstartSparseSQPSchur sqp h g a lbA ubA m'cpuTime =
vec' (cscVals h) $ \_hValsSize hValsPtr ->
vec' (cscCols h) $ \_hColsSize hColsPtr ->
vec' (cscRows h) $ \_hRowsSize hRowsPtr ->
vec' g $ \gSize gPtr ->
mat' a $ \aRow aCol aPtr ->
vec' lbA $ \lbASize lbAPtr ->
vec' ubA $ \ubASize ubAPtr -> do
let n... | 1,603 | false | true | 10 | 26 | 483 | 686 | 328 | 358 | null | null |
pparkkin/eta | compiler/ETA/Utils/UniqSet.hs | bsd-3-clause | lookupUniqSet_Directly (UniqSet s) k = lookupUFM_Directly s k | 61 | lookupUniqSet_Directly (UniqSet s) k = lookupUFM_Directly s k | 61 | lookupUniqSet_Directly (UniqSet s) k = lookupUFM_Directly s k | 61 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
stackbuilders/octohat | src-demo/Web/GitHub/CLI/Main.hs | mit | accessBotCLI (TeamOptions (AddToTeam nameOfOrg nameOfTeam nameOfUser)) =
addUserToTeamInOrganization nameOfUser
(OrganizationName $ T.pack nameOfOrg)
(TeamName $ T.pack nameOfTeam) | 242 | accessBotCLI (TeamOptions (AddToTeam nameOfOrg nameOfTeam nameOfUser)) =
addUserToTeamInOrganization nameOfUser
(OrganizationName $ T.pack nameOfOrg)
(TeamName $ T.pack nameOfTeam) | 242 | accessBotCLI (TeamOptions (AddToTeam nameOfOrg nameOfTeam nameOfUser)) =
addUserToTeamInOrganization nameOfUser
(OrganizationName $ T.pack nameOfOrg)
(TeamName $ T.pack nameOfTeam) | 242 | false | false | 0 | 8 | 78 | 59 | 27 | 32 | null | null |
capitanbatata/sandbox | pw-lenses/src/Lib.hs | gpl-3.0 | mBool f v = const v <$> f Nothing | 33 | mBool f v = const v <$> f Nothing | 33 | mBool f v = const v <$> f Nothing | 33 | false | false | 3 | 5 | 8 | 26 | 9 | 17 | null | null |
marcelosousa/poet | src/Util/Generic.hs | gpl-2.0 | snd4 :: (a,b,c,d) -> b
snd4 (a,b,c,d) = b | 41 | snd4 :: (a,b,c,d) -> b
snd4 (a,b,c,d) = b | 41 | snd4 (a,b,c,d) = b | 18 | false | true | 0 | 6 | 8 | 46 | 26 | 20 | null | null |
nukisman/elm-format-short | src/ElmFormat/Filesystem.hs | bsd-3-clause | fileList :: FileStore f => FilePath -> Free f [FilePath]
fileList =
let
children path =
if isSkippable path then
return []
else
do
directory <- doesDirectoryExist path
if directory then listDir path else return []
in
col... | 338 | fileList :: FileStore f => FilePath -> Free f [FilePath]
fileList =
let
children path =
if isSkippable path then
return []
else
do
directory <- doesDirectoryExist path
if directory then listDir path else return []
in
col... | 338 | fileList =
let
children path =
if isSkippable path then
return []
else
do
directory <- doesDirectoryExist path
if directory then listDir path else return []
in
collectFiles children | 281 | false | true | 0 | 14 | 138 | 92 | 43 | 49 | null | null |
vTurbine/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | leftAssocDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "LeftAssociative") | 75 | leftAssocDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "LeftAssociative") | 75 | leftAssocDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "LeftAssociative") | 75 | false | false | 0 | 7 | 6 | 17 | 8 | 9 | null | null |
bergey/plots | src/Plots/Types/Ribbon.hs | bsd-3-clause | barPlotRatioC :: (Typeable b, Renderable (Path V2 Double) b,
MonadState (Axis b c Double) m, BaseSpace c ~ V2) =>
Int -> [Double] -> [Colour Double] -> Double -> m ()
barPlotRatioC t xs colormap w = barPlotStackedC t [x/tot | x <- xs] colormap w
where tot = sum xs | 301 | barPlotRatioC :: (Typeable b, Renderable (Path V2 Double) b,
MonadState (Axis b c Double) m, BaseSpace c ~ V2) =>
Int -> [Double] -> [Colour Double] -> Double -> m ()
barPlotRatioC t xs colormap w = barPlotStackedC t [x/tot | x <- xs] colormap w
where tot = sum xs | 301 | barPlotRatioC t xs colormap w = barPlotStackedC t [x/tot | x <- xs] colormap w
where tot = sum xs | 99 | false | true | 0 | 11 | 87 | 138 | 69 | 69 | null | null |
rahulmutt/ghcvm | compiler/Eta/Utils/FastString.hs | bsd-3-clause | mkFastStringBytes :: Ptr Word8 -> Int -> FastString
mkFastStringBytes !ptr !len =
-- NB: Might as well use unsafeDupablePerformIO, since mkFastStringWith is
-- idempotent.
unsafeDupablePerformIO $
mkFastStringWith (copyNewFastString ptr len) ptr len | 269 | mkFastStringBytes :: Ptr Word8 -> Int -> FastString
mkFastStringBytes !ptr !len =
-- NB: Might as well use unsafeDupablePerformIO, since mkFastStringWith is
-- idempotent.
unsafeDupablePerformIO $
mkFastStringWith (copyNewFastString ptr len) ptr len | 269 | mkFastStringBytes !ptr !len =
-- NB: Might as well use unsafeDupablePerformIO, since mkFastStringWith is
-- idempotent.
unsafeDupablePerformIO $
mkFastStringWith (copyNewFastString ptr len) ptr len | 217 | false | true | 0 | 8 | 51 | 56 | 26 | 30 | null | null |
ip1981/sproxy2 | src/Sproxy/Application/OAuth2.hs | mit | providers :: HashMap Text OAuth2Provider
providers =
fromList
[ ("google", Google.provider)
, ("linkedin", LinkedIn.provider)
, ("yandex", Yandex.provider)
] | 175 | providers :: HashMap Text OAuth2Provider
providers =
fromList
[ ("google", Google.provider)
, ("linkedin", LinkedIn.provider)
, ("yandex", Yandex.provider)
] | 175 | providers =
fromList
[ ("google", Google.provider)
, ("linkedin", LinkedIn.provider)
, ("yandex", Yandex.provider)
] | 134 | false | true | 0 | 7 | 35 | 52 | 30 | 22 | null | null |
jameseb7/haskell-roguelike | HaskellRoguelike/LevelType.hs | bsd-3-clause | tellUpdateCell :: (Int,Int) -> RoguelikeM Level ()
tellUpdateCell p =
do l <- get
case playerID l of
Just pid ->
do let playerPos = position $ (Map.!) (entityMap l) pid
los <- hasLOS playerPos p
when los $ tell [UpdateCell p ... | 370 | tellUpdateCell :: (Int,Int) -> RoguelikeM Level ()
tellUpdateCell p =
do l <- get
case playerID l of
Just pid ->
do let playerPos = position $ (Map.!) (entityMap l) pid
los <- hasLOS playerPos p
when los $ tell [UpdateCell p (sym... | 366 | tellUpdateCell p =
do l <- get
case playerID l of
Just pid ->
do let playerPos = position $ (Map.!) (entityMap l) pid
los <- hasLOS playerPos p
when los $ tell [UpdateCell p (symbolAt l p)]
Nothing -> return () | 315 | false | true | 0 | 19 | 157 | 141 | 65 | 76 | null | null |
mcschroeder/ghc | compiler/coreSyn/CoreSyn.hs | bsd-3-clause | deTagAlt :: TaggedAlt t -> CoreAlt
deTagAlt (con, bndrs, rhs) = (con, [b | TB b _ <- bndrs], deTagExpr rhs) | 107 | deTagAlt :: TaggedAlt t -> CoreAlt
deTagAlt (con, bndrs, rhs) = (con, [b | TB b _ <- bndrs], deTagExpr rhs) | 107 | deTagAlt (con, bndrs, rhs) = (con, [b | TB b _ <- bndrs], deTagExpr rhs) | 72 | false | true | 0 | 9 | 20 | 58 | 31 | 27 | null | null |
iblumenfeld/saw-core | src/Verifier/SAW/Typechecker/Context.hs | bsd-3-clause | asUPTuple :: AnnPat a -> Maybe [AnnPat a]
asUPTuple (TCPatF UPUnit) = return [] | 85 | asUPTuple :: AnnPat a -> Maybe [AnnPat a]
asUPTuple (TCPatF UPUnit) = return [] | 85 | asUPTuple (TCPatF UPUnit) = return [] | 43 | false | true | 0 | 8 | 19 | 41 | 19 | 22 | null | null |
andorp/bead | src/Bead/Persistence/SQL/FileSystem.hs | bsd-3-clause | fileSaveBS :: (MonadIO io) => FilePath -> ByteString -> io ()
fileSaveBS fname s = liftIO $ do
handler <- openFile fname WriteMode
hSetEncoding handler utf8
BS.hPutStr handler s
hClose handler | 200 | fileSaveBS :: (MonadIO io) => FilePath -> ByteString -> io ()
fileSaveBS fname s = liftIO $ do
handler <- openFile fname WriteMode
hSetEncoding handler utf8
BS.hPutStr handler s
hClose handler | 200 | fileSaveBS fname s = liftIO $ do
handler <- openFile fname WriteMode
hSetEncoding handler utf8
BS.hPutStr handler s
hClose handler | 138 | false | true | 0 | 10 | 38 | 83 | 36 | 47 | null | null |
stevezhee/pec | Language/Pir/Abs.hs | bsd-3-clause | ppSwitchAlt x = case x of
SwitchAlt v1 v2 -> ppTLit v1 <+> text "->" <+> text "{" <+> ppStmtList v2 <+> text "}" | 115 | ppSwitchAlt x = case x of
SwitchAlt v1 v2 -> ppTLit v1 <+> text "->" <+> text "{" <+> ppStmtList v2 <+> text "}" | 115 | ppSwitchAlt x = case x of
SwitchAlt v1 v2 -> ppTLit v1 <+> text "->" <+> text "{" <+> ppStmtList v2 <+> text "}" | 115 | false | false | 5 | 6 | 26 | 37 | 20 | 17 | null | null |
diagrams/diagrams-contrib | src/Diagrams/Color/XKCD.hs | bsd-3-clause | duskyPink = fromJust $ readHexColor "#cc7a8b" | 57 | duskyPink = fromJust $ readHexColor "#cc7a8b" | 57 | duskyPink = fromJust $ readHexColor "#cc7a8b" | 57 | false | false | 0 | 6 | 17 | 13 | 6 | 7 | null | null |
aoanthony/independentfunctionalsemantics | src/Main.hs | bsd-3-clause | proper :: Value -> Bool
proper node | typeOf (fst node) == snd node = True
| otherwise = False | 130 | proper :: Value -> Bool
proper node | typeOf (fst node) == snd node = True
| otherwise = False | 130 | proper node | typeOf (fst node) == snd node = True
| otherwise = False | 106 | false | true | 0 | 11 | 55 | 49 | 22 | 27 | null | null |
ykst/funlang | src/Parser.hs | mit | symbol s = lx $ string s | 25 | symbol s = lx $ string s | 25 | symbol s = lx $ string s | 25 | false | false | 1 | 6 | 7 | 19 | 7 | 12 | null | null |
lambdataro/Dive | Syntax.hs | mit | nameTVar (TEither t1 t2) = do
t1' <- nameTVar t1
t2' <- nameTVar t2
return (TEither t1' t2') | 98 | nameTVar (TEither t1 t2) = do
t1' <- nameTVar t1
t2' <- nameTVar t2
return (TEither t1' t2') | 98 | nameTVar (TEither t1 t2) = do
t1' <- nameTVar t1
t2' <- nameTVar t2
return (TEither t1' t2') | 98 | false | false | 0 | 9 | 23 | 52 | 22 | 30 | null | null |
music-suite/music-pitch-literal | src/Music/Pitch/Literal/Pitch.hs | bsd-3-clause | a''' = fromPitch $ PitchL (5, Nothing, 3) | 46 | a''' = fromPitch $ PitchL (5, Nothing, 3) | 46 | a''' = fromPitch $ PitchL (5, Nothing, 3) | 46 | false | false | 3 | 6 | 12 | 26 | 12 | 14 | null | null |
Chase-C/KDtree | src/Vec3D.hs | gpl-2.0 | vDot :: Vec3D -> Vec3D -> Float
vDot (Vec3D (x1, y1, z1)) (Vec3D (x2, y2, z2)) = (x1 * x2) + (y1 * y2) + (z1 * z2) | 114 | vDot :: Vec3D -> Vec3D -> Float
vDot (Vec3D (x1, y1, z1)) (Vec3D (x2, y2, z2)) = (x1 * x2) + (y1 * y2) + (z1 * z2) | 114 | vDot (Vec3D (x1, y1, z1)) (Vec3D (x2, y2, z2)) = (x1 * x2) + (y1 * y2) + (z1 * z2) | 82 | false | true | 0 | 11 | 27 | 89 | 47 | 42 | null | null |
candu/haskellbook | ch12/libEither.hs | mit | either' :: (a -> c) -> (b -> c) -> Either a b -> c
either' aToC _ (Left a) = aToC a | 83 | either' :: (a -> c) -> (b -> c) -> Either a b -> c
either' aToC _ (Left a) = aToC a | 83 | either' aToC _ (Left a) = aToC a | 32 | false | true | 0 | 8 | 22 | 58 | 29 | 29 | null | null |
enolan/pdxfunc-cis194 | test/Main.hs | bsd-3-clause | myInsert Leaf msg@(LogMessage _ _ _) = Node Leaf msg Leaf | 57 | myInsert Leaf msg@(LogMessage _ _ _) = Node Leaf msg Leaf | 57 | myInsert Leaf msg@(LogMessage _ _ _) = Node Leaf msg Leaf | 57 | false | false | 1 | 8 | 10 | 36 | 15 | 21 | null | null |
mydaum/cabal | Cabal/Distribution/Simple/Utils.hs | bsd-3-clause | traceWhen v FlagTrace | isVerboseCallStack v = Just "----\n" | 63 | traceWhen v FlagTrace | isVerboseCallStack v = Just "----\n" | 63 | traceWhen v FlagTrace | isVerboseCallStack v = Just "----\n" | 63 | false | false | 0 | 8 | 11 | 23 | 9 | 14 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | action_214 (168#) = happyShift action_213 | 41 | action_214 (168#) = happyShift action_213 | 41 | action_214 (168#) = happyShift action_213 | 41 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
Zigazou/Tank | src/Tank/Units/Coords.hs | gpl-3.0 | toPL (XY x y) = PL (sqrt $ x * x + y * y) (arctan y x) | 54 | toPL (XY x y) = PL (sqrt $ x * x + y * y) (arctan y x) | 54 | toPL (XY x y) = PL (sqrt $ x * x + y * y) (arctan y x) | 54 | false | false | 0 | 10 | 17 | 49 | 24 | 25 | null | null |
ezyang/ghc | compiler/codeGen/StgCmmEnv.hs | bsd-3-clause | getArgAmode :: NonVoid StgArg -> FCode CmmExpr
getArgAmode (NonVoid (StgVarArg var)) = idInfoToAmode <$> getCgIdInfo var | 120 | getArgAmode :: NonVoid StgArg -> FCode CmmExpr
getArgAmode (NonVoid (StgVarArg var)) = idInfoToAmode <$> getCgIdInfo var | 120 | getArgAmode (NonVoid (StgVarArg var)) = idInfoToAmode <$> getCgIdInfo var | 73 | false | true | 0 | 11 | 15 | 47 | 21 | 26 | null | null |
jyp/ling | Ling/Session.hs | bsd-3-clause | defaultEndR (Just s) = s | 24 | defaultEndR (Just s) = s | 24 | defaultEndR (Just s) = s | 24 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
hyPiRion/swearjure | src/Swearjure/Primitives.hs | gpl-3.0 | divFn :: [Val] -> EvalState Val
divFn [] = throwError $ ArityException 0 "core//" | 81 | divFn :: [Val] -> EvalState Val
divFn [] = throwError $ ArityException 0 "core//" | 81 | divFn [] = throwError $ ArityException 0 "core//" | 49 | false | true | 0 | 6 | 13 | 35 | 17 | 18 | null | null |
a143753/AOJ | ALDS1_3_B.hs | apache-2.0 | ans q t iq@(i:is) tq =
let (n,t') = i
in
if t' > q
then ans q (t+q) is ((n,t'-q):tq)
else do
printf"%s %d\n" n (t+t')
ans q (t+t') is tq | 164 | ans q t iq@(i:is) tq =
let (n,t') = i
in
if t' > q
then ans q (t+q) is ((n,t'-q):tq)
else do
printf"%s %d\n" n (t+t')
ans q (t+t') is tq | 164 | ans q t iq@(i:is) tq =
let (n,t') = i
in
if t' > q
then ans q (t+q) is ((n,t'-q):tq)
else do
printf"%s %d\n" n (t+t')
ans q (t+t') is tq | 164 | false | false | 1 | 13 | 59 | 133 | 64 | 69 | null | null |
spire/spire | src/Spire/Canonical/Embedder.hs | bsd-3-clause | embedV (VArg _A _B) = CArg <$> embedV _A <*> embedVB _B | 62 | embedV (VArg _A _B) = CArg <$> embedV _A <*> embedVB _B | 62 | embedV (VArg _A _B) = CArg <$> embedV _A <*> embedVB _B | 62 | false | false | 0 | 7 | 18 | 31 | 14 | 17 | null | null |
C0DEHERO/Hgamelaunch | Main.hs | mit | anonMenu :: Connection -> IO (Maybe UserField)
anonMenu conn = do
banner <- getBanner "./config/banners/anonBanner.txt"
c <- showBanner (editBanner banner)
case c of 'l' -> login conn
'r' -> register conn
'w' -> watch conn
'm' -> motd conn
's' -> info conn
... | 427 | anonMenu :: Connection -> IO (Maybe UserField)
anonMenu conn = do
banner <- getBanner "./config/banners/anonBanner.txt"
c <- showBanner (editBanner banner)
case c of 'l' -> login conn
'r' -> register conn
'w' -> watch conn
'm' -> motd conn
's' -> info conn
... | 427 | anonMenu conn = do
banner <- getBanner "./config/banners/anonBanner.txt"
c <- showBanner (editBanner banner)
case c of 'l' -> login conn
'r' -> register conn
'w' -> watch conn
'm' -> motd conn
's' -> info conn
'q' -> exitWith ExitSuccess
_ ... | 380 | false | true | 1 | 10 | 137 | 141 | 61 | 80 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/GLUT/Graphics/UI/GLUT/State.hs | bsd-3-clause | -- | Contains 'True' when the current layer of the /current window/ is double
-- buffered, 'False' otherwise.
doubleBuffered :: GettableStateVar Bool
doubleBuffered = makeGettableStateVar $ simpleGet i2b glut_WINDOW_DOUBLEBUFFER | 229 | doubleBuffered :: GettableStateVar Bool
doubleBuffered = makeGettableStateVar $ simpleGet i2b glut_WINDOW_DOUBLEBUFFER | 118 | doubleBuffered = makeGettableStateVar $ simpleGet i2b glut_WINDOW_DOUBLEBUFFER | 78 | true | true | 0 | 6 | 29 | 25 | 13 | 12 | null | null |
beni55/egison | hs-src/Language/Egison/Core.hs | mit | --
-- String
--
packStringValue :: EgisonValue -> EgisonM Text
packStringValue (Collection seq) = do
let ls = toList seq
str <- mapM (\val -> case val of
Char c -> return c
_ -> throwError $ TypeMismatch "char" (Value val))
ls
return $ T.pack str | 316 | packStringValue :: EgisonValue -> EgisonM Text
packStringValue (Collection seq) = do
let ls = toList seq
str <- mapM (\val -> case val of
Char c -> return c
_ -> throwError $ TypeMismatch "char" (Value val))
ls
return $ T.pack str | 300 | packStringValue (Collection seq) = do
let ls = toList seq
str <- mapM (\val -> case val of
Char c -> return c
_ -> throwError $ TypeMismatch "char" (Value val))
ls
return $ T.pack str | 253 | true | true | 0 | 17 | 115 | 111 | 53 | 58 | null | null |
gilith/opentheory | data/haskell/nth-prime/src/Heap.hs | mit | singleton :: a -> Node a
singleton a = T 1 a E E | 48 | singleton :: a -> Node a
singleton a = T 1 a E E | 48 | singleton a = T 1 a E E | 23 | false | true | 0 | 6 | 13 | 30 | 14 | 16 | null | null |
bkoropoff/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | pexp t = PExp 1 [] (sMN 0 "arg") t | 34 | pexp t = PExp 1 [] (sMN 0 "arg") t | 34 | pexp t = PExp 1 [] (sMN 0 "arg") t | 34 | false | false | 0 | 7 | 9 | 28 | 13 | 15 | null | null |
j-rock/strat | src/Game/Lib/Units/Instances.hs | mit | falchion :: UnitT
falchion =
antiAir
(Defense 30)
(Attack (attackAir 85) (Just $ Indirect 2 5))
(defMobility 5)
"Falchion" | 150 | falchion :: UnitT
falchion =
antiAir
(Defense 30)
(Attack (attackAir 85) (Just $ Indirect 2 5))
(defMobility 5)
"Falchion" | 150 | falchion =
antiAir
(Defense 30)
(Attack (attackAir 85) (Just $ Indirect 2 5))
(defMobility 5)
"Falchion" | 132 | false | true | 0 | 10 | 46 | 58 | 29 | 29 | null | null |
jmitchell/Idris-dev | src/Idris/REPL.hs | bsd-3-clause | runIdeModeCommand :: Handle -- ^^ The handle for communication
-> Integer -- ^^ The continuation ID for the client
-> IState -- ^^ The original IState
-> FilePath -- ^^ The current open file
-> [FilePath] -- ^^ The currently loaded modules
... | 1,687 | runIdeModeCommand :: Handle -- ^^ The handle for communication
-> Integer -- ^^ The continuation ID for the client
-> IState -- ^^ The original IState
-> FilePath -- ^^ The current open file
-> [FilePath] -- ^^ The currently loaded modules
... | 1,687 | runIdeModeCommand h id orig fn mods (IdeMode.Interpret cmd) =
do c <- colourise
i <- getIState
case parseCmd i "(input)" cmd of
Failure (ErrInfo err _) -> iPrintError $ show (fixColour False err)
Success (Right (Prove mode n')) ->
idrisCatch
(do process fn (Prove mode n')
... | 1,266 | false | true | 0 | 21 | 733 | 413 | 196 | 217 | null | null |
pparkkin/eta | compiler/ETA/CodeGen/Prim.hs | bsd-3-clause | simpleOp ReadByteArrayOp_Word16 = Just $ byteArrayIndexOp jshort preserveShort | 78 | simpleOp ReadByteArrayOp_Word16 = Just $ byteArrayIndexOp jshort preserveShort | 78 | simpleOp ReadByteArrayOp_Word16 = Just $ byteArrayIndexOp jshort preserveShort | 78 | false | false | 0 | 6 | 7 | 18 | 8 | 10 | null | null |
cloudhead/cryptocurrency | src/Crypto/Blockchain/Block.hs | bsd-3-clause | zeroHash :: HashAlgorithm a => Digest a
zeroHash = fromJust $
digestFromByteString (zero (hashDigestSize SHA256) :: ByteString) | 131 | zeroHash :: HashAlgorithm a => Digest a
zeroHash = fromJust $
digestFromByteString (zero (hashDigestSize SHA256) :: ByteString) | 131 | zeroHash = fromJust $
digestFromByteString (zero (hashDigestSize SHA256) :: ByteString) | 91 | false | true | 0 | 10 | 20 | 43 | 21 | 22 | null | null |
jekor/templatepg | Database/TemplatePG/Protocol.hs | mit | putMessageBody Execute = mconcat [pgString "", B.putWord32be 0] | 71 | putMessageBody Execute = mconcat [pgString "", B.putWord32be 0] | 71 | putMessageBody Execute = mconcat [pgString "", B.putWord32be 0] | 71 | false | false | 0 | 8 | 15 | 26 | 12 | 14 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT26.hs | gpl-3.0 | x /= y = not (x == y) | 21 | x /= y = not (x == y) | 21 | x /= y = not (x == y) | 21 | false | false | 3 | 7 | 7 | 25 | 11 | 14 | null | null |
jtapolczai/wumpus | Debug/Trace/Wumpus.hs | apache-2.0 | fatalM :: Monad m => ModuleName -> String -> m ()
fatalM = genericLogM Fatal | 76 | fatalM :: Monad m => ModuleName -> String -> m ()
fatalM = genericLogM Fatal | 76 | fatalM = genericLogM Fatal | 26 | false | true | 0 | 9 | 14 | 34 | 16 | 18 | null | null |
geocurnoff/nikki | src/Base/Types.hs | lgpl-3.0 | isLevelFinishedMode _ = False | 29 | isLevelFinishedMode _ = False | 29 | isLevelFinishedMode _ = False | 29 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
alexkyllo/yesod-content-pdf | test/Yesod/Content/PDFSpec.hs | bsd-3-clause | h :: Html
h = toHtml ("<html><body>Hello World</body></html>" :: String) | 72 | h :: Html
h = toHtml ("<html><body>Hello World</body></html>" :: String) | 72 | h = toHtml ("<html><body>Hello World</body></html>" :: String) | 62 | false | true | 0 | 6 | 9 | 26 | 12 | 14 | null | null |
chrisdone/shell-conduit | src/Data/Conduit/Shell/Process.hs | bsd-3-clause | fuseSegment :: Segment () -> Segment r -> Segment r
SegmentConduit x `fuseSegment` SegmentConduit y =
SegmentConduit (fuseConduit x y) | 136 | fuseSegment :: Segment () -> Segment r -> Segment r
SegmentConduit x `fuseSegment` SegmentConduit y =
SegmentConduit (fuseConduit x y) | 136 | SegmentConduit x `fuseSegment` SegmentConduit y =
SegmentConduit (fuseConduit x y) | 84 | false | true | 0 | 7 | 21 | 55 | 25 | 30 | null | null |
purcell/adventofcode2016 | src/Day24.hs | bsd-3-clause | openNeighbours :: Grid -> Pos -> [Pos]
openNeighbours g (Pos x y) = do
p' <- [Pos (x - 1) y, Pos (x + 1) y, Pos x (y - 1), Pos x (y + 1)]
let Just s = squareAt g p'
guard (s /= Wall)
return p' | 200 | openNeighbours :: Grid -> Pos -> [Pos]
openNeighbours g (Pos x y) = do
p' <- [Pos (x - 1) y, Pos (x + 1) y, Pos x (y - 1), Pos x (y + 1)]
let Just s = squareAt g p'
guard (s /= Wall)
return p' | 200 | openNeighbours g (Pos x y) = do
p' <- [Pos (x - 1) y, Pos (x + 1) y, Pos x (y - 1), Pos x (y + 1)]
let Just s = squareAt g p'
guard (s /= Wall)
return p' | 161 | false | true | 0 | 12 | 56 | 145 | 69 | 76 | null | null |
xymostech/tex-parser | src/TeX/Parser/Expand.hs | mit | runExpanders :: [TokenExpander] -> TeXParser [Token]
runExpanders [] = fail "all expanders failed" | 98 | runExpanders :: [TokenExpander] -> TeXParser [Token]
runExpanders [] = fail "all expanders failed" | 98 | runExpanders [] = fail "all expanders failed" | 45 | false | true | 0 | 8 | 12 | 37 | 17 | 20 | null | null |
apyrgio/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | iemImport :: String
iemImport = "import" | 40 | iemImport :: String
iemImport = "import" | 40 | iemImport = "import" | 20 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
snapframework/heist | src/Heist/Compiled/Internal.hs | bsd-3-clause | parseAtt2 :: Monad n
=> (Text, Text)
-> HeistT n IO (RuntimeSplice n [(Text, Text)])
parseAtt2 (k,v) = do
mas <- getsHS (H.lookup k . _attrSpliceMap)
maybe doInline (return . doAttrSplice) mas
where
cvt (Literal x) = return $ return x
cvt (Ident x) =
localParamNode (const ... | 1,097 | parseAtt2 :: Monad n
=> (Text, Text)
-> HeistT n IO (RuntimeSplice n [(Text, Text)])
parseAtt2 (k,v) = do
mas <- getsHS (H.lookup k . _attrSpliceMap)
maybe doInline (return . doAttrSplice) mas
where
cvt (Literal x) = return $ return x
cvt (Ident x) =
localParamNode (const ... | 1,097 | parseAtt2 (k,v) = do
mas <- getsHS (H.lookup k . _attrSpliceMap)
maybe doInline (return . doAttrSplice) mas
where
cvt (Literal x) = return $ return x
cvt (Ident x) =
localParamNode (const $ X.Element x [] []) $ getAttributeSplice2 x
-- Handles inline parsing of $() splice syntax in attri... | 992 | false | true | 4 | 15 | 327 | 335 | 160 | 175 | null | null |
basvandijk/safer-file-handles-bytestring | Data/ByteString/Char8/SaferFileHandles.hs | bsd-3-clause | -- | Wraps: @Data.ByteString.'B.hGet'@.
hGet ∷ ( FileHandle handle, ReadModes ioMode
, pr `AncestorRegion` cr, MonadIO cr
)
⇒ handle ioMode pr → Int → cr B.ByteString
hGet = wrap2 E.hGet | 205 | hGet ∷ ( FileHandle handle, ReadModes ioMode
, pr `AncestorRegion` cr, MonadIO cr
)
⇒ handle ioMode pr → Int → cr B.ByteString
hGet = wrap2 E.hGet | 165 | hGet = wrap2 E.hGet | 19 | true | true | 0 | 10 | 49 | 73 | 35 | 38 | null | null |
brendanhay/gogol | gogol-billing/gen/Network/Google/Resource/CloudBilling/Services/SKUs/List.hs | mpl-2.0 | -- | V1 error format.
sskulXgafv :: Lens' ServicesSKUsList (Maybe Xgafv)
sskulXgafv
= lens _sskulXgafv (\ s a -> s{_sskulXgafv = a}) | 134 | sskulXgafv :: Lens' ServicesSKUsList (Maybe Xgafv)
sskulXgafv
= lens _sskulXgafv (\ s a -> s{_sskulXgafv = a}) | 112 | sskulXgafv
= lens _sskulXgafv (\ s a -> s{_sskulXgafv = a}) | 61 | true | true | 2 | 9 | 23 | 55 | 25 | 30 | null | null |
beni55/haste-compiler | libraries/ghc-7.10/base/Data/Fixed.hs | bsd-3-clause | convertFixed :: forall a . HasResolution a => Lexeme -> ReadPrec (Fixed a)
convertFixed (Number n)
| Just (i, f) <- numberToFixed e n =
return (fromInteger i + (fromInteger f / (10 ^ e)))
where r = resolution (undefined :: Fixed a)
-- round 'e' up to help make the 'read . show == id' property
... | 501 | convertFixed :: forall a . HasResolution a => Lexeme -> ReadPrec (Fixed a)
convertFixed (Number n)
| Just (i, f) <- numberToFixed e n =
return (fromInteger i + (fromInteger f / (10 ^ e)))
where r = resolution (undefined :: Fixed a)
-- round 'e' up to help make the 'read . show == id' property
... | 501 | convertFixed (Number n)
| Just (i, f) <- numberToFixed e n =
return (fromInteger i + (fromInteger f / (10 ^ e)))
where r = resolution (undefined :: Fixed a)
-- round 'e' up to help make the 'read . show == id' property
-- possible also for cases where 'resolution' is not a
-- powe... | 426 | false | true | 0 | 12 | 133 | 146 | 74 | 72 | null | null |
ancientlanguage/haskell-analysis | prepare/src/Prepare/Sblgnt/Parser.hs | mit | suffix :: NodeParser Text
suffix = Xml.elementContent "suffix" | 62 | suffix :: NodeParser Text
suffix = Xml.elementContent "suffix" | 62 | suffix = Xml.elementContent "suffix" | 36 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/program-structure/2019-01-hc-example-based-on-adjointio-raft/src/XLogging.hs | unlicense | runXLoggerT
:: Monad m
=> XLoggerT v m a -- ^ The computation from which to extract the logs
-> m (a, [LogMsg])
runXLoggerT = flip runStateT [] . unXLoggerT | 162 | runXLoggerT
:: Monad m
=> XLoggerT v m a -- ^ The computation from which to extract the logs
-> m (a, [LogMsg])
runXLoggerT = flip runStateT [] . unXLoggerT | 162 | runXLoggerT = flip runStateT [] . unXLoggerT | 44 | false | true | 0 | 10 | 35 | 59 | 28 | 31 | null | null |
alexander-at-github/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpOutOfLine CatchRetryOp = True | 35 | primOpOutOfLine CatchRetryOp = True | 35 | primOpOutOfLine CatchRetryOp = True | 35 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
timjb/protocol-buffers | hprotoc/Text/ProtocolBuffers/ProtoCompile/Gen.hs | apache-2.0 | ($$) :: Exp -> Exp -> Exp
($$) = App | 36 | ($$) :: Exp -> Exp -> Exp
($$) = App | 36 | ($$) = App | 10 | false | true | 0 | 8 | 9 | 30 | 15 | 15 | null | null |
HaskellCNOrg/snap-web | src/Controllers/Reply.hs | bsd-3-clause | toTopicDetailAfterReply :: View T.Text
-> AppHandler ()
toTopicDetailAfterReply view = do
tid <- decodedParamText topicIdP -- see the route pattern
re <- try (findOneTopic' tid)
renderTopicDetailPage re view | 245 | toTopicDetailAfterReply :: View T.Text
-> AppHandler ()
toTopicDetailAfterReply view = do
tid <- decodedParamText topicIdP -- see the route pattern
re <- try (findOneTopic' tid)
renderTopicDetailPage re view | 245 | toTopicDetailAfterReply view = do
tid <- decodedParamText topicIdP -- see the route pattern
re <- try (findOneTopic' tid)
renderTopicDetailPage re view | 165 | false | true | 0 | 10 | 65 | 63 | 28 | 35 | null | null |
vito/atomo-old | Atomo/Env.hs | mit | matchExec :: Env -> [AtomoVal] -> AtomoVal -> IOThrowsError AtomoVal
matchExec e [] _ = error "Non-exhaustive pattern match." | 125 | matchExec :: Env -> [AtomoVal] -> AtomoVal -> IOThrowsError AtomoVal
matchExec e [] _ = error "Non-exhaustive pattern match." | 125 | matchExec e [] _ = error "Non-exhaustive pattern match." | 56 | false | true | 0 | 10 | 18 | 46 | 21 | 25 | null | null |
marknsikora/codejam | 3264686/A.hs | mit | main :: IO ()
main = do
tests <- readLn
forM_ [1..tests] $ \caseNum -> do
[s, k] <- words <$> getLine
k' <- readIO k
let ans = solve s' where
s' = map (=='+') s
solve [] = Just 0
solve xs | length xs < k' && not (all id xs) = Nothing
solve xs = case span id xs... | 577 | main :: IO ()
main = do
tests <- readLn
forM_ [1..tests] $ \caseNum -> do
[s, k] <- words <$> getLine
k' <- readIO k
let ans = solve s' where
s' = map (=='+') s
solve [] = Just 0
solve xs | length xs < k' && not (all id xs) = Nothing
solve xs = case span id xs... | 577 | main = do
tests <- readLn
forM_ [1..tests] $ \caseNum -> do
[s, k] <- words <$> getLine
k' <- readIO k
let ans = solve s' where
s' = map (=='+') s
solve [] = Just 0
solve xs | length xs < k' && not (all id xs) = Nothing
solve xs = case span id xs of
... | 563 | false | true | 1 | 26 | 242 | 265 | 127 | 138 | null | null |
suhailshergill/liboleg | Text/PrintScan.hs | bsd-3-clause | prefix :: String -> String -> Maybe String
prefix "" str = Just str | 67 | prefix :: String -> String -> Maybe String
prefix "" str = Just str | 67 | prefix "" str = Just str | 24 | false | true | 0 | 7 | 13 | 30 | 14 | 16 | null | null |
zeekay/lambdabot | lambdabot-utils/Lambdabot/Pointful.hs | mit | succAlpha ('z':xs) = 'a' : succAlpha xs | 39 | succAlpha ('z':xs) = 'a' : succAlpha xs | 39 | succAlpha ('z':xs) = 'a' : succAlpha xs | 39 | false | false | 2 | 6 | 6 | 25 | 11 | 14 | null | null |
osa1/setops_bench | csv/Main.hs | bsd-3-clause | styleFileName :: String
styleFileName = "common_styles.gnuplot" | 63 | styleFileName :: String
styleFileName = "common_styles.gnuplot" | 63 | styleFileName = "common_styles.gnuplot" | 39 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
j1r1k/aeson-prefix | src/Data/Aeson/Prefix.hs | bsd-3-clause | -- |
-- Change options to use supplied prefix
withPrefix :: Prefix -> Options -> Options
withPrefix p o = o { optionPrefix = p } | 128 | withPrefix :: Prefix -> Options -> Options
withPrefix p o = o { optionPrefix = p } | 82 | withPrefix p o = o { optionPrefix = p } | 39 | true | true | 0 | 8 | 25 | 43 | 21 | 22 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Vault.Strict.hs | bsd-3-clause | -- | Merge two vaults (left-biased).
union :: Vault -> Vault -> Vault
union = ST.union | 86 | union :: Vault -> Vault -> Vault
union = ST.union | 49 | union = ST.union | 16 | true | true | 0 | 6 | 15 | 22 | 12 | 10 | null | null |
sethfowler/pygmalion | src/Pygmalion/RPC/Client.hs | bsd-3-clause | openRPC :: Config -> IO RPCConnection
openRPC config = getSocketUnix (socketPath config) | 88 | openRPC :: Config -> IO RPCConnection
openRPC config = getSocketUnix (socketPath config) | 88 | openRPC config = getSocketUnix (socketPath config) | 50 | false | true | 0 | 7 | 11 | 30 | 14 | 16 | null | null |
freebroccolo/hs-ackermann | src/Misc.hs | mit | divBy :: Integer -> J -> I
divBy n (a:b:x)
| 2*a+b < -n = -1 : divBy n (2*(a+n)+b : x)
| 2*a+b > n = 1 : divBy n (2*(a-n)+b : x)
| otherwise = 0 : divBy n (2*(a+0)+b : x) | 180 | divBy :: Integer -> J -> I
divBy n (a:b:x)
| 2*a+b < -n = -1 : divBy n (2*(a+n)+b : x)
| 2*a+b > n = 1 : divBy n (2*(a-n)+b : x)
| otherwise = 0 : divBy n (2*(a+0)+b : x) | 180 | divBy n (a:b:x)
| 2*a+b < -n = -1 : divBy n (2*(a+n)+b : x)
| 2*a+b > n = 1 : divBy n (2*(a-n)+b : x)
| otherwise = 0 : divBy n (2*(a+0)+b : x) | 153 | false | true | 1 | 13 | 53 | 180 | 91 | 89 | null | null |
kojiromike/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | traceWhen True msg a = trace msg a | 34 | traceWhen True msg a = trace msg a | 34 | traceWhen True msg a = trace msg a | 34 | false | false | 0 | 5 | 7 | 20 | 8 | 12 | null | null |
buckie/juno | src/Juno/Spec/Simple.hs | bsd-3-clause | options :: [OptDescr (Options -> Options)]
options =
[ Option ['c']
["config"]
(ReqArg (\fp opts -> opts { optConfigFile = fp }) "CONF_FILE")
"Configuration File"
, Option ['p']
["apiPort"]
(ReqArg (\p opts -> opts { optApiPort = read p }) "API_PORT")
... | 336 | options :: [OptDescr (Options -> Options)]
options =
[ Option ['c']
["config"]
(ReqArg (\fp opts -> opts { optConfigFile = fp }) "CONF_FILE")
"Configuration File"
, Option ['p']
["apiPort"]
(ReqArg (\p opts -> opts { optApiPort = read p }) "API_PORT")
... | 336 | options =
[ Option ['c']
["config"]
(ReqArg (\fp opts -> opts { optConfigFile = fp }) "CONF_FILE")
"Configuration File"
, Option ['p']
["apiPort"]
(ReqArg (\p opts -> opts { optApiPort = read p }) "API_PORT")
"Api Port"
] | 293 | false | true | 0 | 14 | 115 | 122 | 65 | 57 | null | null |
bitemyapp/ghc | libraries/base/Foreign/Marshal/Pool.hs | bsd-3-clause | pooledRealloc :: Storable a => Pool -> Ptr a -> IO (Ptr a)
pooledRealloc = pr undefined
where
pr :: Storable a' => a' -> Pool -> Ptr a' -> IO (Ptr a')
pr dummy pool ptr = pooledReallocBytes pool ptr (sizeOf dummy)
-- | Adjust the storage area for an element in the pool to the given size. | 313 | pooledRealloc :: Storable a => Pool -> Ptr a -> IO (Ptr a)
pooledRealloc = pr undefined
where
pr :: Storable a' => a' -> Pool -> Ptr a' -> IO (Ptr a')
pr dummy pool ptr = pooledReallocBytes pool ptr (sizeOf dummy)
-- | Adjust the storage area for an element in the pool to the given size. | 313 | pooledRealloc = pr undefined
where
pr :: Storable a' => a' -> Pool -> Ptr a' -> IO (Ptr a')
pr dummy pool ptr = pooledReallocBytes pool ptr (sizeOf dummy)
-- | Adjust the storage area for an element in the pool to the given size. | 254 | false | true | 0 | 12 | 83 | 116 | 52 | 64 | null | null |
three/codeworld | codeworld-prediction/tests/Common.hs | apache-2.0 | listShrinkOne' f [x] = ShrinkOne [x] (map (:[]) (f x)) | 54 | listShrinkOne' f [x] = ShrinkOne [x] (map (:[]) (f x)) | 54 | listShrinkOne' f [x] = ShrinkOne [x] (map (:[]) (f x)) | 54 | false | false | 0 | 9 | 9 | 42 | 22 | 20 | null | null |
jsavatgy/hatupist | code/fileError.hs | gpl-2.0 | valLimits = (1.00, 0.25) | 25 | valLimits = (1.00, 0.25) | 25 | valLimits = (1.00, 0.25) | 25 | false | false | 1 | 5 | 4 | 15 | 7 | 8 | null | null |
brendanhay/gogol | gogol-discovery/gen/Network/Google/Discovery/Types/Product.hs | mpl-2.0 | -- | A description of this object.
jsDescription :: Lens' JSONSchema (Maybe Text)
jsDescription
= lens _jsDescription
(\ s a -> s{_jsDescription = a}) | 158 | jsDescription :: Lens' JSONSchema (Maybe Text)
jsDescription
= lens _jsDescription
(\ s a -> s{_jsDescription = a}) | 123 | jsDescription
= lens _jsDescription
(\ s a -> s{_jsDescription = a}) | 76 | true | true | 1 | 9 | 31 | 52 | 25 | 27 | null | null |
jystic/QuickSpec | qs1/CongruenceClosure.hs | bsd-3-clause | frozen :: CC a -> CC a
frozen x = get >>= lift . UF.frozen . evalStateT x | 73 | frozen :: CC a -> CC a
frozen x = get >>= lift . UF.frozen . evalStateT x | 73 | frozen x = get >>= lift . UF.frozen . evalStateT x | 50 | false | true | 0 | 7 | 17 | 41 | 19 | 22 | null | null |
fibsifan/pandoc | src/Text/Pandoc/Writers/LaTeX.hs | gpl-2.0 | toSlides :: [Block] -> State WriterState [Block]
toSlides bs = do
opts <- gets stOptions
let slideLevel = fromMaybe (getSlideLevel bs) $ writerSlideLevel opts
let bs' = prepSlides slideLevel bs
concat `fmap` (mapM (elementToBeamer slideLevel) $ hierarchicalize bs') | 273 | toSlides :: [Block] -> State WriterState [Block]
toSlides bs = do
opts <- gets stOptions
let slideLevel = fromMaybe (getSlideLevel bs) $ writerSlideLevel opts
let bs' = prepSlides slideLevel bs
concat `fmap` (mapM (elementToBeamer slideLevel) $ hierarchicalize bs') | 273 | toSlides bs = do
opts <- gets stOptions
let slideLevel = fromMaybe (getSlideLevel bs) $ writerSlideLevel opts
let bs' = prepSlides slideLevel bs
concat `fmap` (mapM (elementToBeamer slideLevel) $ hierarchicalize bs') | 224 | false | true | 0 | 13 | 45 | 111 | 51 | 60 | null | null |
ekmett/ghc | compiler/main/DynamicLoading.hs | bsd-3-clause | wrongTyThingError :: Name -> TyThing -> SDoc
wrongTyThingError name got_thing = hsep [ptext (sLit "The name"), ppr name, ptext (sLit "is not that of a value but rather a"), pprTyThingCategory got_thing] | 202 | wrongTyThingError :: Name -> TyThing -> SDoc
wrongTyThingError name got_thing = hsep [ptext (sLit "The name"), ppr name, ptext (sLit "is not that of a value but rather a"), pprTyThingCategory got_thing] | 202 | wrongTyThingError name got_thing = hsep [ptext (sLit "The name"), ppr name, ptext (sLit "is not that of a value but rather a"), pprTyThingCategory got_thing] | 157 | false | true | 0 | 9 | 30 | 68 | 32 | 36 | null | null |
swistak35/fgj_interpreter | FeatherweightJava.hs | mit | fields :: KlassTable -> KlassName -> Either String [KlassName]
fields kt name = fields' kt name snd | 99 | fields :: KlassTable -> KlassName -> Either String [KlassName]
fields kt name = fields' kt name snd | 99 | fields kt name = fields' kt name snd | 36 | false | true | 0 | 8 | 16 | 43 | 20 | 23 | null | null |
ezyang/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | runMainKey = mkPreludeMiscIdUnique 102 | 57 | runMainKey = mkPreludeMiscIdUnique 102 | 57 | runMainKey = mkPreludeMiscIdUnique 102 | 57 | false | false | 0 | 5 | 22 | 9 | 4 | 5 | null | null |
hxw/conlecterm | src/Main.hs | bsd-2-clause | -setTarget opt = return opt { optTarget = True }
setConfig :: Monad m => String -> Options -> m Options
setConfig arg opt = return opt { optConfig = arg }
| 156 | setConfig :: Monad m => String -> Options -> m Options
setConfig arg opt = return opt { optConfig = arg } | 105 | setConfig arg opt = return opt { optConfig = arg } | 50 | true | true | 1 | 8 | 33 | 65 | 33 | 32 | null | null |
kim/amazonka | gen/src/Gen/Documentation.hs | mpl-2.0 | endWith :: Text -> Text -> Text
endWith x y
| x `Text.isSuffixOf` y = y
| otherwise = y <> x | 112 | endWith :: Text -> Text -> Text
endWith x y
| x `Text.isSuffixOf` y = y
| otherwise = y <> x | 112 | endWith x y
| x `Text.isSuffixOf` y = y
| otherwise = y <> x | 80 | false | true | 0 | 8 | 41 | 51 | 25 | 26 | null | null |
wereHamster/yag | Git/Command/Mergetool.hs | unlicense | run :: [String] -> IO ()
run args = return () | 45 | run :: [String] -> IO ()
run args = return () | 45 | run args = return () | 20 | false | true | 0 | 7 | 10 | 34 | 16 | 18 | null | null |
ocean0yohsuke/deepcontrol | test/unit_Monad.hs | bsd-3-clause | tests_Level0 :: Test
tests_Level0 = test [
"plus" ~: "(>-)" ~: do
let plus :: Int -> Int -> Int
plus x y =
x >- \a ->
y >- \b ->
a + b
plus 3 4 @?= 7
] | 239 | tests_Level0 :: Test
tests_Level0 = test [
"plus" ~: "(>-)" ~: do
let plus :: Int -> Int -> Int
plus x y =
x >- \a ->
y >- \b ->
a + b
plus 3 4 @?= 7
] | 239 | tests_Level0 = test [
"plus" ~: "(>-)" ~: do
let plus :: Int -> Int -> Int
plus x y =
x >- \a ->
y >- \b ->
a + b
plus 3 4 @?= 7
] | 218 | false | true | 0 | 17 | 128 | 86 | 43 | 43 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/Cabal/Distribution/Simple.hs | bsd-3-clause | hscolourAction :: UserHooks -> HscolourFlags -> Args -> IO ()
hscolourAction hooks flags args
= do let distPref = fromFlag $ hscolourDistPref flags
verbosity = fromFlag $ hscolourVerbosity flags
hookedAction preHscolour hscolourHook postHscolour
(getBuildConfig hooks ver... | 375 | hscolourAction :: UserHooks -> HscolourFlags -> Args -> IO ()
hscolourAction hooks flags args
= do let distPref = fromFlag $ hscolourDistPref flags
verbosity = fromFlag $ hscolourVerbosity flags
hookedAction preHscolour hscolourHook postHscolour
(getBuildConfig hooks ver... | 375 | hscolourAction hooks flags args
= do let distPref = fromFlag $ hscolourDistPref flags
verbosity = fromFlag $ hscolourVerbosity flags
hookedAction preHscolour hscolourHook postHscolour
(getBuildConfig hooks verbosity distPref)
hooks flags args | 313 | false | true | 0 | 11 | 110 | 91 | 43 | 48 | null | null |
gnn/Hets | OWL2/ManchesterPrint.hs | gpl-2.0 | printOWLBasicTheory :: (Sign, [Named Axiom]) -> Doc
printOWLBasicTheory = printBasicTheory . prepareBasicTheory | 111 | printOWLBasicTheory :: (Sign, [Named Axiom]) -> Doc
printOWLBasicTheory = printBasicTheory . prepareBasicTheory | 111 | printOWLBasicTheory = printBasicTheory . prepareBasicTheory | 59 | false | true | 0 | 9 | 11 | 38 | 18 | 20 | null | null |
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs | mpl-2.0 | -- | Whether new cookies are disabled for this site.
ssDisableNewCookie :: Lens' SiteSettings (Maybe Bool)
ssDisableNewCookie
= lens _ssDisableNewCookie
(\ s a -> s{_ssDisableNewCookie = a}) | 198 | ssDisableNewCookie :: Lens' SiteSettings (Maybe Bool)
ssDisableNewCookie
= lens _ssDisableNewCookie
(\ s a -> s{_ssDisableNewCookie = a}) | 145 | ssDisableNewCookie
= lens _ssDisableNewCookie
(\ s a -> s{_ssDisableNewCookie = a}) | 91 | true | true | 1 | 9 | 34 | 51 | 25 | 26 | null | null |
brendanhay/gogol | gogol-cloudprivatecatalogproducer/gen/Network/Google/CloudPrivateCatalogProducer/Types/Product.hs | mpl-2.0 | -- | The returned \`Association\` resources from the list call.
gcpvlarAssociations :: Lens' GoogleCloudPrivatecatalogproducerV1beta1ListAssociationsResponse [GoogleCloudPrivatecatalogproducerV1beta1Association]
gcpvlarAssociations
= lens _gcpvlarAssociations
(\ s a -> s{_gcpvlarAssociations = a})
. _Defa... | 339 | gcpvlarAssociations :: Lens' GoogleCloudPrivatecatalogproducerV1beta1ListAssociationsResponse [GoogleCloudPrivatecatalogproducerV1beta1Association]
gcpvlarAssociations
= lens _gcpvlarAssociations
(\ s a -> s{_gcpvlarAssociations = a})
. _Default
. _Coerce | 275 | gcpvlarAssociations
= lens _gcpvlarAssociations
(\ s a -> s{_gcpvlarAssociations = a})
. _Default
. _Coerce | 127 | true | true | 3 | 8 | 49 | 58 | 28 | 30 | null | null |
green-haskell/ghc | compiler/basicTypes/MkId.hs | bsd-3-clause | unwrapFamInstScrut :: TyCon -> [Type] -> CoreExpr -> CoreExpr
unwrapFamInstScrut tycon args scrut
| Just co_con <- tyConFamilyCoercion_maybe tycon
= mkCast scrut (mkUnbranchedAxInstCo Representational co_con args) -- data instances only
| otherwise
= scrut | 264 | unwrapFamInstScrut :: TyCon -> [Type] -> CoreExpr -> CoreExpr
unwrapFamInstScrut tycon args scrut
| Just co_con <- tyConFamilyCoercion_maybe tycon
= mkCast scrut (mkUnbranchedAxInstCo Representational co_con args) -- data instances only
| otherwise
= scrut | 264 | unwrapFamInstScrut tycon args scrut
| Just co_con <- tyConFamilyCoercion_maybe tycon
= mkCast scrut (mkUnbranchedAxInstCo Representational co_con args) -- data instances only
| otherwise
= scrut | 202 | false | true | 0 | 9 | 41 | 77 | 36 | 41 | null | null |
HIPERFIT/futhark | src/Futhark/IR/Aliases.hs | isc | mkAliasedBody ::
(ASTRep rep, CanBeAliased (Op rep)) =>
BodyDec rep ->
Stms (Aliases rep) ->
Result ->
Body (Aliases rep)
mkAliasedBody dec stms res =
Body (mkBodyAliases stms res, dec) stms res | 206 | mkAliasedBody ::
(ASTRep rep, CanBeAliased (Op rep)) =>
BodyDec rep ->
Stms (Aliases rep) ->
Result ->
Body (Aliases rep)
mkAliasedBody dec stms res =
Body (mkBodyAliases stms res, dec) stms res | 206 | mkAliasedBody dec stms res =
Body (mkBodyAliases stms res, dec) stms res | 74 | false | true | 0 | 12 | 43 | 95 | 45 | 50 | null | null |
bravit/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | mapPDeclFC f g (PCAF fc n tm) = PCAF (f fc) n (mapPTermFC f g tm) | 65 | mapPDeclFC f g (PCAF fc n tm) = PCAF (f fc) n (mapPTermFC f g tm) | 65 | mapPDeclFC f g (PCAF fc n tm) = PCAF (f fc) n (mapPTermFC f g tm) | 65 | false | false | 0 | 7 | 15 | 49 | 22 | 27 | null | null |
andyarvanitis/Idris-dev | src/IRTS/Compiler.hs | bsd-3-clause | isCon _ = False | 15 | isCon _ = False | 15 | isCon _ = False | 15 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
uduki/hsQt | Qtc/Enums/Network/QAbstractSocket.hs | bsd-2-clause | eSocketAddressNotAvailableError :: SocketError
eSocketAddressNotAvailableError
= ieSocketError $ 9 | 100 | eSocketAddressNotAvailableError :: SocketError
eSocketAddressNotAvailableError
= ieSocketError $ 9 | 100 | eSocketAddressNotAvailableError
= ieSocketError $ 9 | 53 | false | true | 0 | 6 | 9 | 18 | 8 | 10 | null | null |
sdiehl/ghc | libraries/base/Data/Data.hs | bsd-3-clause | mkDataType :: String -> [Constr] -> DataType
mkDataType str cs = DataType
{ tycon = str
, datarep = AlgRep cs
} | 185 | mkDataType :: String -> [Constr] -> DataType
mkDataType str cs = DataType
{ tycon = str
, datarep = AlgRep cs
} | 185 | mkDataType str cs = DataType
{ tycon = str
, datarep = AlgRep cs
} | 140 | false | true | 0 | 7 | 95 | 44 | 24 | 20 | null | null |
jwiegley/ghc-release | libraries/haskeline/System/Console/Haskeline/LineState.hs | gpl-3.0 | pasteGraphemesBefore, pasteGraphemesAfter :: [Grapheme] -> CommandMode -> CommandMode
pasteGraphemesBefore [] = id | 114 | pasteGraphemesBefore, pasteGraphemesAfter :: [Grapheme] -> CommandMode -> CommandMode
pasteGraphemesBefore [] = id | 114 | pasteGraphemesBefore [] = id | 28 | false | true | 2 | 9 | 11 | 36 | 16 | 20 | null | null |
jml/hodor | Hodor/Types.hs | apache-2.0 | isPriority :: Priority -> Bool
isPriority (Pri _) = True | 56 | isPriority :: Priority -> Bool
isPriority (Pri _) = True | 56 | isPriority (Pri _) = True | 25 | false | true | 0 | 9 | 9 | 30 | 13 | 17 | null | null |
cantora/haschat | haschat.hs | mit | run :: Chan Msg -> Handle -> String -> IO ()
run chan handle user =
do
putStrLn $ user ++ " logged in"
chan' <- dupChan chan
chanreader <- chanloop chan'
broadcast $ "<" ++ user ++ " can haschat now>"
Exception.handle ignore readloop
killThread chanreader
broadcast $ "<" ++ user ++ ... | 703 | run :: Chan Msg -> Handle -> String -> IO ()
run chan handle user =
do
putStrLn $ user ++ " logged in"
chan' <- dupChan chan
chanreader <- chanloop chan'
broadcast $ "<" ++ user ++ " can haschat now>"
Exception.handle ignore readloop
killThread chanreader
broadcast $ "<" ++ user ++ ... | 703 | run chan handle user =
do
putStrLn $ user ++ " logged in"
chan' <- dupChan chan
chanreader <- chanloop chan'
broadcast $ "<" ++ user ++ " can haschat now>"
Exception.handle ignore readloop
killThread chanreader
broadcast $ "<" ++ user ++ " not can haschat now>"
putStrLn $ user +... | 658 | false | true | 7 | 11 | 216 | 266 | 116 | 150 | null | null |
schell/lamdu | bottlelib/Graphics/UI/Bottle/EventMap.hs | gpl-3.0 | filterByKey :: Ord k => (k -> Bool) -> Map k v -> Map k v
filterByKey p = Map.filterWithKey (const . p) | 103 | filterByKey :: Ord k => (k -> Bool) -> Map k v -> Map k v
filterByKey p = Map.filterWithKey (const . p) | 103 | filterByKey p = Map.filterWithKey (const . p) | 45 | false | true | 0 | 9 | 22 | 62 | 29 | 33 | null | null |
hguenther/smtlib2 | extras/emulated-datatypes/Language/SMTLib2/DatatypeEmulator.hs | gpl-3.0 | toNormalExpr (UntypedExprTrans e) = UntypedExpr (toNormalExpr e) | 64 | toNormalExpr (UntypedExprTrans e) = UntypedExpr (toNormalExpr e) | 64 | toNormalExpr (UntypedExprTrans e) = UntypedExpr (toNormalExpr e) | 64 | false | false | 0 | 6 | 6 | 25 | 11 | 14 | null | null |
GaloisInc/halvm-ghc | compiler/typecheck/TcType.hs | bsd-3-clause | isTouchableMetaTyVar :: TcLevel -> TcTyVar -> Bool
isTouchableMetaTyVar ctxt_tclvl tv
| isTyVar tv
= ASSERT2( isTcTyVar tv, ppr tv )
case tcTyVarDetails tv of
MetaTv { mtv_tclvl = tv_tclvl }
-> ASSERT2( checkTcLevelInvariant ctxt_tclvl tv_tclvl,
ppr tv $$ ppr tv_tclvl $$ ppr ct... | 414 | isTouchableMetaTyVar :: TcLevel -> TcTyVar -> Bool
isTouchableMetaTyVar ctxt_tclvl tv
| isTyVar tv
= ASSERT2( isTcTyVar tv, ppr tv )
case tcTyVarDetails tv of
MetaTv { mtv_tclvl = tv_tclvl }
-> ASSERT2( checkTcLevelInvariant ctxt_tclvl tv_tclvl,
ppr tv $$ ppr tv_tclvl $$ ppr ct... | 414 | isTouchableMetaTyVar ctxt_tclvl tv
| isTyVar tv
= ASSERT2( isTcTyVar tv, ppr tv )
case tcTyVarDetails tv of
MetaTv { mtv_tclvl = tv_tclvl }
-> ASSERT2( checkTcLevelInvariant ctxt_tclvl tv_tclvl,
ppr tv $$ ppr tv_tclvl $$ ppr ctxt_tclvl )
tv_tclvl `sameDepthAs` ctxt_t... | 363 | false | true | 0 | 13 | 114 | 130 | 61 | 69 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.