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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# Language OverloadedStrings, ExtendedDefaultRules #-}
import Shelly
-- This test runs, but causes this error to show up:
-- Exception: cannot access an inherited pipe
main = shelly $
runHandles "bash" ["examples/test.sh"] handles doNothing
where handles = [InHandle Inherit, OutHandle Inherit, ErrorHandle Inherit... | adinapoli/Shelly.hs | test/examples/run-handles.hs | bsd-3-clause | 358 | 0 | 8 | 62 | 68 | 36 | 32 | 6 | 1 |
{-# LANGUAGE CPP, NondecreasingIndentation, TupleSections #-}
{-# OPTIONS -fno-warn-incomplete-patterns -optc-DNON_POSIX_SOURCE #-}
-----------------------------------------------------------------------------
--
-- GHC Driver program
--
-- (c) The University of Glasgow 2005
--
----------------------------------------... | elieux/ghc | ghc/Main.hs | bsd-3-clause | 35,956 | 0 | 27 | 10,081 | 7,356 | 3,790 | 3,566 | 566 | 15 |
module Data.Store.Db
(Db, withDb, lookup, transaction, store)
where
import Data.ByteString (ByteString)
import Data.Foldable (traverse_)
import Data.Store.Guid (Guid)
import Data.Store.Transaction (Store(..))
import Prelude hiding (lookup)
import qualified Control.Exception as Exc
import qualified Data.Store.Guid ... | sinelaw/lamdu | bottlelib/Data/Store/Db.hs | gpl-3.0 | 1,409 | 0 | 10 | 243 | 492 | 269 | 223 | 36 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-redshift/gen/Network/AWS/Redshift/DisableSnapshotCopy.hs | mpl-2.0 | 3,838 | 0 | 9 | 774 | 426 | 262 | 164 | 54 | 1 |
{-# LANGUAGE EmptyDataDecls, TypeFamilies, UndecidableInstances,
ScopedTypeVariables, TypeOperators,
FlexibleInstances, NoMonomorphismRestriction,
MultiParamTypeClasses, FlexibleContexts #-}
module IndTypesPerfMerge where
data a :* b = a :* b
infixr 6 :*
data TRUE
data FALSE
dat... | sdiehl/ghc | testsuite/tests/indexed-types/should_compile/IndTypesPerfMerge.hs | bsd-3-clause | 5,135 | 0 | 12 | 1,286 | 1,697 | 905 | 792 | -1 | -1 |
module HsFreeNames where
-------------------------------------------------------------------------------
-- This module implements free name analysis for Haskell.
-- Under construction!!!
-- We are not yet faithfully dealing with qualified vs. unqualified names.
-- Same holds for module level analysis.
-------------... | forste/haReFork | StrategyLib-4.0-beta/examples/haskell/HsFreeNames.hs | bsd-3-clause | 3,824 | 0 | 18 | 1,067 | 1,184 | 637 | 547 | -1 | -1 |
-------------------------------------------------------------------------------
-- |
-- Module : System.Hardware.Haskino.SamplePrograms.Strong.ScheduledLCD
-- Copyright : (c) University of Kansas
-- License : BSD3
-- Stability : experimental
--
-- Creates a scheduled task on the Arduino which alternate... | ku-fpg/kansas-amber | legacy/Shallow/ScheduledLCD.hs | bsd-3-clause | 2,008 | 0 | 10 | 607 | 292 | 158 | 134 | 34 | 1 |
{-# OPTIONS_HADDOCK hide #-}
-- #hide
#if __GLASGOW_HASKELL__ >= 701
{-# LANGUAGE Safe #-}
#endif
module Text.XHtml.Strict.Elements where
import Text.XHtml.Internals
-- * Elements in XHTML Strict
abbr :: Html -> Html
acronym :: Html -> Html
address :: Html -> Html
anchor ... | DavidAlphaFox/ghc | libraries/xhtml/Text/XHtml/Strict/Elements.hs | bsd-3-clause | 5,583 | 0 | 5 | 2,987 | 1,297 | 693 | 604 | 157 | 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">
<!-- title -->
<title>Logisim - Help</title>
<!-- maps -->
<maps>
... | aaorellana/Logisim-SeniorProject | src/main/resources/doc/support/base-doc.hs | gpl-3.0 | 2,150 | 143 | 87 | 443 | 751 | 378 | 373 | -1 | -1 |
module Sort where
--insert :: Ord a => a -> [a] -> [a]
insert x [] = [x]
insert x (y:ys) = if x<=y
then x:y:ys
else y:insert x ys
--sort :: Ord a => [a] -> [a]
sort [] = []
sort (x:xs) = insert x (sort xs)
isort xs = foldr insert [] xs
| forste/haReFork | tools/hs2alfa/tests/Sort.hs | bsd-3-clause | 247 | 4 | 7 | 67 | 126 | 66 | 60 | 8 | 2 |
{-# LANGUAGE RankNTypes #-}
module T14488 where
type Lens' s a = forall f. Functor f => (a -> f a) -> s -> f s
data T a = MkT { _tfield :: Eq a => a }
tfield :: Eq a => Lens' (T a) a
tfield f t = MkT <$> f (_tfield t)
| shlevy/ghc | testsuite/tests/typecheck/should_compile/T14488.hs | bsd-3-clause | 222 | 0 | 10 | 61 | 115 | 61 | 54 | 6 | 1 |
-- {-# LANGUAGE DeriveGeneric, OverloadedStrings #-}
module State
( State(..)
, verboseEnabled
, debugEnabled
, sandboxEnabled
) where
import Config (Settings(..))
import Identity (Identity)
import Args (Options(..))
data State = State { settings :: Settings
, identity :: Identity
... | dxtr/dnsimple | src/State.hs | isc | 745 | 0 | 10 | 184 | 236 | 130 | 106 | 18 | 1 |
{-------------------------------------------------------------------------------
Consider the infinite polynomial series AF(x) = xF1 + x²F₂ + x³F₃ + ..., where
F_k is the kth term in the Fibonacci sequence: 1, 1, 2, 3, 5, 8, ... ; that is,
F_k = F_k−1 + F_k−2, F_1 = 1 and F_2 = 1.
For this problem we shall be interes... | dpieroux/euler | 0137c.hs | mit | 2,195 | 0 | 14 | 555 | 160 | 85 | 75 | 10 | 1 |
module System.Log.GratteLogger (
configureLogger
, LoggerSettings(..)
, logMsgIO
, LogLevel(..)
) where
import System.Log.Logger
import System.Log.Handler.Simple
import System.Log.Handler (setFormatter)
import System.Log.Formatter
import System.IO
im... | ostapneko/gratte-papier | src/System/Log/GratteLogger.hs | mit | 1,952 | 0 | 14 | 544 | 465 | 252 | 213 | 55 | 8 |
import Hamu8080.Types (mkComputer)
import Hamu8080.Compute (runComputer, loadProgram)
-- Emulate an 8080 Intel processor for the following usage:
-- 1. Write program as a list of bytes (yes, pure machine code
-- programming!)
-- 2. Create a computer (CPU & Memory)
-- 3. Load program into memory
-- 4. Run computer e... | cbaatz/hamu8080 | src/Main.hs | mit | 583 | 0 | 11 | 113 | 98 | 55 | 43 | 8 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE DeriveFunctor #-}
--
-- Play around with adjunctions and monads
--
-- Functor composition is a functor
newtype FComp f g x = FComp { unFComp :: f (g x) }
instance (Functor f, Functor g) => Functor (FComp f... | shouya/thinking-dumps | cat-code/Adjunction.hs | mit | 2,688 | 0 | 13 | 660 | 1,105 | 582 | 523 | 54 | 1 |
module Day13Spec (spec) where
import Day13
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "stepsToReach" $ do
it "takes 11 steps to reach (7, 4) with seed 10" $ do
stepsToReach 10 (7, 4) `shouldBe` 11
describe "day13" $ do
it "takes 86 steps to r... | brianshourd/adventOfCode2016 | test/Day13Spec.hs | mit | 681 | 0 | 15 | 208 | 183 | 88 | 95 | 19 | 1 |
module ChatCore.Util.Parsec where
import Control.Applicative ((<$>))
import qualified Data.Text as T
import Text.Parsec
import Text.Parsec.ByteString
-- | Reads characters into a Text until the given character is read.
charsUntil :: Char -> Parser T.Text
charsUntil stop = T.pack <$> charsUntilStr stop
-- | Reads ch... | Forkk/ChatCore | ChatCore/Util/Parsec.hs | mit | 738 | 0 | 16 | 187 | 155 | 88 | 67 | 14 | 2 |
-- | Data.TSTP.BinOp module
{-# LANGUAGE UnicodeSyntax #-}
module Data.TSTP.BinOp where
-- | Binary formula connectives.
data BinOp = (:<=>:) -- ^ ↔ /Equivalence/
| (:=>:) -- ^ → /Implication/
| (:<=:) -- ^ ← /Reverse Implication/
| (:&:) -- ^ ∧ /AND/
| (... | agomezl/tstp2agda | src/Data/TSTP/BinOp.hs | mit | 709 | 16 | 6 | 248 | 170 | 110 | 60 | 20 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ViewPatterns #-}
module Data.FingerTree.Internal
( module Data.Foldable
, module Data.Monoid
, Elem (..)
, Prio (..)
, Key (..)
, Measured (..)
, Deque (..)
, foldMapDeque
, Unfoldable (..)
, MinView (..)
, MaxView (..)
) where
impo... | meimisaki/FingerTree | Data/FingerTree/Internal.hs | mit | 2,555 | 0 | 11 | 713 | 1,134 | 596 | 538 | 82 | 1 |
{-# LANGUAGE RecordWildCards #-}
module Hogldev.Texture (
Texture(..)
, textureBind
, textureLoad
) where
import Graphics.Rendering.OpenGL hiding (Texture)
import Graphics.GLUtil (readTexture)
data Texture = Texture
{ textureObject :: !TextureObject
, textureT... | triplepointfive/hogldev | common/Hogldev/Texture.hs | mit | 1,078 | 0 | 13 | 273 | 304 | 155 | 149 | 30 | 1 |
module Main where
import Control.Monad (void)
import Options.Applicative ((<>))
import qualified Options.Applicative as O
import Language.Janus.AST
import Language.Janus.Interp
import Language.Janus.Parser
import Language.Janus.Stdlib
data Argu... | mkaput/janus | runner/Main.hs | mit | 854 | 0 | 15 | 225 | 276 | 145 | 131 | 22 | 2 |
{-# OPTIONS_GHC -F -pgmF htfpp #-}
module InternalTests.GraphTests where
import GraphDB.Util.Prelude
import Test.Framework hiding (frequency, oneof, listOf, elements, choose)
import Test.QuickCheck.Monadic
import Test.QuickCheck.Instances ()
import QuickCheck.GenT
import GraphDB.Graph
import qualified GraphDB.Util.DIO... | nikita-volkov/graph-db | executables/InternalTests/GraphTests.hs | mit | 5,562 | 0 | 18 | 1,340 | 1,816 | 878 | 938 | -1 | -1 |
{- |
Boards are what you see when you play the game. A board can do anything a
vector can do since it's just a collection of them. In the game, you can
shift the board in four different directions. To achieve that, rotate the
board first, then shift it.
-}
module Threase.Board
( Board (..)
, can... | tfausak/threase | library/Threase/Board.hs | mit | 3,973 | 0 | 12 | 1,075 | 616 | 341 | 275 | 51 | 2 |
{-
- Types.hs
- By Steven Smith
-}
-- | This module contains the AutoStorable types. They are essentially
-- special-purpose product and sum types. If you can make your data type into
-- some combination of these types and each component is an instance of
-- 'Storable', then you can use the AutoStorable functions t... | stevely/AutoStorable | src/Foreign/AutoStorable/Types.hs | mit | 14,650 | 0 | 15 | 5,329 | 6,353 | 3,103 | 3,250 | 370 | 1 |
module Main where
import Parser
import Data.Maybe (fromMaybe)
inputParser :: Parser String
inputParser =
concat <$> (parseMany $
parseEither textParser repeaterParser)
inputParser' :: Parser Integer
inputParser' =
sum <$> (parseMany $
parseEither textParser' repeaterParser')
textParser :: Parser St... | CarstenKoenig/AdventOfCode2016 | Day9/Main.hs | mit | 1,338 | 0 | 11 | 297 | 459 | 225 | 234 | 52 | 2 |
{-# LANGUAGE MultiParamTypeClasses #-}
module Diffie_Hellman.Quiz
( make
, Param (..)
, Config (..)
)
where
import Diffie_Hellman.Param
import Diffie_Hellman.Config
import Diffie_Hellman.Break hiding ( make )
import Prime.Check
import Autolib.Util.Zufall
import Autolib.Util.Seed
import Inter.Types
import Inter.... | Erdwolf/autotool-bonn | src/Diffie_Hellman/Quiz.hs | gpl-2.0 | 1,223 | 0 | 14 | 458 | 347 | 193 | 154 | 32 | 1 |
module Main where
import Game
import Loop
import Init
-- | Location of default game
exampleFile :: String
exampleFile = "games/example.exp"
-- | Opens a game file and either starts the game or reports an error.
main :: IO ()
main = do
putStrLn "What game file would you like to play?"
putStrLn "Games in the ... | emhoracek/explora | executable/Main.hs | gpl-2.0 | 654 | 0 | 10 | 152 | 131 | 63 | 68 | 17 | 2 |
{-# LANGUAGE TemplateHaskell #-}
module Tic.GameState where
import Control.Lens (makeClassy)
import Tic.Level
import Tic.Location
import Tic.Score
import Tic.UnitType
import Wrench.Time
data GameState = GameState {
_gsCurrentLevel :: Level
, _gsTim... | pmiddend/tic | lib/Tic/GameState.hs | gpl-3.0 | 491 | 0 | 10 | 146 | 99 | 59 | 40 | 15 | 0 |
import Development.Hake
import Development.Hake.FunSetIO
main = hake [
file [ "program" ] [ "main.o", "iodat.o", "dorun.o", "lo.o", "./usr/fred/lib/crtn.a" ] $
const $ rawSystemE [ "cc", "-o", "program", "main.o", "iodat.o", "dorun.o", "lo.o", "./usr/fred/lib/crtn.a" ]
,
file [ "main.o" ] [ "main.c" ] $ const $... | YoshikuniJujo/hake_haskell | examples/nutshell/chap1/1/hakeMainIO.hs | gpl-3.0 | 694 | 0 | 10 | 133 | 248 | 142 | 106 | 10 | 1 |
module Helpers where
import Data.List
import Data.Array
import System.Random
import qualified Data.Vector as V
partialSum :: Array Int Float -> Int -> [Int] -> Int -> Float
partialSum cosList q xs x =
let q' = q `div` 2
getIndex = \ind -> let ind' = ind `mod` q in if ind' > q' then abs (ind' - q) else i... | GOGEN/HashingCollizion | src/Utils/Helpers.hs | gpl-3.0 | 2,782 | 53 | 15 | 776 | 1,436 | 761 | 675 | 62 | 3 |
--------------------------------------------------------------------------------
{- |
Module : Math.Util
Description : Utility functions for the matrix package.
License : GPL-3
Maintainer : jackhiggins07@gmail.com
Stability : Stable
Portability : Portable
-}
-----------------------------------------... | Jiggins/Matrix | Math/Util.hs | gpl-3.0 | 859 | 0 | 9 | 164 | 139 | 81 | 58 | 7 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/AdClients/Get.hs | mpl-2.0 | 3,404 | 0 | 14 | 734 | 384 | 232 | 152 | 64 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Bidders/Accounts/FilterSets/FilteredBids/List.hs | mpl-2.0 | 7,463 | 0 | 18 | 1,557 | 891 | 520 | 371 | 135 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/Get.hs | mpl-2.0 | 2,962 | 0 | 14 | 712 | 381 | 229 | 152 | 61 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-run/gen/Network/Google/Resource/Run/Projects/Locations/Routes/Get.hs | mpl-2.0 | 4,765 | 0 | 15 | 1,049 | 697 | 408 | 289 | 101 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE ConstraintKinds ... | haroldcarr/learn-haskell-coq-ml-etc | haskell/conference/2017-09-cufp-effects/src/Tutorial3_Orig.hs | unlicense | 9,898 | 0 | 12 | 2,404 | 1,408 | 732 | 676 | 83 | 3 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Lib
( scottyMain
)
where
import Data.Aeson (FromJSON, ToJSON)
import Data.Monoid (mconcat)
import GHC.Generics
import Web.Scotty
data User = User { userId :: Int, userName :: String } deriving (Eq,... | haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/web/scotty/2015-08-20-utah-haskell/src/Lib.hs | unlicense | 1,031 | 0 | 15 | 279 | 294 | 151 | 143 | 27 | 1 |
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
-- {-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGU... | haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/type-level/2018-02-andres-loh-type-level-and-generic/src/HC2.hs | unlicense | 10,850 | 7 | 12 | 3,165 | 4,134 | 2,247 | 1,887 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
module Sprockell where
import Data.Bits
import Data.Maybe
import Debug.Trace
import BasicFunctions
import HardwareTypes
{-------------------------------------------------------------
| SPROCKELL: Simple PROCessor in hasKELL :-)
|
| Initial definition: October 2012, Jan Kuper (j.kupe... | wouwouwou/2017_module_8 | src/haskell/PP-project-2016/lib/sprockell/Sprockell.hs | apache-2.0 | 12,154 | 0 | 12 | 4,420 | 2,262 | 1,297 | 965 | 132 | 28 |
{-
Copyright 2019 The CodeWorld Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicab... | pranjaltale16/codeworld | codeworld-compiler/test/testcase/test_simulation/source.hs | apache-2.0 | 754 | 0 | 8 | 152 | 93 | 53 | 40 | 3 | 1 |
{-| Tags
This module holds all the tag interpretation done by htools.
-}
{-
Copyright (C) 2014 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must reta... | dimara/ganeti | src/Ganeti/HTools/Tags.hs | bsd-2-clause | 5,092 | 0 | 13 | 815 | 706 | 409 | 297 | 64 | 1 |
{-# LANGUAGE TemplateHaskell, QuasiQuotes #-}
module Settings.StaticFiles where
import Yesod.Static (staticFiles, StaticRoute (StaticRoute))
-- | This generates easy references to files in the static directory at compile time.
-- The upside to this is that you have compile-time verification that referenced files
--... | cutsea110/tut | Settings/StaticFiles.hs | bsd-2-clause | 510 | 0 | 7 | 81 | 38 | 24 | 14 | 4 | 0 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-| Unittests for ganeti-htools.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following condit... | grnet/snf-ganeti | test/hs/Test/Ganeti/OpCodes.hs | bsd-2-clause | 35,183 | 0 | 56 | 10,745 | 5,974 | 3,016 | 2,958 | 597 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module SmplUnif where
import Control.Applicative
import Control.Monad
import ... | kyagrd/hs-nipkow-lics93 | src/SmplUnif.hs | bsd-2-clause | 7,230 | 0 | 19 | 2,593 | 3,111 | 1,608 | 1,503 | 125 | 5 |
module Main where
import ParserTest
import Test.DocTest
import Data.List
import System.Directory
import System.FilePath
import Control.Monad
main :: IO ()
main = getHaskellSourceFiles >>= doctest
getHaskellSourceFiles :: IO [FilePath]
getHaskellSourceFil... | AlphaMarc/WYAH | test/Spec.hs | bsd-3-clause | 811 | 0 | 12 | 253 | 230 | 123 | 107 | 18 | 1 |
module Yhc.Core.Firstify.Super(super) where
import Yhc.Core hiding (uniqueBoundVarsCore, uniqueBoundVars)
import Yhc.Core.FreeVar3
import Yhc.Core.UniqueId
import Yhc.Core.Util
import Yhc.Core.Firstify.Mitchell.Template
import Yhc.Core.Firstify.Mitchell.Terminate
import qualified Yhc.Core.Firstify.Mitchell.BiMap as ... | ndmitchell/firstify | Yhc/Core/Firstify/Super.hs | bsd-3-clause | 11,180 | 0 | 22 | 4,073 | 1,501 | 771 | 730 | 91 | 5 |
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-}
-- | This module re-exports the @Github.Data.Definitions@ module, adding
-- instances of @FromJSON@ to it. If you wish to use the data without the
-- instances, use the @Github.Data.Definitions@ module instead.
module Github.Data (module Github.Data.Definitions) ... | thoughtbot/github | Github/Data.hs | bsd-3-clause | 24,255 | 10 | 59 | 8,315 | 6,603 | 3,288 | 3,315 | 635 | 2 |
module HPath.Path
( Path(..)
, parse
, url
) where
import Data.List
import qualified Text.ParserCombinators.Parsec (parse)
import Text.ParserCombinators.Parsec hiding (parse)
import Text.ParserCombinators.Parsec.Char
import HPath.Parser.Lower
data Path = Path [String] String String
d... | solidsnack/hpath | HPath/Path.hs | bsd-3-clause | 1,017 | 0 | 15 | 341 | 329 | 176 | 153 | -1 | -1 |
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# LANGUAGE FlexibleContexts, FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE OverloadedStrings, DisambiguateRecordFie... | pepeiborra/bytestring-xml | Test.hs | bsd-3-clause | 7,220 | 1 | 21 | 1,738 | 2,661 | 1,345 | 1,316 | 145 | 2 |
{-# LANGUAGE TemplateHaskell #-}
module Server.ClientFrameT where
import Control.Lens (makeLenses)
import qualified Data.Vector.Storable as SV
import Data.Word (Word8)
import qualified Constants
import Game.PlayerStateT
import Types
makeLenses ''ClientFrameT... | ksaveljev/hake-2 | src/Server/ClientFrameT.hs | bsd-3-clause | 599 | 0 | 10 | 160 | 122 | 76 | 46 | 17 | 1 |
{-|
Module: Data.Astro.Planet
Description: Planet calculations
Copyright: Alexander Ignatyev, 2016
Planet calculations.
= Example
=== /Initialisation/
@
import Data.Astro.Time.JulianDate
import Data.Astro.Coordinate
import Data.Astro.Types
import Data.Astro.Effects
import Data.Astro.CelestialObject.RiseSet
import D... | Alexander-Ignatyev/astro | src/Data/Astro/Planet.hs | bsd-3-clause | 2,526 | 0 | 5 | 312 | 98 | 65 | 33 | 16 | 0 |
import Codec.Picture
import Codec.Picture.Gif
import ImageOutput
import System.IO
main :: IO()
main = createGifColor =<< sequence[readImage ("./out/frame"++ show i ++".png") >>= decode | i <- [1..10]]
decode :: Either String DynamicImage -> IO (Image PixelRGB8)
decode (Right (I... | veniversum/fractal-haskell | src/imagesToGif.hs | bsd-3-clause | 352 | 0 | 13 | 84 | 125 | 64 | 61 | 8 | 1 |
-- 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. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
{-# LANGUAGE GADT... | rfranek/duckling | Duckling/PhoneNumber/Rules.hs | bsd-3-clause | 1,886 | 0 | 19 | 414 | 334 | 199 | 135 | 35 | 2 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE Trustworthy #-}
-- |
-- Module : Crypto.Hash.SHA256
-- License : BSD-3
-- Maintainer : Herbert Valerio Riedel <hvr@gnu.org>
-- Stability : stable
--
-- A module containing <https://en.wikipedia.org/wiki/SHA-2 SHA-256> bindings
--
module Crypto.Hash.SHA256
(
... | hvr/cryptohash-sha256 | src/Crypto/Hash/SHA256.hs | bsd-3-clause | 12,486 | 0 | 19 | 2,934 | 2,637 | 1,408 | 1,229 | 179 | 2 |
module TypedWorkPushing where
import Control.Monad
import Control.Distributed.Process
import Control.Distributed.Process.Closure
import PrimeFactors
slave :: SendPort Integer -> ReceivePort Integer -> Process ()
slave results todo = forever $ do
n <- receiveChan todo
sendChan results (numPrimeFactors n)
sdictInt... | haskell-distributed/distributed-process-demos | src/TypedWorkPushing/TypedWorkPushing.hs | bsd-3-clause | 1,160 | 0 | 15 | 232 | 377 | 190 | 187 | -1 | -1 |
{-# OPTIONS_HADDOCK hide #-}
{-# LANGUAGE ExistentialQuantification #-}
-- |
-- Module : Network.TLS.Cipher
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
module Network.TLS.Cipher
( CipherKeyExchangeType(..)
, Bulk(... | AaronFriel/hs-tls | core/Network/TLS/Cipher.hs | bsd-3-clause | 4,850 | 0 | 11 | 1,093 | 1,068 | 600 | 468 | 118 | 3 |
module Example where
import MAlonzo.Code.Example
rev :: [a] -> [a]
rev = rev' () ()
safeHead :: [a] -> Maybe a
safeHead = safeHead' () ()
| notogawa/agda-haskell-example | src/Example.hs | bsd-3-clause | 141 | 0 | 6 | 29 | 68 | 38 | 30 | 6 | 1 |
module EqUni where
import Uni (Uni(Uni))
instance Eq Uni where
Uni == Uni = True | phischu/fragnix | tests/quick/ImplicitInstances/EqUni.hs | bsd-3-clause | 86 | 0 | 6 | 20 | 35 | 20 | 15 | 4 | 0 |
{-# LINE 1 "System.Environment.hs" #-}
{-# LANGUAGE Safe #-}
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : System.Environment
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-... | phischu/fragnix | builtins/base/System.Environment.hs | bsd-3-clause | 8,505 | 0 | 15 | 2,074 | 1,640 | 871 | 769 | 130 | 3 |
{-- snippet main --}
import GHC.Conc (numCapabilities)
import System.Environment (getArgs)
main = do
args <- getArgs
putStrLn $ "command line arguments: " ++ show args
putStrLn $ "number of cores: " ++ show numCapabilities
{-- /snippet main --}
| binesiyu/ifl | examples/ch24/NumCapabilities.hs | mit | 252 | 0 | 8 | 45 | 63 | 32 | 31 | 6 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Database.Persist.Sql.Orphan.PersistStore
( withRawQuery
, BackendKey(..)
, toSqlKey
, fromSqlKey
, ... | yesodweb/persistent | persistent/Database/Persist/Sql/Orphan/PersistStore.hs | mit | 15,614 | 0 | 33 | 5,243 | 4,180 | 2,102 | 2,078 | -1 | -1 |
-- C->Haskell Compiler: Marshalling library
--
-- Copyright (c) [1999...2005] Manuel M T Chakravarty
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- 1. Redistributions of source code must retain the above... | jrockway/c2hs | C2HS.hs | gpl-2.0 | 9,434 | 0 | 12 | 1,932 | 1,384 | 778 | 606 | 87 | 2 |
{-#LANGUAGE ScopedTypeVariables, InstanceSigs, ExplicitForAll, TypeSynonymInstances, UndecidableInstances, FlexibleInstances, MultiParamTypeClasses, GADTs, DataKinds, PolyKinds, TypeOperators, ViewPatterns, PatternSynonyms, RankNTypes, FlexibleContexts, AutoDeriveTypeable #-}
module Carnap.Core.Examples.ACUI (
V, ... | opentower/carnap | Carnap/src/Carnap/Core/Examples/ACUI.hs | gpl-3.0 | 8,137 | 0 | 12 | 2,491 | 2,592 | 1,314 | 1,278 | 170 | 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-swf/gen/Network/AWS/SWF/PollForDecisionTask.hs | mpl-2.0 | 14,096 | 0 | 18 | 2,899 | 1,633 | 993 | 640 | 183 | 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-glacier/gen/Network/AWS/Glacier/ListMultipartUploads.hs | mpl-2.0 | 8,381 | 0 | 14 | 1,582 | 906 | 556 | 350 | 104 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Carbon.Aggregator.Processor (
BuffersManager
, newBuffersManager
, newBuffersManagerIO
, proce... | ratsam/hs-carbon-aggregator | src/library/Carbon/Aggregator/Processor.hs | apache-2.0 | 3,117 | 0 | 13 | 794 | 805 | 429 | 376 | 55 | 2 |
module Util.String (padTo) where
padTo :: String -> Int -> String
padTo s n | length s < n = take n $ s ++ repeat ' '
| otherwise = s
| tmhedberg/hsenv | src/Util/String.hs | bsd-3-clause | 148 | 0 | 9 | 46 | 70 | 34 | 36 | 4 | 1 |
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
module Vimus.Key (
keyNames
, ExpandKeyError (..)
, expandKeys
, unExpandKeys
, keyEsc
, keyTab
, ctrlA
, ctrlB
, ctrlC
, ctrlD
, ctrlE
, ctrlF
, ctrlG
, ctrlH
, ctrlI
, ctrlJ
, ctrlK
, ctrlL
, ctrlM
, ctrlN
, ctrlO
, ctrlP
, ctrlQ
, ctrlR
, ctrlS
, ctrlT
, ctrlU
, ctr... | vimus/vimus | src/Vimus/Key.hs | mit | 4,747 | 0 | 14 | 1,338 | 1,275 | 702 | 573 | 150 | 8 |
f arr = sum([x | x <- arr, odd x])
main = do
inputdata <- getContents
putStrLn $ show $ f $ map (read :: String -> Int) $ lines inputdata
| EdisonAlgorithms/HackerRank | practice/fp/intro/fp-sum-of-odd-elements/fp-sum-of-odd-elements.hs | mit | 145 | 0 | 11 | 38 | 80 | 39 | 41 | 4 | 1 |
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2015 Galois, Inc.
-- License : BSD3
-- Maintainer : cryptol@galois.com
-- Stability : provisional
-- Portability : portable
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE PatternGuards #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module REPL.Haskeline where... | iblumenfeld/cryptol | cryptol/REPL/Haskeline.hs | bsd-3-clause | 8,090 | 0 | 21 | 2,022 | 2,162 | 1,110 | 1,052 | 159 | 8 |
{-# LANGUAGE RankNTypes #-}
module Mini where
data Type t = Int | TVar t | Fun (Type t) (Type t) | Forall (t -> Type t)
newtype CType = CType { unCType :: forall t. Type t }
konstTy = Forall (\a -> Forall (\b -> Fun (TVar a) (Fun (TVar b) (TVar a))))
t1 = let Forall f = konstTy in Forall (\a -> subst' a Int (f a))... | bixuanzju/fcore | lib/Mini.hs | bsd-2-clause | 1,498 | 0 | 15 | 413 | 824 | 412 | 412 | 29 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE DeriveGeneric #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Complex
-- Copyright : (c) The University of Glasgow 2001
-- License : BS... | urbanslug/ghc | libraries/base/Data/Complex.hs | bsd-3-clause | 7,633 | 2 | 14 | 2,714 | 2,379 | 1,255 | 1,124 | 139 | 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="bs-BA">
<title>MacOS WebDrivers</title>
<maps>
<homeID>top</homeID>
<mapref location="m... | thc202/zap-extensions | addOns/webdrivers/webdrivermacos/src/main/javahelp/org/zaproxy/zap/extension/webdrivermacos/resources/help_bs_BA/helpset_bs_BA.hs | apache-2.0 | 961 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -1 |
{-|
Module : Idris.Docstrings
Description : Wrapper around Markdown library.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE DeriveFunctor, DeriveGeneric, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module Idris.Docstrings (
Docstring(..), Block(... | ben-schulz/Idris-dev | src/Idris/Docstrings.hs | bsd-3-clause | 14,535 | 0 | 14 | 4,157 | 4,728 | 2,383 | 2,345 | 229 | 17 |
module PropSyntaxStruct (module PropSyntaxStruct,module P) where
import BaseSyntax as P
import HsPropStruct as P
import HsPropMaps as P
import HsPropPretty
import HasBaseStruct
import HasPropStruct
import NameMaps
import PrettyPrint
import HsDeclPretty(ppContext)
import SrcLoc
import MUtils
import MapDeclM
import Rec... | forste/haReFork | tools/property/syntax/PropSyntaxStruct.hs | bsd-3-clause | 2,034 | 0 | 9 | 390 | 859 | 453 | 406 | -1 | -1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE Dat... | frantisekfarka/ghc-dsi | libraries/base/Data/Type/Equality.hs | bsd-3-clause | 10,351 | 21 | 34 | 2,565 | 3,370 | 1,939 | 1,431 | 131 | 1 |
{-# LANGUAGE DeriveAnyClass #-}
module T12144_2 where
class C1 a
instance C1 a => C1 (Foo a)
class C1 a => C2 a where
c2 :: a -> String
c2 _ = "C2 default"
newtype Foo a = Foo a deriving C2
foo :: C1 a => Foo a -> String
foo = c2
| shlevy/ghc | testsuite/tests/deriving/should_compile/T12144_2.hs | bsd-3-clause | 239 | 0 | 7 | 63 | 101 | 52 | 49 | -1 | -1 |
module T11208 where
import qualified Prelude as P
f n = n P.+ 1
g h (P.Just x) = P.Just (h x)
g _ P.Nothing = P.Nothing
| ezyang/ghc | testsuite/tests/ghci/scripts/T11208.hs | bsd-3-clause | 124 | 0 | 8 | 31 | 67 | 36 | 31 | 5 | 1 |
import System.IO (hFlush, stdout)
import System.Environment (getArgs)
import Control.Monad (mapM)
import Control.Monad.Error (runErrorT)
import Control.Monad.Trans (liftIO)
import qualified Data.Map as Map
import qualified Data.Traversable as DT
import Readline (readline, load_history)
import Types
import Reader (read... | alphaKAI/mal | haskell/step7_quote.hs | mpl-2.0 | 6,419 | 0 | 21 | 2,141 | 2,439 | 1,204 | 1,235 | 156 | 13 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK show-extensions #-}
------------------------------------------------------------------------
-- |
-- Module : Yeast.Render
-- Copyright : (c) 2015-2016 Stevan Andjelkovic
-- License : ISC (see the file LICENSE)
-- Maintainer : Stevan Andjelkovic
-... | stevana/yeast | src/Yeast/Render.hs | isc | 5,174 | 0 | 23 | 1,720 | 1,400 | 769 | 631 | -1 | -1 |
module RandomGolf where
import Control.Arrow (first)
import System.Random (Random, randoms, getStdRandom, split)
randomsIO_golfed :: Random a => IO [a]
randomsIO_golfed = getStdRandom (first randoms . split)
| pauldoo/scratch | RealWorldHaskell/ch15/RandomGolf.hs | isc | 211 | 0 | 8 | 29 | 69 | 39 | 30 | 5 | 1 |
module Main where
import Loans
import Sim
main ::IO ()
main = putStrLn $ show $ defaultPaydown sampleMortgage
| ohbadiah/loan-repayment | Main.hs | mit | 112 | 0 | 6 | 20 | 36 | 20 | 16 | 5 | 1 |
{-# LANGUAGE TemplateHaskell, OverloadedStrings, BangPatterns #-}
-- | A 'HashString' represents a string, annotated with its hash. This allows
-- us to avoid frequent rehashing.
--
-- The recommended way of creating a 'HashString' is either statically, using
-- quasiquotes:
--
-- > [hashed|hello, world!|] -- G... | bfops/Chess | src/Data/HashString.hs | mit | 4,281 | 0 | 9 | 1,185 | 506 | 301 | 205 | 51 | 1 |
import qualified Data.Set as S
import Helpers (stringToIntList)
import Data.Numbers.Primes (primeFactors)
fn :: [(Integer, Integer)] -> (Integer, Integer) -> [(Integer, Integer)]
fn acc (n, d) = let a = S.fromList $ stringToIntList $ show n
b = S.fromList $ stringToIntList $ show d
... | samidarko/euler | problem033.hs | mit | 1,313 | 0 | 15 | 508 | 444 | 240 | 204 | 21 | 3 |
module ProjectEuler.Problem52
( problem
) where
import Data.List
import ProjectEuler.Types
problem :: Problem
problem = pureProblem 52 Solved result
allEqual :: (Eq e) => [e] -> Bool
allEqual (x:xs) = all (== x) xs
allEqual [] = True
isPermNum :: Int -> Bool
isPermNum n = allEqual $ map (sort . show . (* n') ) ... | Javran/Project-Euler | src/ProjectEuler/Problem52.hs | mit | 527 | 0 | 9 | 117 | 204 | 111 | 93 | 16 | 1 |
module Salesman.OptionTypes
( Command(..)
, Common(..)
, Options(..)
) where
data Command
= Install [String]
| Check
| Upgrade
| Remove [String]
| List
deriving (Show)
data Common = Common
{ optProperties :: FilePath
} deriving (Show)
data Options = Options
{ optCo... | thomasdziedzic/salesman | src/Salesman/OptionTypes.hs | mit | 385 | 0 | 8 | 115 | 115 | 72 | 43 | 18 | 0 |
module Rocketfuel.Commands (
runCommand,
updateContext
) where
import Control.Monad.Random
import Rocketfuel.Types
import Rocketfuel.Grid
updateContext :: Maybe Command -> (GameContext, StdGen) -> (GameContext, StdGen)
updateContext command (context, generator) =
let contextAfterCommand = runCommand co... | Raveline/Rocketfuel | src/Rocketfuel/Commands.hs | mit | 1,105 | 0 | 11 | 287 | 366 | 196 | 170 | 24 | 2 |
module Classifier.LU
( lu,luSolve
) where
import Data.List
lu :: [[Double]] -> ([[Double]], [[Double]])
lu a = reclu a ([], map (\x->[]) [1..(length a)])
reclu :: [[Double]] -> ([[Double]],[[Double]]) -> ([[Double]], [[Double]])
reclu [] (l, ut) = (l, transpose ut)
reclu (ai:arst) (l, ut) = reclu arst (l++[n... | Yukits/classyou | src/Classifier/LU.hs | mit | 1,712 | 0 | 13 | 683 | 906 | 509 | 397 | 30 | 1 |
module Cook.Catalog.Debian.Apt
( aptGet
, addAptRepository
, updatePackages
, upgradePackages
, clearPackagesCache
, installPackages
, provider
) where
import Data.List (last)
import Data.List.NonEmpty hiding (last)
import Data.Semigroup
import qualified Data.Text.Lazy as T
import Cook.Recipe
import ... | jimenezrick/cook.hs | src/Cook/Catalog/Debian/Apt.hs | mit | 2,102 | 0 | 15 | 425 | 547 | 291 | 256 | 51 | 2 |
module Colors where
import Types
red :: RGB
red = RGB 255 0 0
green :: RGB
green = RGB 0 255 0
blue :: RGB
blue = RGB 0 0 255
white :: RGB
white = RGB 255 255 255
black :: RGB
black = RGB 0 0 0
basicColors :: [RGB]
basicColors = [red, green, blue, white, black]
| Axmill/riverrun | src/RGB/Colors.hs | mit | 268 | 0 | 5 | 66 | 120 | 68 | 52 | 14 | 1 |
{-# OPTIONS_GHC -Wall #-}
module LogAnalysis where
import Log
toInt :: String -> Int
toInt = read
parseMessage :: String -> LogMessage
-- Do we need to handle ill-formed? e.g E 20 this is missing timestamp
parseMessage s = f $ words s
where
f ("I":t:zs) = LogMessage Info (toInt t) (unwords zs)
... | bachase/cis194 | hw2/LogAnalysis.hs | mit | 1,512 | 1 | 11 | 351 | 601 | 307 | 294 | 35 | 4 |
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad.State
import Data.Maybe
import Network.URL
import Pipes
import Network.Discord.Types
import Network.Discord.Gateway
data PutStrClient = PsClient
instance Client PutStrClient where
getAuth _ = Bot "TOKEN"
main :: IO ()
main = runWebsocket (fromJust $ importU... | jano017/Discord.hs | examples/putstr.hs | mit | 461 | 0 | 13 | 74 | 145 | 77 | 68 | 15 | 1 |
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-}
module NiceChildProcess (ChildProcess(..), spawn, NiceChildProcessException) where
import Control.Applicative
import Control.Concurrent.Async
import Control.Concurrent.Chan
import Control.Concurrent.MVar
import Control.Exception
import Control.Monad
import Debug.... | CRogers/stack-ide-atom | haskell/src/NiceChildProcess.hs | mit | 2,502 | 0 | 15 | 391 | 761 | 384 | 377 | 65 | 2 |
-- Copyright 2016 Peter Beard
-- Distributed under the GNU GPL v2. For full terms, see the LICENSE file.
--
-- Problem #6
--
-- The sum of the squares of the first ten natural numbers is,
-- 12 + 22 + ... + 102 = 385
--
-- The square of the sum of the first ten natural numbers is,
-- (1 + 2 + ... + 10)2 = 552 = 3025
-... | PeterBeard/project-euler | haskell/src/problem-006.hs | gpl-2.0 | 714 | 0 | 11 | 157 | 85 | 53 | 32 | 2 | 1 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable, MultiParamTypeClasses #-}
module NFA.Compress.Instance where
import NFA.Compress.Data
import Autolib.ToDoc
import Autolib.Reader
import Autolib.Reporter
import qualified Challenger as C
import Data.List ( nub )
import Data.Typeable
data Instance = Instance
... | Erdwolf/autotool-bonn | src/NFA/Compress/Instance.hs | gpl-2.0 | 967 | 9 | 14 | 219 | 320 | 182 | 138 | 27 | 1 |
module Ssh.KeyExchangeAlgorithm (
KeyExchangeAlgorithm (..)
, createKeyData
, makeWord8
) where
import qualified Data.ByteString.Lazy as B
import Data.ByteString.Lazy.Char8 () -- IsString instance for the above
import Data.Word
import Data.Digest.Pure.SHA
import Ssh.Packet
import Ssh.Transport
import S... | bcoppens/HaskellSshClient | src/Ssh/KeyExchangeAlgorithm.hs | gpl-3.0 | 1,156 | 0 | 12 | 180 | 308 | 174 | 134 | 25 | 1 |
import qualified Hbot.MsgParser.Test as MsgParser
import Test.Tasty
import Test.Tasty.QuickCheck as QC
import Test.Tasty.HUnit
main = defaultMain tests
tests = testGroup "All Tests"
[ QC.testProperty "trivial property" $
\x -> (x :: Int) == x
, MsgParser.tests
]
| ljsc/hbot | tests/Test.hs | gpl-3.0 | 284 | 0 | 10 | 58 | 79 | 47 | 32 | 9 | 1 |
--------------------------------------------------------------------------------
-- This file is part of diplomarbeit ("Diplomarbeit Johannes Weiß"). --
-- --
-- diplomarbeit is free software: you can redistribute it and/or modify ... | weissi/diplomarbeit | programs/RAEFun.hs | gpl-3.0 | 3,285 | 0 | 12 | 1,029 | 461 | 259 | 202 | 44 | 1 |
module Main where
import Data.Monoid
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.HUnit
import Text.Interpol
main :: IO ()
main = defaultMainWithOpts
[ testCase "toString" testToString
] mempty
testToString :: Assertion
testToString = do
("I " ^-^ "have " ^-^ "apples") ... | scvalex/interpol | Test/Unit.hs | gpl-3.0 | 547 | 0 | 11 | 124 | 159 | 87 | 72 | 17 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.