code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Numeral.ES.MX.Rules (rules) where
impo... | facebookincubator/duckling | Duckling/Numeral/ES/MX/Rules.hs | bsd-3-clause | 1,704 | 0 | 17 | 317 | 389 | 227 | 162 | 41 | 2 |
{-# LANGUAGE OverloadedStrings #-}
-- | Documentation page controller.
module HL.C.Documentation where
import HL.C
import HL.V.Documentation
-- | Documentation controller.
getDocumentationR :: C Html
getDocumentationR =
senza documentationV
| yogsototh/hl | src/HL/C/Documentation.hs | bsd-3-clause | 247 | 0 | 5 | 34 | 37 | 23 | 14 | 7 | 1 |
module Main where
import System.Environment
import Text.Read
import Math
main :: IO ()
main = do
args <- getArgs
putStrLn $ unlines $ exec args
exec :: [String] -> [String]
exec args =
case args of
[] ->
exampleI (0 :: Int)
(x:_) ->
--let r = readMaybe x in
case readMaybe x :: Maybe... | ott8bre/first-haskell | executable/Main.hs | bsd-3-clause | 491 | 0 | 14 | 176 | 175 | 89 | 86 | 21 | 4 |
module Language.Haskell.Preprocess (
ModuleName(..), SrcTreePath, Pkg,
unSTP,stFile,stDir,stpStr,
pkgRoot,pkgCabalFile,pkgModules,pkgMacros,pkgIncludeDirs,pkgDefaultExtensions,
directoriesThatRequireAutotoolsConfiguration,
configureWithAutotools,configureWithAutotoolsRecursive,
analyseCopy,analyseConfiguredCopy,
... | sourcegraph/preprocess-haskell | src/Language/Haskell/Preprocess.hs | bsd-3-clause | 414 | 0 | 5 | 29 | 86 | 58 | 28 | 12 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
module Main where
import Control.Concurrent.STM (TVar, newTVarIO)
import qualified Data.Map.Strict as Map
import Data.UUID ... | mattjbray/servant-elm-example-app | backend/Main.hs | bsd-3-clause | 2,465 | 0 | 14 | 792 | 609 | 333 | 276 | 53 | 1 |
-- |
-- Module : Crypto.Number.Prime
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : Good
{-# LANGUAGE BangPatterns #-}
module Crypto.Number.Prime
(
generatePrime
, generateSafePrime
, isProbablyPrime
, findPrimeF... | tekul/cryptonite | Crypto/Number/Prime.hs | bsd-3-clause | 10,013 | 0 | 19 | 3,226 | 2,769 | 1,626 | 1,143 | 162 | 5 |
module Main where
import Ivory.Tower.Config
import Ivory.OS.FreeRTOS.Tower.STM32
import LDrive.Platforms
import LDrive.Tests.CAN2UART (app)
main :: IO ()
main = compileTowerSTM32FreeRTOS testplatform_stm32 p $
app (stm32config_clock . testplatform_stm32)
testplatform_can
testplatform... | sorki/odrive | test/CAN2UART.hs | bsd-3-clause | 411 | 0 | 8 | 88 | 89 | 50 | 39 | 12 | 1 |
{-# language CPP #-}
-- No documentation found for Chapter "PipelineLayout"
module Vulkan.Core10.PipelineLayout ( createPipelineLayout
, withPipelineLayout
, destroyPipelineLayout
, PushConstantRange(..)
... | expipiplus1/vulkan | src/Vulkan/Core10/PipelineLayout.hs | bsd-3-clause | 43,090 | 0 | 18 | 6,400 | 3,711 | 2,278 | 1,433 | -1 | -1 |
module Y21.D10 where
import qualified Data.Map.Strict as M
import Imports
opener2closer :: Map Char Char
opener2closer = M.fromList $ zip "([{<" ")]}>"
reduce :: String -> String -> (String, String) -- stack -> input -> (stack, input)
reduce stack [] = (stack, []) -- stop (e... | oshyshko/adventofcode | src/Y21/D10.hs | bsd-3-clause | 1,430 | 0 | 12 | 515 | 489 | 270 | 219 | 37 | 4 |
import Graphics.Gloss
import AI.HNN.FF.Network
import Control.Arrow ((&&&))
import Numeric.LinearAlgebra
trainingSet :: Samples Float
trainingSet = [ (fromList [0, 0], fromList [0])
, (fromList [0, 1], fromList [1])
, (fromList [1, 0], fromList [1])
, (fromList [1, 1], fromLis... | alpmestan/hnn-gloss | Main.hs | bsd-3-clause | 1,619 | 3 | 13 | 426 | 697 | 362 | 335 | 32 | 2 |
module PartialGame
( PartialGame(..)
, partialGame
, unPartialGame
, partialGameFor
) where
import Board (cluesFor)
import Clues (Clues)
import Game (Game(..))
import PartialBoard (PartialBoard)
data PartialGame = PartialGame {
getPartialGameBoard :: PartialBoard,
getPartialGameClues :: Clues
} deriving... | jameshales/voltorb-flip | src/PartialGame.hs | bsd-3-clause | 859 | 0 | 8 | 136 | 201 | 117 | 84 | 19 | 1 |
module ParserTest where
import Data.Char
import LambdaCalc.Parser
import LambdaCalc.Syntax
import Text.Parsec
prop_ParseInt i = runParser number () "" (show i) == Right (Lit (LInt i))
where types = i :: Integer
prop_ParseBool b = runParser bool () "" (map ... | AlphaMarc/WYAH | test/ParserTest.hs | bsd-3-clause | 408 | 0 | 10 | 138 | 140 | 73 | 67 | 9 | 1 |
{-# LANGUAGE TemplateHaskell #-}
--------------------------------------------------------------------------------
-- |
-- Module : Life.Model
-- Copyright : (C) 2013 Sam Fredrickson
-- License : BSD-style (see "LICENSE" file)
-- Maintainer : Sam Fredrickson <kinghajj@gmail.com>
-- Stability : experimental... | kinghajj/Life | src/Life/Model.hs | bsd-3-clause | 2,623 | 0 | 15 | 803 | 665 | 376 | 289 | 56 | 1 |
import Data.Map as M (Map, (!))
import qualified Data.Map as M
import Data.List (elemIndex)
import Control.Monad.State
stableMatching :: (Ord a, Ord b) => [(a, [b])] -> [(b, [a])] -> [(a, b)]
stableMatching men women = evalState (propose (M.fromList women) men) M.empty
propose :: (Ord a,... | Gathros/algorithm-archive | contents/stable_marriage_problem/code/haskell/stableMarriage.hs | mit | 1,207 | 0 | 20 | 347 | 586 | 320 | 266 | 28 | 3 |
f x | x > 10 = 10
| x < 0 = 0
| otherwise = x
| itchyny/vim-haskell-indent | test/guard/reindent.out.hs | mit | 54 | 0 | 8 | 26 | 41 | 18 | 23 | 3 | 1 |
{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : Network.OAuth.Type.Credentials
-- Copyright : (c) Joseph Abrahamson 2013
-- License : MIT
--
-- Maintainer : me@jspha.com
-- Stability : experimental
-- Portability :... | ibotty/oauthenticated | src/Network/OAuth/Types/Credentials.hs | mit | 8,194 | 0 | 12 | 1,660 | 1,440 | 778 | 662 | 81 | 1 |
module Commands.Plugins.Spiros.IntelliJ.Run where
-- import Commands.Plugins.Spiros.Extra
-- import Commands.Backends.OSX
| sboosali/commands-spiros | config/Commands/Plugins/Spiros/IntelliJ/Run.hs | gpl-2.0 | 134 | 0 | 3 | 21 | 11 | 9 | 2 | 1 | 0 |
module Response
(
-- | @/about@
module Response.About,
-- | @/calendar@
module Response.Calendar,
-- | @/draw@
module Response.Draw,
-- | @/graph@
module Response.Graph,
-- | @/grid@
module Response.Grid,
-- | @/image@
m... | bell-kelly/courseography | app/Response.hs | gpl-3.0 | 968 | 0 | 5 | 295 | 150 | 100 | 50 | 26 | 0 |
-- {-# LANGUAGE ScopedTypeVariables #-}
{- |
Finite categories are categories with a finite number of arrows.
In our case, this corresponds to functions with finite domains (and hence, ranges).
These functions have a number of possible representations.
Which is best will depend on the given function.
One common proper... | Drezil/subhask | src/SubHask/Category/Finite.hs | bsd-3-clause | 5,980 | 74 | 10 | 1,488 | 1,472 | 791 | 681 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Site
( app
) where
import Data.ByteString (ByteString)
import Data.ByteString.UTF8 (toString)
import Snap.Core
import Snap.Util.FileServe
import Snap.Snaplet
import Snap.Snaplet.Heist
import Snap.Snaplet.MongoDB
import Heist.Interpreted
import Application
import Example.... | Palmik/snaplet-mongodb-minimalistic | examples/example1/src/Site.hs | bsd-3-clause | 1,475 | 0 | 12 | 305 | 438 | 227 | 211 | 37 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
module Ros.Geometry_msgs.PointStamped where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Intern... | acowley/roshask | msgs/Geometry_msgs/Ros/Geometry_msgs/PointStamped.hs | bsd-3-clause | 1,423 | 1 | 9 | 255 | 364 | 215 | 149 | 35 | 0 |
module Tests.Language.Parser.Symbols
( parserSymbolTests
)
where
import Test.Framework ( Test
, testGroup
)
import Test.Framework.Providers.HUnit ( testCase )
import Test.HU... | rumblesan/improviz | test/Tests/Language/Parser/Symbols.hs | bsd-3-clause | 1,384 | 0 | 12 | 450 | 230 | 124 | 106 | 29 | 1 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="sq-AL">
<title>Context Alert Filters | ZAP Extension</title>
<maps>
<homeID>top</homeID>
... | 0xkasun/security-tools | src/org/zaproxy/zap/extension/alertFilters/resources/help_sq_AL/helpset_sq_AL.hs | apache-2.0 | 983 | 80 | 66 | 161 | 417 | 211 | 206 | -1 | -1 |
module DatatypesTermInstances where
import Datatypes
import TermRep
{- Generated by DrIFT (Automatic class derivations for Haskell) -}
{-# LINE 1 "Datatypes.hs" #-}
{-* Generated by DrIFT : Look, but Don't Touch. *-}
instance Term Assignment where
explode (x::Assignment) = TermRep (toDyn x, f x, g x) where
f (Assi... | forste/haReFork | StrategyLib-4.0-beta/examples/joos-padl02/DatatypesTermInstances.hs | bsd-3-clause | 15,393 | 0 | 17 | 2,619 | 6,674 | 3,375 | 3,299 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- ---------------------------------------------------------------------------
-- |
-- Module : Data.Vector.Algorithms.Common
-- Copyright : (c) 2008-2011 Dan Doel
-- Maintainer : Dan Doel
-- Stability : Experimental
-- Portability : Port... | mightymoose/liquidhaskell | benchmarks/vector-algorithms-0.5.4.2/Data/Vector/Algorithms/Common.hs | bsd-3-clause | 6,409 | 0 | 14 | 1,813 | 588 | 340 | 248 | 32 | 1 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="hi-IN">
<title>Quick Start | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref... | msrader/zap-extensions | src/org/zaproxy/zap/extension/quickstart/resources/help_hi_IN/helpset_hi_IN.hs | apache-2.0 | 973 | 80 | 66 | 160 | 415 | 210 | 205 | -1 | -1 |
module ShouldFail where
-- See Trac #1176
-- This is really a pretty-printer test, not a typechecker test
--
-- Before ghc-7.2 the error messages looked like this (notice the wrong
-- indentation):
{-
tcfail177.hs:9:12:
Couldn't match expected type `Bool' with actual type `Int'
In the return type of a call of... | ezyang/ghc | testsuite/tests/typecheck/should_fail/tcfail177.hs | bsd-3-clause | 1,566 | 0 | 7 | 504 | 148 | 87 | 61 | 19 | 1 |
{-# LANGUAGE CPP #-}
-- | Main implementation of the OpenPGP message format <http://tools.ietf.org/html/rfc4880>
--
-- The recommended way to import this module is:
--
-- > import qualified Data.OpenPGP as OpenPGP
module Data.OpenPGP (
Packet(
AsymmetricSessionKeyPacket,
OnePassSignaturePacket,
SymmetricSessionK... | acatton/OpenPGP-Haskell | Data/OpenPGP.hs | isc | 46,850 | 950 | 23 | 8,547 | 13,691 | 7,285 | 6,406 | 1,050 | 7 |
{-# LANGUAGE OverloadedStrings #-}
-- | This module exports functionality for generating a call graph of
-- an Futhark program.
module Futhark.Analysis.CallGraph
( CallGraph,
buildCallGraph,
isFunInCallGraph,
calls,
calledByConsts,
allCalledBy,
numOccurences,
findNoninlined,
)
where
im... | diku-dk/futhark | src/Futhark/Analysis/CallGraph.hs | isc | 6,062 | 0 | 20 | 1,515 | 1,701 | 871 | 830 | 123 | 2 |
{-|
Module : Control.Monad.Bayes.Trace
Description : Probabilistic computation accumulating a trace
Copyright : (c) Yufei Cai, 2016
(c) Adam Scibior, 2016
License : MIT
Maintainer : ams240@cam.ac.uk
Stability : experimental
Portability : GHC
-}
{-# LANGUAGE
GADTs,
DeriveFunctor,
Sc... | ocramz/monad-bayes | src/Control/Monad/Bayes/Trace.hs | mit | 10,854 | 0 | 21 | 2,523 | 3,167 | 1,624 | 1,543 | -1 | -1 |
module Internal where
import Control.Applicative
import Control.Dangerous
import Control.DateTime.Absolute
import Text.Pin
import Text.Point
import Text.Pinpoint
import {-# SOURCE #-} Data.File
class (Applicative i, Errorable i) => Internal i where
pinpoint :: Pinpoint -> i Absolute
location :: Pinpoint -> i S... | Soares/tagwiki | src/Internal.hs | mit | 560 | 0 | 11 | 120 | 199 | 107 | 92 | 19 | 0 |
--import System.Random
import System.Random.Mersenne
--import System.Random.Mersenne.Pure64
import System.Environment
import Text.Printf
import Hoton.Distributions
import Hoton.Vector
import Hoton.Types
import Hoton.Scene
import Hoton.Scenes.Forward1D
import Hoton.IO
main :: IO ()
main = do
args <- getArgs
ex... | woufrous/hoton | src/main.hs | mit | 3,511 | 0 | 22 | 1,147 | 1,135 | 541 | 594 | -1 | -1 |
-- -------------------------------------------------------------------------------------
-- Author: Sourabh S Joshi (cbrghostrider); Copyright - All rights reserved.
-- For email, run on linux (perl v5.8.5):
-- perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0... | cbrghostrider/Hacking | HackerRank/Contests/ProjectEuler/017_numberToWords.hs | mit | 2,530 | 28 | 15 | 668 | 929 | 439 | 490 | 65 | 8 |
module Database
(Schema(..),
createSchema)
where
import qualified Data.Binary as Binary
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as LBS
import qualified Data.UUID as UUID
import qualified Timestamp as Timestamp
import Data.Maybe
import Language.SQL.SQLite
data Schema =
S... | IreneKnapp/ozweb | Haskell/Database.hs | mit | 2,342 | 0 | 24 | 647 | 518 | 280 | 238 | 55 | 1 |
main :: IO ()
main = do
firstRow <- getLine
print . length
. filter (=='.')
. concat
. take 400000 $ iterate nextRow firstRow
nextRow :: String -> String
nextRow row = map rule (zip3 left center right)
where
left = '.' : init row
center = row
right = tail row ++ "."
rul... | lzlarryli/advent_of_code_2016 | day18/part2.hs | mit | 468 | 0 | 12 | 157 | 209 | 111 | 98 | 17 | 5 |
import Data.List
import Data.Maybe
import Data.Hash.MD5
import Debug.Trace
key = "reyedfim"
traceSelf x = traceShow x x
result = map (fromJust . flip lookup stuff . show) [0..7]
where stuff = map (\s -> traceSelf ([s !! 5], s !! 6)) $ filter (isPrefixOf "00000") $ map (\i -> md5s $ Str $ key ++ show i) [1..]
main... | msullivan/advent-of-code | 2016/A5b.hs | mit | 346 | 0 | 15 | 70 | 169 | 89 | 80 | 9 | 1 |
module ProjectRosalind.Lcsm.DirectToSet where
import Data.Vector as V
import Data.Set as S
import Data.List as L
import Data.Hashable (hash)
import ProjectRosalind.Fasta (parseFasta')
import ProjectRosalind.Fasta_Types
import System.IO (openFile, hGetContents, IOMode(ReadMode))
import Control.Monad
import Data.... | brodyberg/Notes | ProjectRosalind.hsproj/LearnHaskell/lib/ProjectRosalind/Lcsm/DirectToSet.hs | mit | 2,720 | 0 | 12 | 628 | 820 | 404 | 416 | 70 | 1 |
{-# LANGUAGE
FlexibleContexts,
FlexibleInstances,
MultiParamTypeClasses,
OverloadedStrings,
TypeFamilies
#-}
module Imgur where
import Control.Lens
import Control.Monad.Reader
import Data.Text (Text)
import qualified Data.Text as Text
import Data.Monoid ((<>))
import Network.Wreq
import ... | Solonarv/imgur-haskell | src/Imgur.hs | mit | 485 | 0 | 8 | 93 | 98 | 65 | 33 | 19 | 0 |
{-# language TemplateHaskell #-}
{-# language DeriveGeneric #-}
module Flow.Action where
import Autolib.TES.Identifier
import Autolib.Symbol
import Autolib.ToDoc
import Autolib.Reader
import Autolib.Size
import Autolib.Hash
import GHC.Generics
-- | used in the alphabet for the automaton
data Action
= Execute I... | marcellussiegburg/autotool | collection/src/Flow/Action.hs | gpl-2.0 | 567 | 0 | 9 | 95 | 143 | 80 | 63 | 19 | 0 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Web.SLSSpec(main, spec) where
import Control.Concurrent (forkIO, killThread)
import Control.Exception
import Control.Exception
import Control.Monad
import ... | asg0451/scotty-login-session | test/Web/SLSSpec.hs | gpl-2.0 | 4,577 | 0 | 22 | 1,364 | 1,207 | 630 | 577 | 99 | 2 |
module Probability.Distribution.List where
import Probability.Random
independent_densities (d:ds) (x:xs) = densities d x ++ independent_densities ds xs
independent_densities [] [] = []
independent_densities _ _ = [doubleToLogDouble 0.0]
-- This cannot handle infinite lists because it uses the total... | bredelings/BAli-Phy | haskell/Probability/Distribution/List.hs | gpl-2.0 | 2,305 | 0 | 16 | 580 | 575 | 284 | 291 | 24 | 3 |
module DarkPlaces.Text.Colors (
RGB(..),
getRGB,
getColor,
simplifyColor,
hReset
) where
import Data.Bits
import System.Console.ANSI
import System.IO (Handle)
newtype RGB = RGB (Int, Int, Int) deriving(Show, Eq)
newtype HSV = HSV (Double, Double, Double) deriving(Show, Eq)
getRGB :: Int -> RGB
ge... | bacher09/darkplaces-text | src/DarkPlaces/Text/Colors.hs | gpl-2.0 | 2,407 | 0 | 14 | 668 | 1,035 | 546 | 489 | 60 | 6 |
module TestNormalize (
testNormalize
) where
import Language.Python.Common.Pretty
import Language.Python.Common.PrettyAST
import Test.HUnit.Base
import Quenelle.Normalize
import QuickCheck
testNormalize :: Test
testNormalize = TestLabel "Normalize" $ qc roundTrip 10000 "QuickCheckNormalize"
where roundTrip ... | philipturnbull/quenelle | test/TestNormalize.hs | gpl-2.0 | 369 | 0 | 10 | 50 | 87 | 49 | 38 | 10 | 1 |
{- |
Module : $Header$
Copyright : Felix Gabriel Mance
License : GPLv2 or higher, see LICENSE.txt
Maintainer : f.mance@jacobs-university.de
Stability : provisional
Portability : portable
Static analysis for RDF
-}
module RDF.StaticAnalysis where
import OWL2.AS
import OWL2.Parse
import RDF.AS
imp... | nevrenato/HetsAlloy | RDF/StaticAnalysis.hs | gpl-2.0 | 10,269 | 0 | 21 | 2,591 | 3,292 | 1,678 | 1,614 | 190 | 6 |
{- |
Module : $Id: testwrap.hs 18342 2013-11-29 02:57:59Z sternk $
Copyright : (c) Andy Gimblett and Markus Roggenbach and Uni Bremen 2004
License : GPLv2 or higher, see LICENSE.txt
Maintainer : a.m.gimblett@swan.ac.uk
Stability : provisional
Portability : portable
Test case wrapper for CspCASL sp... | nevrenato/HetsAlloy | CspCASL/testwrap.hs | gpl-2.0 | 12,210 | 0 | 15 | 3,370 | 2,336 | 1,188 | 1,148 | 162 | 6 |
{- |
Module : $Header$
Copyright : Heng Jiang, Uni Bremen 2004-2007
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : non-portable (imports Logic.Logic)
analyse OWL files by calling the external Java parser.
-}
module OWL2.Parse... | nevrenato/Hets_Fork | OWL2/ParseOWLAsLibDefn.hs | gpl-2.0 | 2,855 | 0 | 19 | 608 | 708 | 371 | 337 | 68 | 4 |
module HLinear.Utility.Permute
where
import Prelude hiding ( (+), (-), (*), recip )
import Control.DeepSeq ( NFData(..) )
import Control.Monad ( replicateM )
import Data.Permute
import Math.Structure
import Test.QuickCheck as QC
import Test.SmallCheck.Series as SC
instance NFData Permute where
rnf p = seq p ()
... | martinra/hlinear | src/HLinear/Utility/Permute.hs | gpl-3.0 | 1,415 | 2 | 14 | 403 | 522 | 271 | 251 | -1 | -1 |
--------------------------------------------------------------------------------
-- This file is part of diplomarbeit ("Diplomarbeit Johannes Weiß"). --
-- --
-- diplomarbeit is free software: you can redistribute it and/or modify ... | weissi/diplomarbeit | lib/Math/FiniteFields/DebugField.hs | gpl-3.0 | 3,102 | 0 | 16 | 991 | 642 | 356 | 286 | 34 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TemplateHaskell #-}
-- |
-- Copyright : (c) 2010-2012 Benedikt Schmidt & Simon Meier
-- License : GPL v3 (see LICENSE)
--
-- Maintainer : Simon Meier <iridcode@gmail.com>
-- Portability : GHC only
--
-- Types representing constraints.
module Theory.Constraint.S... | ekr/tamarin-prover | lib/theory/src/Theory/Constraint/System/Constraints.hs | gpl-3.0 | 6,955 | 0 | 12 | 1,763 | 1,801 | 939 | 862 | 122 | 1 |
module Hob.Control (
maybeDo,
flushEvents
) where
import Control.Monad (when)
import Graphics.UI.Gtk (eventsPending, mainIteration)
maybeDo :: Monad b => (a -> b ()) -> Maybe a -> b ()
maybeDo = maybe (return())
flushEvents :: IO()
flushEvents = do
pending <- eventsPending
when (pending > 0) $ main... | svalaskevicius/hob | src/lib/Hob/Control.hs | gpl-3.0 | 345 | 0 | 11 | 71 | 137 | 72 | 65 | 11 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-config/gen/Network/AWS/Config/DescribeDeliveryChannelStatus.hs | mpl-2.0 | 5,050 | 0 | 10 | 879 | 547 | 328 | 219 | 68 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Projects/Get.hs | mpl-2.0 | 2,709 | 0 | 12 | 620 | 305 | 188 | 117 | 49 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Insert.hs | mpl-2.0 | 3,405 | 0 | 14 | 760 | 406 | 242 | 164 | 64 | 1 |
import Data.List
import Data.Char
cs = ['A','N','a','n']
cnv c
| ord('A') <= ord(c) && ord(c) <= ord('M') = 'A'
| ord('N') <= ord(c) && ord(c) <= ord('Z') = 'N'
| ord('a') <= ord(c) && ord(c) <= ord('m') = 'a'
| ord('n') <= ord(c) && ord(c) <= ord('z') = 'n'
pack [] _ = []
pack (c:cr) s ... | a143753/AOJ | 3101.hs | apache-2.0 | 914 | 8 | 13 | 391 | 551 | 265 | 286 | 33 | 3 |
module Treepr where
import Treedef
-- pretty print block list
ptreebl (BlockList BEmpty b) = ptreeb b
ptreebl (BlockList a b) = do
ptreebl a
ptreeb b
-- pretty print load balance block
ptreelbl i (LBlockList LBEmpty b) = ptreelb i b
ptreelbl i (LBlockList a b) = do
ptreelbl i a
ptreelb i b
-- pretty print fir... | shlomobauer/BuildIT | src/Treepr.hs | apache-2.0 | 4,473 | 0 | 12 | 1,155 | 2,081 | 965 | 1,116 | 150 | 1 |
module Graham.A292144Spec (main, spec) where
import Test.Hspec
import Graham.A292144 (a292144)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A292144" $
it "correctly computes the first 20 elements" $
take 20 (map a292144 [1..]) `shouldBe` expectedValue where
expectedValue = [0,0,0,1,0,0,0,... | peterokagey/haskellOEIS | test/Graham/A292144Spec.hs | apache-2.0 | 347 | 0 | 10 | 59 | 160 | 95 | 65 | 10 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QCompleter.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:21
Warning : this file is machine generated - do no... | uduki/hsQt | Qtc/Gui/QCompleter.hs | bsd-2-clause | 19,269 | 0 | 14 | 3,104 | 6,045 | 3,067 | 2,978 | -1 | -1 |
{-# LANGUAGE TypeOperators, DefaultSignatures, FlexibleContexts, TypeSynonymInstances, GeneralizedNewtypeDeriving #-}
{-# LANGUAGE BinaryLiterals, FlexibleInstances, OverloadedStrings, DeriveLift, LambdaCase, RecordWildCards #-}
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, TemplateHaskell, DeriveGeneric,... | Xandaros/MinecraftCLI | src/Network/Protocol/Minecraft/Types.hs | bsd-2-clause | 14,183 | 0 | 21 | 5,172 | 3,899 | 2,065 | 1,834 | 277 | 4 |
{-# LANGUAGE Haskell2010 #-}
module DeprecatedTypeSynonym where
-- | some documentation
type TypeSyn = String
{-# DEPRECATED TypeSyn "TypeSyn" #-}
type OtherTypeSyn = String
{-# DEPRECATED OtherTypeSyn "OtherTypeSyn" #-}
| haskell/haddock | html-test/src/DeprecatedTypeSynonym.hs | bsd-2-clause | 224 | 0 | 4 | 32 | 20 | 15 | 5 | 6 | 0 |
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE OverlappingInstances #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeFamilies #-}
{-# LA... | ifigueroap/mzv | src/Control/Monad/Views.hs | bsd-3-clause | 4,205 | 16 | 14 | 1,330 | 1,678 | 877 | 801 | 96 | 1 |
{-# LANGUAGE RankNTypes #-}
-------------------------------------------------------------------------------
--
-- Module: Network.Server.Concurrent
-- Licence: BSD3
--
-- Maintainer:
-- Stability: experimental
-- Portability: NixOs
--
-- Skeleton for Concurrent TCP Server based on green threads.
-- This module based o... | qnikst/TcpServers | src/Network/Server/Concurrent.hs | bsd-3-clause | 4,908 | 0 | 19 | 1,281 | 1,109 | 625 | 484 | 97 | 3 |
module Control.Handler
( Handler
, new
, reset
, set
, call
) where
import UnliftIO.IORef
import Control.Monad.IO.Class
newtype Handler m a = Handler (IORef (a -> m ()))
new :: MonadIO m => m (Handler m a)
new = Handler <$> newIORef (\_ -> return ())
reset :: MonadIO m => Handler m a -> m ()
reset (Hand... | abbradar/yaxmpp | src/Control/Handler.hs | bsd-3-clause | 543 | 0 | 11 | 138 | 289 | 146 | 143 | 19 | 1 |
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeOperators #-}
{-# LA... | jonascarpay/visor | src/Vector.hs | bsd-3-clause | 1,980 | 2 | 10 | 544 | 881 | 455 | 426 | 63 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE OverloadedStrings #-}
module Guide.Api.Server
( runApiServer
)
where
import Imports
import Data.Acid as Acid
import Servant
import Servant.Generic
import Network.Wai.Handler.Warp (run)
import Network.Wai ... | aelve/hslibs | src/Guide/Api/Server.hs | bsd-3-clause | 1,832 | 0 | 12 | 440 | 309 | 182 | 127 | 32 | 1 |
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 702
{-# LANGUAGE Safe #-}
#endif
#if __GLASGOW_HASKELL__ >= 710
{-# LANGUAGE AutoDeriveTypeable #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.Trans.Writer.CPS
-- Copyright : (c) Daniel Mend... | minad/writer-cps-transformers | src/Control/Monad/Trans/Writer/CPS.hs | bsd-3-clause | 1,612 | 0 | 4 | 288 | 106 | 84 | 22 | 20 | 0 |
{-# LANGUAGE MultiParamTypeClasses #-}
module Math.VectorSpaces.InnerProduct where
import qualified Math.Algebra.Vector as V
infixl 7 <.>
class (V.Vector a b) => InnerProduct a b where
(<.>) :: b -> b -> a
| michiexile/hplex | pershom/src/Math/VectorSpaces/InnerProduct.hs | bsd-3-clause | 218 | 0 | 8 | 43 | 61 | 37 | 24 | 6 | 0 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE ExistentialQuantification #-}
module Testing where
import Data.Maybe
import Control.Arrow
data Test = forall a. Show a => Test String (a -> Bool) [a]
data Failure = forall a. Show a => Fail String [a]
instance Show Failure where
show (Fail s as) = "Failed Test \"" ++ s
... | kemskems/cis194-spring13 | src/Testing.hs | bsd-3-clause | 1,116 | 0 | 11 | 337 | 579 | 313 | 266 | 24 | 2 |
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances, TypeFamilies, FlexibleContexts, TypeSynonymInstances #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
module Sequence where
import Data.Monoid
import Data.FingerTree.Unboxed as F
import Data.Unboxed
data Size = Size { unSize :: {-# UNPACK #-} !Int ... | reinerp/fingertree-unboxed | examples/Sequence.hs | bsd-3-clause | 1,794 | 0 | 10 | 434 | 692 | 365 | 327 | 50 | 2 |
module Data.Array.Repa.Repr.LazyTreeSplitting
( L, Array (..)
, fromRope, toRope, ropeFromList, ropeToList, setGlobalLeafSize
)
where
import Data.Array.Repa.Shape
import Data.Array.Repa.Base hiding (toList)
import Data.Array.Repa.Eval hiding (fromList, toList)
import Data.Array.Repa.Index
impor... | kairne/repa-lts | Data/Array/Repa/Repr/LazyTreeSplitting.hs | bsd-3-clause | 2,414 | 0 | 12 | 520 | 663 | 363 | 300 | -1 | -1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module Infer where
import Control.Monad.State
import Control.Monad.Writer
import Control.Monad.Except
import qualified Data.Map.Strict as Map
import qualified Data.Set as Set
import Syntax
type Cons... | felixgb/calc2latex | src/Infer.hs | bsd-3-clause | 4,166 | 0 | 14 | 979 | 1,761 | 904 | 857 | 105 | 3 |
{-
******************************************************************************
* I N V A D E R S *
* *
* Module: Animate *
*... | ivanperez-keera/SpaceInvaders | src/Animate.hs | bsd-3-clause | 9,141 | 0 | 21 | 3,049 | 1,381 | 721 | 660 | 98 | 5 |
module Import.Configuration
(DeploymentEnvironment(..),
mainWrapper)
where
import Prelude as Import hiding
(head, init, last, readFile, tail, writeFile, catch)
import qualified Data.Map as Map
import qualified Data.Text as Text
import qualified Data.Yaml as YAML
import Control.Monad.Logger
import System.Env... | IreneKnapp/qt | Haskell/Import/Configuration.hs | bsd-3-clause | 2,518 | 0 | 29 | 709 | 636 | 330 | 306 | 66 | 9 |
{-# LANGUAGE RebindableSyntax #-}
-- Copyright : (C) 2009 Corey O'Connor
-- License : BSD-style (see the file LICENSE)
{-# LANGUAGE NoRebindableSyntax #-}
{-# LANGUAGE ImplicitPrelude #-}
import Verify
import ArbMarshal
import qualified ArbMarshal.Binary as Binary
import qualified ArbMarshal.Dynamic as Dynami... | coreyoconnor/bind-marshal | test/verify_dynamic_bytestring_perf.hs | bsd-3-clause | 1,717 | 1 | 12 | 626 | 257 | 139 | 118 | 27 | 1 |
{-# LANGUAGE
DeriveFunctor
, DeriveGeneric
, DeriveTraversable
, DeriveDataTypeable
, MultiParamTypeClasses
, FlexibleInstances
#-}
module Data.Tree.Knuth.Forest where
import Prelude hiding (foldr, elem)
import Data.Semigroup
import Data.Foldable hiding (elem)
import Data.Witherable (Filterable, catMa... | athanclark/rose-trees | src/Data/Tree/Knuth/Forest.hs | bsd-3-clause | 5,863 | 0 | 11 | 1,318 | 2,336 | 1,171 | 1,165 | 149 | 1 |
{-# Language BlockArguments, TemplateHaskell, OverloadedStrings, BangPatterns #-}
{-|
Module : Client.State.Network
Description : IRC network session state
Copyright : (c) Eric Mertens, 2016
License : ISC
Maintainer : emertens@gmail.com
This module is responsible for tracking the state of an individual IR... | glguy/irc-core | src/Client/State/Network.hs | isc | 41,480 | 7 | 22 | 11,377 | 11,023 | 5,627 | 5,396 | -1 | -1 |
main = concat $ map id [1, 2, 3]
| pbrisbin/codeclimate-hlint | test/example.hs | mit | 33 | 0 | 7 | 9 | 24 | 13 | 11 | 1 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-cloudsearch/gen/Network/AWS/CloudSearch/DeleteIndexField.hs | mpl-2.0 | 4,980 | 0 | 14 | 969 | 626 | 379 | 247 | 82 | 1 |
{-# LANGUAGE TypeFamilies, DataKinds, GADTs, KindSignatures #-}
data Tree :: Bool -> * -> * where
E :: Tree False a
T :: Tree False a -> a -> Tree False a -> Tree True a
type family If (cond :: Bool) thenn elsse :: *
type instance If True a b = a
type instance If False a b = b
type family And (a :: Bool) (b :: ... | toonn/sciartt | if.hs | bsd-2-clause | 632 | 0 | 10 | 186 | 276 | 148 | 128 | 19 | 1 |
module ForeignObj( ForeignObj, module ForeignObj ) where
import Prelude
-- data ForeignObj -- in Prelude
-- recently renamed
newForeignObj = makeForeignObj
primitive newForeignPtr_ :: Addr{-free-} -> IO ForeignObj
primitive addForeignPtrFinalizer :: ForeignObj -> Addr{-free-} -> IO ()
primitive writeForeignObj :: Fo... | FranklinChen/hugs98-plus-Sep2006 | lib/exts/ForeignObj.hs | bsd-3-clause | 578 | 11 | 8 | 95 | 144 | 76 | 68 | -1 | -1 |
-- |
-- Module : Data.ASN1.BinaryEncoding.Writer
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- Serialize events for streaming.
--
module Data.ASN1.BinaryEncoding.Writer
( toByteString
, toLazyByteString
) whe... | mboes/hs-asn1 | encoding/Data/ASN1/BinaryEncoding/Writer.hs | bsd-3-clause | 1,519 | 0 | 14 | 448 | 374 | 206 | 168 | 23 | 10 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE CPP, DeriveDataTypeable #-}
-- |
-- #name_types#
-- GHC uses several kinds of name internally:
--
-- * 'OccName.OccName': see "OccName#name_types"
--
-- * 'RdrName.RdrName' is the type of names that come di... | olsner/ghc | compiler/basicTypes/RdrName.hs | bsd-3-clause | 47,094 | 0 | 17 | 13,167 | 8,866 | 4,725 | 4,141 | 568 | 5 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
-- | Cache information about previous builds
modul... | juhp/stack | src/Stack/Build/Cache.hs | bsd-3-clause | 14,230 | 0 | 15 | 3,693 | 2,825 | 1,424 | 1,401 | 266 | 5 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.TopHandler
-- Copyright : (c) The University of Glasgow, 2001-2002
-- License ... | rahulmutt/ghcvm | libraries/base/GHC/TopHandler.hs | bsd-3-clause | 2,499 | 5 | 13 | 478 | 349 | 204 | 145 | -1 | -1 |
module Data.Graph.Inductive.Query.TransClos(
trc
) where
import Data.Graph.Inductive.Graph
import Data.Graph.Inductive.Query.DFS (reachable)
getNewEdges :: (DynGraph gr) => [LNode a] -> gr a b -> [LEdge ()]
getNewEdges vs g = concatMap (\(u,_)->r u g) vs
where r = \u g' -> map (\v->(u,v,())) (... | scolobb/fgl | Data/Graph/Inductive/Query/TransClos.hs | bsd-3-clause | 658 | 0 | 12 | 145 | 225 | 124 | 101 | 10 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash, UnboxedTuples, BangPatterns #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Real
-- Copyright : (c) The Univers... | green-haskell/ghc | libraries/base/GHC/Real.hs | bsd-3-clause | 25,755 | 0 | 13 | 7,758 | 5,230 | 2,881 | 2,349 | 330 | 2 |
{-|
Module : Idris.Elab.Rewrite
Description : Code to elaborate rewrite rules.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE PatternGuards, ViewPatterns #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module Idris.Elab.Rewrite(elabRewrite, elabRewriteLemma) where
import Id... | tpsinnem/Idris-dev | src/Idris/Elab/Rewrite.hs | bsd-3-clause | 10,999 | 0 | 22 | 4,360 | 3,435 | 1,700 | 1,735 | 185 | 15 |
{-# language GeneralizedNewtypeDeriving, ScopedTypeVariables, OverloadedStrings #-}
-- | Module for human readable text.
module Base.Prose (
Prose(..),
standardFontColor,
headerFontColor,
colorizeProse,
capitalizeProse,
getText,
getString,
nullProse,
lengthProse,
p,
pVerba... | geocurnoff/nikki | src/Base/Prose.hs | lgpl-3.0 | 2,763 | 0 | 14 | 595 | 696 | 380 | 316 | 79 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-missing-fields #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-------------------... | raphaelamorim/fbthrift | thrift/compiler/test/fixtures/includes/gen-hs/Module_Consts.hs | apache-2.0 | 1,815 | 0 | 6 | 339 | 377 | 262 | 115 | 37 | 0 |
module A4 where
--Any type/data constructor name declared in this module can be renamed.
--Any type variable can be renamed.
--Rename type Constructor 'BTree' to 'MyBTree'
data BTree a = Empty | T a (BTree a) (BTree a)
deriving Show
buildtree :: Ord a => [a] -> BTree a
buildtree [] = Empty
buildtree... | kmate/HaRe | old/testing/asPatterns/A4.hs | bsd-3-clause | 736 | 0 | 9 | 184 | 292 | 148 | 144 | 16 | 1 |
{-# LANGUAGE Safe #-}
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : System.Environment
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskel... | sdiehl/ghc | libraries/base/System/Environment.hs | bsd-3-clause | 11,545 | 127 | 16 | 2,351 | 1,899 | 1,050 | 849 | 129 | 3 |
{-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, GADTs, RankNTypes #-}
module T9144 where
import Data.Proxy
import GHC.TypeLits
data family Sing (a :: k)
data SomeSing :: KProxy k -> * where
SomeSing :: forall (a :: k). Sing a -> SomeSing ('KProxy :: KProxy k)
class kproxy ~ 'KProxy => SingKind (kproxy :: KProxy... | urbanslug/ghc | testsuite/tests/polykinds/T9144.hs | bsd-3-clause | 1,017 | 8 | 12 | 200 | 406 | 215 | 191 | 23 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
module SaveFormat where
import Building
import Debug.Trace
import Data.ByteString (ByteString)
import Data.ByteString.Base64
import ... | glguy/CookieCalculator | src/SaveFormat.hs | isc | 6,886 | 0 | 16 | 1,478 | 1,947 | 1,086 | 861 | 163 | 2 |
{-# LANGUAGE
OverloadedStrings
, PatternGuards
#-}
module Text.BraVal.Report where
import qualified Data.Text as Text
import qualified Data.Text.Lazy as Lazy
import Data.Text.Template
import Data.Tuple (swap)
import Control.Monad.Trans.Writer
import Control.Arrow ((>>>))
import Text.BraVal.Types
type Text = ... | kindaro/BraVal | src/Text/BraVal/Report.hs | isc | 1,762 | 0 | 15 | 482 | 519 | 277 | 242 | 32 | 4 |
module Database.Kafka.Core (
connectProducer,
connectConsumer,
push,
pull
) where
import Database.Kafka.Types (KafkaConfig, ProducerConfig, ConsumerConfig, TopicConfig, Consumer, Producer, Message)
connectProducer :: KafkaConfig -> ProducerConfig -> TopicConfig -> IO (Either String Producer)
connectProducer =... | yanatan16/haskell-kafka | src/Database/Kafka/Core.hs | mit | 658 | 0 | 10 | 98 | 197 | 106 | 91 | 14 | 1 |
-- Copyright (c) Microsoft. All rights reserved.
-- Licensed under the MIT license. See LICENSE file in the project root for full license information.
{-# LANGUAGE OverloadedStrings, RecordWildCards, DeriveGeneric,
StandaloneDeriving #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-|
Copyright : (c) Microsoft
Licens... | upsoft/bond | compiler/src/Language/Bond/Syntax/JSON.hs | mit | 8,612 | 0 | 15 | 2,666 | 2,044 | 1,011 | 1,033 | 204 | 0 |
module SpecHelper
( module Test.Hspec
, module Lib
, module Control.Exception
) where
import Test.Hspec
import Lib
import Control.Exception (evaluate)
| dimus/zones | test/SpecHelper.hs | mit | 162 | 0 | 5 | 31 | 40 | 26 | 14 | 7 | 0 |
module LogFind ( getAllFilesUnder
, multipleStringsToPredicate
, matchesAll
, matchesSome
) where
import Data.Functor
import Data.List (partition)
import System.Directory (doesDirectoryExist, getDirectoryContents)
import ... | matthieubulte/logfind | lib/LogFind.hs | mit | 3,936 | 0 | 12 | 771 | 609 | 362 | 247 | 35 | 1 |
{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Com.Mysql.Cj.Mysqlx.Protobuf.ServerMessages.Type (Type(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import qualified Data.Type... | naoto-ogawa/h-xproto-mysql | src/Com/Mysql/Cj/Mysqlx/Protobuf/ServerMessages/Type.hs | mit | 5,966 | 0 | 11 | 872 | 1,309 | 726 | 583 | 118 | 1 |
{-# htermination elemIndices :: () -> [()] -> [Int] #-}
import List
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/List_elemIndices_1.hs | mit | 68 | 0 | 3 | 12 | 5 | 3 | 2 | 1 | 0 |
import Data.List (elemIndex, maximumBy)
type Denominator = Int
type CycleLength = Int
reciprocalCycles :: (Denominator, CycleLength)
reciprocalCycles =
maximumBy (\a b -> compare (snd a) (snd b)) $ map cycleLength [1..999]
cycleLength :: Int -> (Denominator, CycleLength)
cycleLength d = fn 1 []
where
fn ... | samidarko/euler | problem026.hs | mit | 501 | 0 | 14 | 113 | 205 | 114 | 91 | 11 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.