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 LiberalTypeSynonyms #-}
{-# LANGUAGE RankNTypes #-}
module Htn where
import qualified Data.Map as M
import Data.List (find, null, (\\))
class (Eq a, Ord a, Show a) => Term a
class (Eq a, Ord a, Show a) => PrimitiveTask a
class (Eq a, Ord a, Show a) => CompoundTask a
data Task a b = Primitive a
... | y-kamiya/ai-samples | src/Htn.hs | bsd-3-clause | 2,970 | 0 | 15 | 1,039 | 1,179 | 622 | 557 | -1 | -1 |
{-# LANGUAGE DefaultSignatures #-}
module Mahjong.Class where
import Foreign.C.Types
-- | Tile describes the properties of a tile.
class Tile a where
suit :: a -> Bool
suit = not . honor
honor :: a -> Bool
simple :: a -> Bool
simple = not . terminal
terminal :: a -> Bool
default terminal :: (Eq a, ... | TakSuyu/mahjong | src/Mahjong/Class.hs | mit | 2,511 | 0 | 12 | 659 | 611 | 325 | 286 | 51 | 0 |
{-# OPTIONS_HADDOCK hide, prune #-}
module Handler.Mooc.FAQ
( getFAQR
) where
import Import
getFAQR :: Handler Html
getFAQR =
fullLayout Nothing "Frequently Asked Questions" $ do
setTitle "Qua-kit: FAQ"
toWidgetBody $
[hamlet|
<div class="row">
<div class="col-lg-8 c... | achirkin/qua-kit | apps/hs/qua-server/src/Handler/Mooc/FAQ.hs | mit | 22,855 | 0 | 8 | 10,374 | 55 | 31 | 24 | -1 | -1 |
{-# LANGUAGE JavaScriptFFI #-}
import qualified GHCJS.Foreign as F
import GHCJS.Types
import GHCJS.Marshal
import GHCJS.Foreign (ToJSString(..), FromJSString(..), newObj, toJSBool, jsNull, jsFalse, jsTrue, mvarRef)
import Control.Concurrent (threadDelay)
import JavaScript.JQuery
import JavaScript.JQuery.Internal
impor... | MichaelBaker/sartorial-client | vendor/sartorial-server/vendor/sartorial-client/src/Main.hs | mit | 1,870 | 0 | 21 | 385 | 598 | 298 | 300 | 53 | 3 |
import X
(
#if !defined(TESTING)
X
#else
X(..)
#endif
-- f
, f
-- g
, g
, h
)
import Y
| itchyny/vim-haskell-indent | test/module/import_comma_first.in.hs | mit | 100 | 0 | 5 | 35 | 26 | 18 | 8 | -1 | -1 |
import Criterion.Main
import Control.Monad.MWC
import Control.Monad.Reader
main :: IO ()
main = do
gen <- createSystemRandom
let wrap name f size
= bench name $ whnfIO $ replicateM_ 10000
$ runReaderT (f size) gen
defaultMain $ flip map [10, 100, 1000, 10000] $ \size -> bgroup (show... | bitemyapp/snoy-extra | bench/mwc-bytestring.hs | mit | 475 | 0 | 13 | 122 | 149 | 75 | 74 | 12 | 1 |
{- DATX02-17-26, automated assessment of imperative programs.
- Copyright, 2017, see AUTHORS.md.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at... | DATX02-17-26/DATX02-17-26 | libsrc/Norm/ForIndexConstLessThanEq.hs | gpl-2.0 | 1,748 | 0 | 24 | 430 | 321 | 170 | 151 | 25 | 4 |
<?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="hu-HU">
<title>Python Scripting</title>
<maps>
<homeID>top</homeID>
<mapref location="... | veggiespam/zap-extensions | addOns/jython/src/main/javahelp/org/zaproxy/zap/extension/jython/resources/help_hu_HU/helpset_hu_HU.hs | apache-2.0 | 964 | 79 | 66 | 157 | 412 | 208 | 204 | -1 | -1 |
{- |
Module : Mongo.Pid.Removal
Description : Get Pid from Name
Copyright : (c) Plow Technology 2014
License : MIT
Maintainer : brent.phillips@plowtech.net
Stability : unstable
Portability : portable
<Uses a name to grab the pid to remove old pid alarms from mongo>
-}
{-# LANGUAGE OverloadedStrin... | plow-technologies/mongo-pid-removal | src/RemovalMain_flymake.hs | bsd-3-clause | 550 | 1 | 5 | 114 | 43 | 29 | 14 | -1 | -1 |
module Typed(
typed,
testPropertyI,
testPropertyD,
testPropertyZ,
testPropertyDZ,
immutableVector,
immutableMatrix,
) where
import Data.Complex( Complex )
import Test.Framework
import Test.Framework.Providers.QuickCheck2
import Test.QuickCheck
import Numeric.LinearAlgebra.Ve... | patperry/hs-linear-algebra | tests/Typed.hs | bsd-3-clause | 1,420 | 0 | 11 | 461 | 386 | 205 | 181 | 47 | 1 |
import Sound.Pd
import Control.Concurrent
import Control.Monad
import Linear.Extra
main :: IO ()
main = withPd $ \pd -> do
p1 <- makePatch pd "test/world"
forM_ (pdSources pd) $ \sourceID -> alSourcePosition sourceID ((V3 0 0 0) :: V3 Double)
--_ <- forkIO $ forM_ [200,210..1500] $ \freq -> do
-- ... | lukexi/pd-haskell | test/test-al.hs | bsd-3-clause | 750 | 0 | 19 | 192 | 229 | 117 | 112 | 13 | 1 |
--------------------------------------------------------------------------------
-- | Provides URL shortening through the bit.ly API
{-# LANGUAGE OverloadedStrings #-}
module NumberSix.Util.BitLy
( shorten
, textAndUrl
) where
-------------------------------------------------------------------------------... | itkovian/number-six | src/NumberSix/Util/BitLy.hs | bsd-3-clause | 1,559 | 0 | 12 | 372 | 304 | 158 | 146 | 30 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
-- You can set the following VERBOSE environment variable to control
-- the verbosity of the output generated by this module.
module PackageTests.PackageTester
( PackageSpec(..)
, Success(..)
, Result(..)
-- * Running cabal commands
, cabal_configure
, caba... | corngood/cabal | Cabal/tests/PackageTests/PackageTester.hs | bsd-3-clause | 10,883 | 0 | 16 | 2,540 | 2,762 | 1,427 | 1,335 | 242 | 3 |
{-# LANGUAGE PackageImports #-}
module Test17388 where
import "base" Prelude
import {-# Source #-} Foo.Bar
import {-# SOURCE #-} "base" Data.Data
import {-# SOURCE #-} qualified "base" Data.Data
| sdiehl/ghc | testsuite/tests/ghc-api/annotations/Test17388.hs | bsd-3-clause | 203 | 0 | 4 | 36 | 30 | 22 | 8 | 6 | 0 |
import System.Exit (ExitCode(..), exitWith)
import System.Posix.Process
import System.Posix.Signals
main = do test1
test2
test3
test4
putStrLn "I'm happy."
test1 = do
-- Force SIGFPE exceptions to not be ignored. Under some
-- circumstances this test will be run with ... | jimenezrick/unix | tests/libposix/posix004.hs | bsd-3-clause | 1,565 | 0 | 19 | 444 | 430 | 199 | 231 | 38 | 3 |
module Goo (poop) where
class Zog a where
zoom :: a -> Int
-- Assume the relevant behavior for the method.
{-@ zoom :: (Zog a) => a -> Nat @-}
-- Uses the behavior of `zoom`
{-@ poop :: (Zog a) => a -> Nat @-}
poop x = zoom x
| mightymoose/liquidhaskell | tests/pos/tyclass0.hs | bsd-3-clause | 231 | 0 | 7 | 57 | 42 | 24 | 18 | 4 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
-- !!! Error messages with scoped type variables
module Foo where
data Set a = Set a
unionSetB :: Eq a => Set a -> Set a -> Set a
unionSetB (s1 :: Set a) s2 = unionSets s1 s2
where
unionSets :: Eq a => Set a -> Set a -> Set a
unionSets a b = a
{- In GHC 4.04 this gave t... | ryantm/ghc | testsuite/tests/rename/should_fail/rnfail020.hs | bsd-3-clause | 492 | 0 | 10 | 124 | 112 | 56 | 56 | 7 | 1 |
-- !!! an example Simon made up
--
module ShouldSucceed where
f x = (x+1, x<3, g True, g 'c')
where
g y = if x>2 then [] else [y]
{-
Here the type-check of g will yield an LIE with an Ord dict
for x. g still has type forall a. a -> [a]. The dictionary is
free, bound by the x.
It should be ok to add the signature:... | urbanslug/ghc | testsuite/tests/typecheck/should_compile/tc081.hs | bsd-3-clause | 588 | 1 | 9 | 160 | 236 | 134 | 102 | 9 | 2 |
{-# LANGUAGE ParallelArrays #-}
{-# OPTIONS -fvectorise #-}
module Types ( Point, Line, points, xsOf, ysOf) where
import Data.Array.Parallel
import Data.Array.Parallel.Prelude.Double
type Point = (Double, Double)
type Line = (Point, Point)
points' :: [:Double:] -> [:Double:] -> [:Point:]
points' = zipP
points :: ... | urbanslug/ghc | testsuite/tests/dph/quickhull/Types.hs | bsd-3-clause | 810 | 27 | 9 | 145 | 338 | 187 | 151 | 22 | 1 |
module Main where
import C
main = print ("hello world" ++ show (f 42))
| ghc-android/ghc | testsuite/tests/ghci/prog002/D.hs | bsd-3-clause | 73 | 0 | 10 | 16 | 31 | 17 | 14 | 3 | 1 |
-- |
-- Module: src-test/Main.hs
-- Copyright: 2016 Michael Litchard
-- License: BSD3
-- Maintainer: <Michael Litchard> <michael@schmong.org>
-- A few tests for fizzbuzz demo
module Main (main) where
import BasicPrelude
import Test.Hspec (hspec)
import PropTests.Fibonacci
import PropTests.FizzBuzz
import ... | mlitchard/swiftfizz | src-test/Main.hs | isc | 588 | 0 | 8 | 104 | 107 | 60 | 47 | 15 | 1 |
{-# LANGUAGE LambdaCase #-}
module Oden.Core.Expr where
import Oden.Core.Foreign
import Oden.Identifier
import Oden.Metadata
import Oden.SourceInfo
data NameBinding = NameBinding (Metadata SourceInfo) Identifier
deriving (Show, Eq, Ord)
data FieldInitializer e... | oden-lang/oden | src/Oden/Core/Expr.hs | mit | 5,972 | 0 | 11 | 2,293 | 2,482 | 1,211 | 1,271 | 122 | 18 |
thousands = [y | z <- [1..1000],
y <- [[x, yy, z] | yy <- [1..1000], let x = (1000 - yy - z), x > 0, x < yy, yy < z]
]
isTriplet :: [Int] -> Bool
isTriplet xs = a^2 + b^2 == c^2
where
a = head xs
b = xs !! 1
c = xs !! 2
problem9 = product $ head [x | x <- thousands, isTriplet x]
| danhaller/euler-haskell | 9.hs | mit | 318 | 16 | 15 | 112 | 209 | 111 | 98 | 8 | 1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
import Diagrams.Prelude
import Diagrams.Backend.SVG.CmdLine
c1 = circle 0.5 # fc steelblue
c2 = circle 1 # fc orange
diagram :: Diagram B
diagram = beside (1 ^& 1) c1 c2 # showOrigin
main = mainWith $ frame 0.1 diagram
| jeffreyrosenbluth/NYC-meetup | meetup/Atop6.hs | mit | 268 | 0 | 8 | 49 | 89 | 46 | 43 | 8 | 1 |
mpow :: Int -> Float -> Float
mpow 0 _ = 1
mpow n f = f * (mpow (n-1) f)
main = print (mpow 50 0.5)
| lucas8/MPSI | ipt/recursive/misc/pow.hs | mit | 103 | 0 | 9 | 30 | 69 | 35 | 34 | 4 | 1 |
module ChatCore.ChatLog.File
( LogFileId (..)
, logFileForDate
, dayForLogFile
, logFileForToday
, logFileForLine
, logFileName
, parseLogFileId
, logFilesInDir
, ChatLogLine (..)
) where
import Control.Applicative
import Control.Error
import Data.Time
import System.Director... | Forkk/ChatCore | ChatCore/ChatLog/File.hs | mit | 2,186 | 0 | 10 | 533 | 535 | 282 | 253 | 53 | 1 |
{-# LANGUAGE LambdaCase #-}
module Main where
import qualified $module$
import Control.Applicative
import Control.Monad
import Control.Concurrent.Timeout
import Data.Time.Clock.POSIX
import Data.Timeout
import System.IO
import Text.Printf
import Language.Haskell.Liquid.Types (GhcSpec)
import Test.Target
import Test.... | gridaphobe/target | bin/CheckFun.template.hs | mit | 1,970 | 6 | 20 | 651 | 581 | 294 | 287 | -1 | -1 |
module Codecs.QuickCheck where
import Data.Monoid ((<>))
import Test.Tasty
import Test.QuickCheck
import Test.QuickCheck.Arbitrary
import Test.QuickCheck.Monadic
import Data.Scientific as S
import Data.Time
import Text.Printf
import Data.List as L
import Data.UUID (UUID, fromWords)
import Data.String (IsString)
impor... | postgres-haskell/postgres-wire | tests/Codecs/QuickCheck.hs | mit | 7,070 | 0 | 16 | 1,608 | 1,947 | 1,019 | 928 | 155 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
-- | Defines an Postgresql event store.
module Eventful.Store.Postgresql
( postgresqlEventStoreWriter
, module Eventful.Store.Class
, module Eventful.Store.Sql
) where
import Control.Monad.Reader
import Data.Monoid ((<>))
import Data.Text (Text... | jdreaver/eventful | eventful-postgresql/src/Eventful/Store/Postgresql.hs | mit | 2,018 | 0 | 10 | 312 | 286 | 163 | 123 | 25 | 1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.MediaError
(pattern MEDIA_ERR_ABORTED, pattern MEDIA_ERR_NETWORK,
pattern MEDIA_ERR_DECODE, pattern MEDIA_ERR_SRC_NOT_SUPPORTED,
pattern MEDIA_ERR_ENCRYPTED, js_getCode, getCode, MediaError,... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/MediaError.hs | mit | 1,580 | 6 | 8 | 193 | 417 | 261 | 156 | 29 | 1 |
import GHC.RTS.Events
analyze path analysis =
do logread <- readEventLogFromFile path
print (do log <- logread
return $ analysis log)
isTrace (Event t i) = case i of
(UserMessage x) -> True
_ -> False
dfilter f = foldr ((++) . rfilter) []
where ... | patrickboe/artery | Analysis/Trace.hs | mit | 603 | 0 | 13 | 224 | 249 | 122 | 127 | 17 | 3 |
module Rebase.Data.Text.IO
(
module Data.Text.IO
)
where
import Data.Text.IO
| nikita-volkov/rebase | library/Rebase/Data/Text/IO.hs | mit | 80 | 0 | 5 | 12 | 23 | 16 | 7 | 4 | 0 |
module Eval where
import Control.Monad.Error
import Types
eval :: LispVal -> ThrowsError LispVal
eval val@(String _) = return val
eval val@(Char _) = return val
eval val@(Number _) = return val
eval val@(Float _) = return val
eval val@(Bool _) = return val
eval (List [Atom "quote", val]) = return val
eval (List (Atom ... | dstruthers/WYAS | Eval.hs | mit | 2,148 | 0 | 10 | 587 | 789 | 412 | 377 | 49 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ConstraintKinds #-}
module App where
import BasePrelude hiding (first)
imp... | benkolera/talk-stacking-your-monads | code-classy/src/App.hs | mit | 1,163 | 0 | 8 | 232 | 280 | 159 | 121 | 35 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Jolly.Parser
( runParseModule
) where
import qualified Data.Text.Lazy as TL
import Text.Megaparsec
import Text.Megaparsec.Char
import qualified Text.Megaparsec.Char.Lexer as L
import Text.Megaparsec.Expr
import Jolly.Sy... | jchildren/jolly | src/Jolly/Parser.hs | mit | 3,014 | 0 | 14 | 679 | 1,069 | 555 | 514 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
module Chapter14 where
import Chapter8 (recMul)
import Control.Monad (mapM_, return)
import Data.Bool (Bool(False, True), (&&), (||))
import Data.Char (toUpper)
import Data.Eq (Eq, (==), (/=))
import Data.Foldable (concat, foldr)
import Data.Function (id)
import Data.Functor (fmap)
... | Numberartificial/workflow | haskell-first-principles/haskell-programming-from-first-principles-master/src/Chapter14.hs | mit | 16,922 | 2 | 15 | 5,124 | 3,349 | 1,796 | 1,553 | 255 | 3 |
----------------------------------------------------
-- --
-- HyLoRes.Formula: --
-- Formula data type --
-- --
----------------------------------------------------
{... | nevrenato/HyLoRes_Source | 2.4/src/HyLoRes/Formula.hs | gpl-2.0 | 30,229 | 3 | 17 | 10,481 | 9,804 | 5,121 | 4,683 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Mode.Compilation
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stability : experimental
-- Portability : portable
--
-- A 'Mode' for working with buffers showing the results of compilations... | atsukotakahashi/wi | src/library/Yi/Mode/Compilation.hs | gpl-2.0 | 1,435 | 0 | 18 | 348 | 318 | 178 | 140 | -1 | -1 |
-- | The "framework" provides all the core classes and types used ubiquitously by
-- the machine learning algorithms.
module Algorithms.MachineLearning.Framework where
import Algorithms.MachineLearning.LinearAlgebra
import Algorithms.MachineLearning.Utilities
import Numeric.LinearAlgebra
import Data.List
import Sys... | batterseapower/machine-learning | Algorithms/MachineLearning/Framework.hs | gpl-2.0 | 5,676 | 0 | 13 | 1,031 | 1,428 | 755 | 673 | -1 | -1 |
module CoreSVG
(writeFullPolygon
,writeFullFigure_dep
,writeFullFigure
,colourizeFig
,findBBFigure
,findBBFullFigure
,findBBPolygon
) where
import DataTypes
import Data.Char (toUpper)
import Numeric (showHex)
import Constants (strokewidth)
{- This function takes a Point and returns a string which is formatted as
an ... | Lexer747/Haskell-Fractals | Core/CoreSVG.hs | gpl-3.0 | 4,530 | 0 | 18 | 751 | 762 | 422 | 340 | 46 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Ssh.HashMac (
HashMac(..)
, noHashMac
, sha1HashMac
) where
import qualified Data.ByteString.Lazy as B
import Data.ByteString.Lazy.Char8 () -- IsString instance for the above
import Data.Word
import Data.HMAC
type SshString = B.ByteString
data HashMac = HashMa... | bcoppens/HaskellSshClient | src/Ssh/HashMac.hs | gpl-3.0 | 673 | 0 | 11 | 150 | 169 | 103 | 66 | 20 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE IncoherentInstances #-}
{-# LANGUAGE DeriveGeneric #-}
module Test.QuickFuzz.Gen.Image.Png where
import Data.Default
import qualified Data.Binary
import Codec.Picture.Png
import Codec.Picture.Png.Type
import Codec.Picture.Png.Export
im... | elopez/QuickFuzz | src/Test/QuickFuzz/Gen/Image/Png.hs | gpl-3.0 | 1,073 | 0 | 6 | 135 | 219 | 143 | 76 | 35 | 1 |
---------------------------------------------------------------------------
-- This file is part of grammata.
--
-- grammata is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, ... | SRechenberger/grammata | src/Grammata/Language.hs | gpl-3.0 | 2,237 | 0 | 9 | 398 | 323 | 218 | 105 | 19 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/RelyingParty/SetAccountInfo.hs | mpl-2.0 | 3,333 | 0 | 13 | 698 | 308 | 189 | 119 | 53 | 1 |
-- | Round 1C 2009 Problem A. All Your Base
-- https://code.google.com/codejam/contest/189252/dashboard#s=p0
module AllYourBase where
-- constant imports
import Text.ParserCombinators.Parsec
import Text.Parsec
import System.IO (openFile, hClose, hGetContents, hPutStrLn, IOMode(ReadMode), stderr)
import Debug.Trace (tr... | dirkz/google-code-jam-haskell | practice/src/AllYourBase.hs | mpl-2.0 | 3,287 | 0 | 14 | 760 | 1,118 | 597 | 521 | 79 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-glacier/gen/Network/AWS/Glacier/Types.hs | mpl-2.0 | 41,145 | 0 | 41 | 9,607 | 6,455 | 3,711 | 2,744 | -1 | -1 |
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
module X_3 where
import Data.List
import Data.Map.Strict as Map
import Debug.Trace
import Test.HUnit (Counts, Test (TestList... | haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/trees-that-grow-and-shrink/2018-06-vaibhav-sagar-trees-that-shrink/X_3.hs | unlicense | 5,978 | 0 | 21 | 2,221 | 1,944 | 981 | 963 | 138 | 6 |
ans :: [[Int]] -> [Int]
ans ([0]:_) = []
ans ([k]:l:xs) =
let d = k - 1
a = sum l
in
(a`div`d):ans xs
main = do
c <- getContents
let i = map (map read) $ map words $ lines c :: [[Int]]
o = ans i
mapM_ print o
| a143753/AOJ | 1027.hs | apache-2.0 | 287 | 0 | 14 | 130 | 169 | 87 | 82 | 11 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QDial.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:15
Warning : this file is machine generated - do not mod... | uduki/hsQt | Qtc/Gui/QDial.hs | bsd-2-clause | 45,334 | 0 | 14 | 7,876 | 15,927 | 8,087 | 7,840 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Config (AppConfig(..), config, defaultConfig)
where
import qualified Data.Configurator as C
import Data.Configurator.Types
import Control.Exception (catch)
import Data.Text (unpack)
import Options
data AppOptions = AppOptions {
configPath :: String
}
data AppCo... | lolepezy/rpki-pub-server | src/Config.hs | bsd-2-clause | 2,204 | 0 | 13 | 542 | 503 | 280 | 223 | 51 | 1 |
module Raven.ParserSpec ( spec ) where
import Test.Tasty.Hspec
import Test.QuickCheck
import Test.Hspec.Megaparsec
import Text.Megaparsec hiding (parse, string)
import Raven.Types
import Raven.Parser
spec :: Spec
spec = describe "Parser" $ do
describe "parsing bools" $ do
it "should be able to parse true ... | luc-tielen/raven | test/Raven/ParserSpec.hs | bsd-3-clause | 20,712 | 0 | 23 | 5,961 | 6,002 | 2,712 | 3,290 | 389 | 1 |
module Main where
import qualified System.IO.Streams.Tests.Attoparsec.ByteString as AttoparsecByteString
import qualified System.IO.Streams.Tests.Attoparsec.Text as AttoparsecText
import qualified System.IO.Streams.Tests.Builder as Builder
import qualified System.IO.Streams.Tests.ByteString ... | LukeHoersten/io-streams | test/TestSuite.hs | bsd-3-clause | 2,344 | 0 | 9 | 613 | 381 | 251 | 130 | 36 | 1 |
{-# LANGUAGE DataKinds, FlexibleContexts, TemplateHaskell #-}
-- | Demonstration of streaming data processing. Try building with
-- cabal (@cabal build benchdemo@), then running in bash with
-- something like,
--
-- @$ /usr/bin/time -l dist/build/benchdemo/benchdemo 2>&1 | head -n 4@
import qualified Control.Foldl as F... | codygman/Frames | benchmarks/BenchDemo.hs | bsd-3-clause | 718 | 0 | 11 | 162 | 168 | 91 | 77 | 13 | 1 |
{-# LANGUAGE TemplateHaskell, LambdaCase, FlexibleContexts, DeriveFunctor, DeriveFoldable, DeriveTraversable #-}
module Jugendstil.Doc.Layout
( Layout(..)
, matchLayout
, computeStyle
, Document
, renderDocument
, rows
, columns
, docs
, margin
-- * DoList
, DoList
, unDoList
, (==>)
, rowsD... | fumieval/jugendstil | src/Jugendstil/Doc/Layout.hs | bsd-3-clause | 3,806 | 0 | 14 | 865 | 2,030 | 1,055 | 975 | 88 | 3 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveGeneric #-}
module Aria.Pass where
import Happstack.ClientSession
import Control.Lens
import Datat.Data
import Data.SafeCopy (base, deriveSafeCopy)
import Control.Monad.Catch
import Control.Monad... | theNerd247/ariaRacer | arweb/app/Aria/Pass.hs | bsd-3-clause | 1,507 | 2 | 11 | 237 | 447 | 241 | 206 | 42 | 2 |
-- | This module defines a sever-side handler that lets you serve static files.
--
-- - 'serveDirectory' lets you serve anything that lives under a particular
-- directory on your filesystem.
module Servant.Utils.StaticFiles (
serveDirectory,
) where
import Filesystem.Path.CurrentOS (decodeString)
import Network.... | derekelkins/servant-server | src/Servant/Utils/StaticFiles.hs | bsd-3-clause | 1,346 | 0 | 11 | 216 | 109 | 74 | 35 | 9 | 1 |
import Image
| YoshikuniJujo/markdown2svg | tests/testImage.hs | bsd-3-clause | 13 | 0 | 3 | 2 | 4 | 2 | 2 | 1 | 0 |
module Opaleye.Internal.Order where
import qualified Opaleye.Column as C
import qualified Opaleye.Internal.Tag as T
import qualified Opaleye.Internal.PrimQuery as PQ
import qualified Database.HaskellDB.PrimQuery as HPQ
import qualified Data.Functor.Contravariant as C
import qualified Data.Profunctor as P
import quali... | k0001/haskell-opaleye | Opaleye/Internal/Order.hs | bsd-3-clause | 1,611 | 0 | 12 | 284 | 612 | 344 | 268 | 29 | 1 |
module Test6
where
import qualified Data.HashMap.Strict as H
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Data.List
import Debug.Trace
import System.IO
isAlpha ch = ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z')
wrds :: T.Text -> [ T.Text ]
wrds bs =
let
(_, r1) = T.span (n... | erantapaa/test-spelling | src/Test6.hs | bsd-3-clause | 942 | 0 | 20 | 333 | 405 | 209 | 196 | 26 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
module Development.Shake.Install.RequestResponse where
import Development.Shake as Shake
import Control.App... | alphaHeavy/shake-install | Development/Shake/Install/RequestResponse.hs | bsd-3-clause | 1,597 | 0 | 9 | 299 | 568 | 293 | 275 | 47 | 1 |
{-# LANGUAGE Arrows #-}
import Hatter
import Hatter.Types
import Hatter.Wires
import Control.Wire as Wire hiding (id)
import Control.Arrow
import Control.Applicative
import FRP.Netwire hiding (id)
import Prelude hiding ((.), null, filter)
import Data.Map as Map hiding (foldl)
import Linear hiding (trace)
import Debug.T... | shivanshuag/Hatter | examples/square_using_wires.hs | bsd-3-clause | 1,899 | 1 | 13 | 413 | 510 | 281 | 229 | 36 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
------------------------------------------------------------------------------
import Control.Exception (SomeException, try)
import qualified Data.Text as T
import Site
import Snap.Core
import... | HaskellCNOrg/snaplet-oauth | example/src/Main.hs | bsd-3-clause | 4,565 | 0 | 11 | 927 | 334 | 210 | 124 | 27 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE Typ... | Coggroach/Gluon | src/MongoDbConnector.hs | bsd-3-clause | 1,299 | 0 | 12 | 377 | 242 | 136 | 106 | 31 | 2 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeFamilies #-}
-- | <http://www.libtorrent.org/reference-Core.html#peer-info peer_info> structure for "Libtorrent"
module Network.Libtorrent.PeerInfo (PeerFlag... | eryx67/haskell-libtorrent | src/Network/Libtorrent/PeerInfo.hs | bsd-3-clause | 26,211 | 0 | 14 | 7,325 | 6,119 | 3,290 | 2,829 | 561 | 1 |
{-# LANGUAGE UndecidableInstances,
FlexibleInstances,
FlexibleContexts,
TypeFamilies,
ScopedTypeVariables #-}
-----------------------------------------------------------------------------
-- |
-- Module : Numeric.Signal.Multichannel
-- Copyright : (c) Alexand... | amcphail/hsignal | lib/Numeric/Signal/Multichannel.hs | bsd-3-clause | 15,032 | 0 | 21 | 5,490 | 4,146 | 2,193 | 1,953 | 230 | 3 |
-- Implements a simple language embedded in the reactive resumption
-- monad, ReactT. First useful application example of resumptions.
{-# OPTIONS -fglasgow-exts -fno-monomorphism-restriction #-}
import InterpreterLib.Algebras
import InterpreterLib.Functors
import InterpreterLib.Terms.ArithTerm
import InterpreterLib.... | palexand/interpreters | AbstractInterp/Sample5.hs | bsd-3-clause | 9,519 | 4 | 18 | 2,497 | 3,300 | 1,736 | 1,564 | -1 | -1 |
module StringCompressorKata.Day6 (compress) where
import Data.Char (intToDigit)
compress :: Maybe String -> Maybe String
compress Nothing = Nothing
compress (Just "") = Just ""
compress (Just (c:str)) = Just $ compress' 1 c str
where
compress' :: Int -> Char -> String -> String... | Alex-Diez/haskell-tdd-kata | old-katas/src/StringCompressorKata/Day6.hs | bsd-3-clause | 674 | 0 | 12 | 227 | 213 | 108 | 105 | 12 | 3 |
module Language.Haskell.TH.SCCs
(binding_group, binding_groups,
scc, sccs,
Dependencies(..), type_dependencies, td_recur, td_descend,
Named(..),
printQ
) where
import Language.Haskell.TH.Syntax
import qualified Data.Set as Set; import Data.Set (Set)
import qualified Data.Map as Map
import qualified Da... | nfrisby/th-sccs | Language/Haskell/TH/SCCs.hs | bsd-3-clause | 5,645 | 0 | 18 | 1,432 | 1,969 | 986 | 983 | 116 | 2 |
module Paths_Todo (
version,
getBinDir, getLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Exception
import Data.Version (Version(..))
import System.Environment (getEnv)
import Prelude
catchIO :: IO a -> (Exception.IOException -> IO a) -> I... | frankhucek/Todo | .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/autogen/Paths_Todo.hs | bsd-3-clause | 1,566 | 0 | 10 | 177 | 362 | 206 | 156 | 28 | 1 |
module PPTest.Grammars.Lexical (specs) where
import PP
import PP.Grammars.Lexical
import Test.Hspec
specs = describe "PPTest.Grammars.Lexical" $ do
it "should parse a regular expression (any)" $
case parseAst "." :: To RegExpr of
Left e -> show e `shouldBe` "not an error"
... | chlablak/platinum-parsing | test/PPTest/Grammars/Lexical.hs | bsd-3-clause | 2,584 | 0 | 13 | 662 | 746 | 359 | 387 | 53 | 13 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Main
( main
) where
-------------------------------------------------------------------------------
import Control.Monad.IO.Class (liftIO)
import Data.Aeson (FromJSON (..), defaultOptions,
... | bermanjosh/bloodhound | examples/Tweet.hs | bsd-3-clause | 4,281 | 0 | 17 | 901 | 894 | 469 | 425 | 76 | 1 |
module Bot.Util where
import Paths_5chbot
import qualified Data.Version as V
eitherToMaybe :: Either a b -> Maybe b
eitherToMaybe (Left _) = Nothing
eitherToMaybe (Right a) = Just a
showVersion :: String
showVersion = "5chbot ver. " ++ V.showVersion version
| hithroc/5chbot | src/Bot/Util.hs | bsd-3-clause | 262 | 0 | 7 | 44 | 84 | 45 | 39 | 8 | 1 |
module Scurry.Console (
consoleThread
) where
import Control.Concurrent.STM.TChan
import Control.Monad (forever)
import Data.List
import System.IO
import System.Exit
import qualified GHC.Conc as GC
import Scurry.Console.Parser
import Scurry.Comm.Message
import Scurry.Comm.Util
import Scurry.Types.Network
import S... | dmagyar/scurry | src/Scurry/Console.hs | bsd-3-clause | 1,459 | 0 | 14 | 453 | 357 | 190 | 167 | 31 | 5 |
-- | Korrekturfunktion für Faktorisierung
-- joe@informatik.uni-leipzig.de
-- benutzt code für challenger/PCProblem
-- von Markus Kreuz mai99byv@studserv.uni-leipzig.de
module Faktor.Times (
make_fixed
, make_quiz
) where
import Challenger.Partial
import Autolib.ToDoc
import Autolib.Reporter
impor... | florianpilz/autotool | src/Faktor/Times.hs | gpl-2.0 | 1,781 | 32 | 12 | 441 | 464 | 248 | 216 | -1 | -1 |
module PatNegateResult where
f :: Bool -> Int
f (- 3) = 5
| roberth/uu-helium | test/typeerrors/Examples/PatNegateResult.hs | gpl-3.0 | 59 | 0 | 7 | 14 | 26 | 15 | 11 | 3 | 1 |
{- | Utilities for dealing with the location of parsed entities in their source files.
-}
{-# LANGUAGE OverloadedStrings #-}
module Base.Location
( Location(..)
, Position(..)
) where
import Data.Monoid
import Data.Text.Prettyprint.Doc (Pretty (..))
-- | Position within a text file.
data Po... | Verites/verigraph | src/library/Base/Location.hs | apache-2.0 | 789 | 0 | 10 | 180 | 242 | 133 | 109 | 19 | 0 |
<?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="zh-CN">
<title>Bug Tracker</title>
<maps>
<homeID>top</homeID>
<mapref location="map.j... | veggiespam/zap-extensions | addOns/bugtracker/src/main/javahelp/org/zaproxy/zap/extension/bugtracker/resources/help_zh_CN/helpset_zh_CN.hs | apache-2.0 | 957 | 84 | 52 | 157 | 392 | 207 | 185 | -1 | -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="pt-BR">
<title>Getting started Guide</title>
<maps>
<homeID>top</homeID>
<mapref locat... | brunoqc/zap-extensions | src/org/zaproxy/zap/extension/gettingStarted/resources/help_pt_BR/helpset_pt_BR.hs | apache-2.0 | 970 | 84 | 52 | 158 | 394 | 208 | 186 | -1 | -1 |
{-|
Module : Servant.Server.Auth.Token.SingleUse
Description : Specific functions to work with single usage codes.
Copyright : (c) Anton Gushcha, 2016
License : MIT
Maintainer : ncrashed@gmail.com
Stability : experimental
Portability : Portable
-}
module Servant.Server.Auth.Token.SingleUse(
makeSingle... | VyacheslavHashov/servant-auth-token | src/Servant/Server/Auth/Token/SingleUse.hs | bsd-3-clause | 2,483 | 0 | 12 | 443 | 478 | 248 | 230 | 48 | 1 |
{-# LANGUAGE TypeFamilies, TypeOperators, DataKinds #-}
module Tests.Compile.Readme where
import Data.Metrology.Poly hiding (LCSU)
data LengthDim = LengthDim -- each dimension is a datatype that acts as its own proxy
instance Dimension LengthDim
data TimeDim = TimeDim
instance Dimension TimeDim... | goldfirere/units | units-test/Tests/Compile/Readme.hs | bsd-3-clause | 3,352 | 8 | 11 | 1,057 | 698 | 394 | 304 | 64 | 1 |
-- | Basic data flow analysis over the Haste AST.
module Haste.AST.FlowAnalysis (
Strict (..), VarInfo (..), InfoMap, ArgMap,
mkVarInfo, nullInfo, mergeVarInfos, findVarInfos
) where
import Haste.AST.Syntax
import Control.Monad.State
import Data.List (foldl', sort, group)
import qualified Data.Set as S
import... | kranich/haste-compiler | src/Haste/AST/FlowAnalysis.hs | bsd-3-clause | 6,515 | 0 | 25 | 2,114 | 2,060 | 1,038 | 1,022 | 116 | 36 |
{-# LANGUAGE BangPatterns, DeriveFunctor, RecordWildCards #-}
module Network.Wreq.Cache.Store
(
Store
, empty
, insert
, delete
, lookup
, fromList
, toList
) where
import Data.Hashable (Hashable)
import Data.Int (Int64)
import Data.List (foldl')
import Prelude hiding (lookup, ma... | bitemyapp/wreq | Network/Wreq/Cache/Store.hs | bsd-3-clause | 2,108 | 0 | 12 | 531 | 919 | 503 | 416 | 49 | 3 |
<?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>Directory List v2.3 LC</title>
<maps>
<homeID>directorylistv2_3_lc</homeID>
... | kingthorin/zap-extensions | addOns/directorylistv2_3_lc/src/main/javahelp/help_bs_BA/helpset_bs_BA.hs | apache-2.0 | 984 | 83 | 52 | 158 | 397 | 210 | 187 | -1 | -1 |
module A4 where
data T a = C1 a
over :: (T b) -> b
over (C1 x) = x
under :: (T a) -> a
under (C1 x) = x
| SAdams601/HaRe | old/testing/addCon/A4.hs | bsd-3-clause | 109 | 0 | 7 | 36 | 72 | 39 | 33 | 6 | 1 |
{-| Module describing an NIC.
The NIC data type only holds data about a NIC, but does not provide any
logic.
-}
{-
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 c... | apyrgio/snf-ganeti | src/Ganeti/HTools/Nic.hs | bsd-2-clause | 3,420 | 0 | 12 | 795 | 290 | 179 | 111 | 31 | 1 |
{-# LANGUAGE BangPatterns, OverloadedStrings #-}
import Control.DeepSeq
import Control.Exception
import Control.Monad
import Data.Aeson
import Data.Aeson.Parser
import Data.Attoparsec
import Data.Time.Clock
import System.Environment (getArgs)
import System.IO
import qualified Data.ByteString as B
main = do
(cnt:arg... | jprider63/aeson-ios-0.8.0.2 | benchmarks/ReadFile.hs | bsd-3-clause | 821 | 0 | 27 | 255 | 275 | 136 | 139 | 29 | 2 |
{-# LANGUAGE BangPatterns, Rank2Types, OverloadedStrings,
RecordWildCards, MagicHash, UnboxedTuples #-}
module Data.Attoparsec.Internal.Fhthagn
(
inlinePerformIO
) where
import GHC.Base (realWorld#)
import GHC.IO (IO(IO))
-- | Just like unsafePerformIO, but we inline it. Big performance gains as
--... | DavidAlphaFox/ghc | utils/haddock/haddock-library/vendor/attoparsec-0.12.1.1/Data/Attoparsec/Internal/Fhthagn.hs | bsd-3-clause | 636 | 0 | 8 | 110 | 87 | 52 | 35 | 10 | 1 |
module Main where
import System.IO
import DynFlags
import GHC
import Exception
import Module
import FastString
import MonadUtils
import Outputable
import Bag (filterBag,isEmptyBag)
import System.Directory (removeFile)
import System.Environment( getArgs )
import PrelNames
main :: IO()
main
= do [libdir] <- getArgs
... | urbanslug/ghc | testsuite/tests/ghc-api/T8628.hs | bsd-3-clause | 1,039 | 0 | 19 | 267 | 261 | 127 | 134 | 30 | 1 |
-------------------------------------------------------------------------------
-- |
-- Module : Network.CURL720
-- Copyright : Copyright (c) 2012-2015 Krzysztof Kardzis
-- License : ISC License (MIT/BSD-style, see LICENSE file for details)
--
-- Maintainer : Krzysztof Kardzis <kkardzis@gmail.com>
-- St... | kkardzis/curlhs | Network/CURL720.hs | isc | 14,022 | 0 | 5 | 3,414 | 933 | 846 | 87 | 385 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Jamo where
import Prelude hiding (readFile, putStrLn, lookup, writeFile)
import Data.List (intersect, (\\))
import Data.Map (fromList, lookup)
import Data.Attoparsec.Text (takeWhile1, takeTill, inClass, char, parseOnly, choice, many', endOfInput)
import Data.Text (Text, cons, ... | xnuk/another-aheui-interpreter | template/Jamo.hs | mit | 2,569 | 0 | 17 | 659 | 797 | 432 | 365 | 54 | 4 |
-----------------------------------------------------------------------------
--
-- Module : Network.Google
-- Copyright : (c) 2012-13 Brian W Bush
-- License : MIT
--
-- Maintainer : Brian W Bush <b.w.bush@acm.org>
-- Stability : Stable
-- Portability : Portable
--
-- | Helper functions for accessi... | rrnewton/hgdata_trash | src/Network/Google.hs | mit | 7,085 | 0 | 12 | 1,661 | 1,345 | 756 | 589 | 148 | 1 |
module TeX.Alias
( Alias(AliasIfTrue, AliasIfFalse)
, AliasMap(), emptyAliasMap, aliasLens
)
where
import qualified Data.Map as M
import TeX.StateUtils
import TeX.Token
data Alias = AliasIfTrue | AliasIfFalse
deriving (Eq, Show)
newtype AliasMap = AliasMap (M.Map Token Alias)
deriving (Show)
emptyAliasMap :: A... | xymostech/tex-parser | src/TeX/Alias.hs | mit | 510 | 0 | 12 | 81 | 178 | 101 | 77 | 18 | 1 |
------------------------------------------------------------------------------
-- | Defines the 'Charset' accept header with an 'Accept' instance for use in
-- encoding negotiation.
module Network.HTTP.Media.Charset
( Charset ) where
import Network.HTTP.Media.Charset.Internal
| zmthy/http-media | src/Network/HTTP/Media/Charset.hs | mit | 292 | 0 | 4 | 41 | 24 | 18 | 6 | 3 | 0 |
module Sprinkler where
import Control.Monad (when)
import Control.Monad.Bayes.Class
hard :: MonadBayes m => m Bool
hard = do
rain <- bernoulli 0.3
sprinkler <- bernoulli $ if rain then 0.1 else 0.4
wet <- bernoulli $ case (rain,sprinkler) of (True,True) -> 0.98
(Tr... | ocramz/monad-bayes | models/Sprinkler.hs | mit | 699 | 0 | 12 | 253 | 241 | 123 | 118 | 20 | 5 |
module CLI
( Options(..)
, Command(..)
, SolveOptions(..)
, GenerateOptions(..)
, parseOpts
) where
import Options.Applicative
data Options = Options
{ cmd :: Command
, useAscii :: Bool
}
data Command
= Solve SolveOptions
| Generate GenerateOptions
data SolveOptions = SolveOptions
{ puzzleFi... | patrickherrmann/sudoku | src/CLI.hs | mit | 1,764 | 0 | 11 | 452 | 375 | 201 | 174 | 49 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module GhostLang.LinkerTests
( -- Pre link semantic tests.
checkEmptyModule
, checkOneNonMainModule
, checkMainModuleWithoutPatterns
, checkOtherModuleWithPatterns
, checkDuplicateMainModules
, checkSingleCorrectMainModule
, checkTwoCorrectModules
... | kosmoskatten/ghost-lang | ghost-lang/test/GhostLang/LinkerTests.hs | mit | 12,556 | 0 | 19 | 4,859 | 2,789 | 1,450 | 1,339 | 228 | 2 |
{-# LANGUAGE ForeignFunctionInterface #-}
-- |
-- Module : Crypto.Hash.BLAKE
-- Copyright : (c) Austin Seipp 2013
-- License : MIT
--
-- Maintainer : aseipp@pobox.com
-- Stability : experimental
-- Portability : portable
--
-- BLAKE-256 and BLAKE-512 hashes. The underlying implementation uses
-- the @ref@... | thoughtpolice/hs-blake | src/Crypto/Hash/BLAKE.hs | mit | 1,817 | 0 | 12 | 411 | 317 | 182 | 135 | 27 | 1 |
module Main where
main :: IO ()
main = do
input <- getLine
print input
-- getWrappingPaperSurfaceArea ::
type Len = Integer
data Box = Box Len Len Len
data Side = Side Len Len
getSides :: Box -> [Side]
getSides (Box l w h) = [ Side l w
, Side w h
, Side l h ]
cla... | spicydonuts/adventofcode-2015 | 2/Main.hs | mit | 634 | 0 | 10 | 192 | 237 | 123 | 114 | 22 | 1 |
module GameIO (strToPegs, printCols, printWrLength, printRating, printWin, getGuess) where
import GameRules
import Data.List (lookup, repeat)
import Data.Maybe (fromJust)
import Control.Monad (forM, replicateM_)
import Text.Printf (printf)
import qualified System.Console.ANSI as Con
chars = [('1', Red), ('2', Green)... | michi7x7/mastermind | GameIO.hs | gpl-2.0 | 2,909 | 0 | 16 | 750 | 1,101 | 596 | 505 | 81 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
module Prolog.Data where
import qualified Autolib.Reader as R
import qualified Autolib.ToDoc as T
import Autolib.Util.Size
import Data.Char
import Data.Set (Set)
import qualified Data.Set as S
import Data.Typeable
data Identifier = Identifier { name :: String }
deriving ( E... | Erdwolf/autotool-bonn | src/Prolog/Data.hs | gpl-2.0 | 2,456 | 0 | 16 | 774 | 1,050 | 528 | 522 | 77 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.