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 FlexibleContexts #-}
-- |
-- Module : Statistics.Autocorrelation
-- Copyright : (c) 2009 Bryan O'Sullivan
-- License : BSD3
--
-- Maintainer : bos@serpentine.com
-- Stability : experimental
-- Portability : portable
--
-- Functions for computing autocovariance and autocorrelation of a
-- sample.
m... | bos/statistics | Statistics/Autocorrelation.hs | bsd-2-clause | 1,675 | 0 | 15 | 389 | 499 | 272 | 227 | 24 | 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="ro-RO">
<title>JSON View</title>
<maps>
<homeID>jsonview</homeID>
<mapref location="map... | thc202/zap-extensions | addOns/jsonview/src/main/javahelp/help_ro_RO/helpset_ro_RO.hs | apache-2.0 | 959 | 77 | 66 | 156 | 407 | 206 | 201 | -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="ms-MY">
<title>Requester</title>
<maps>
<homeID>requester</homeID>
<mapref location="ma... | thc202/zap-extensions | addOns/requester/src/main/javahelp/help_ms_MY/helpset_ms_MY.hs | apache-2.0 | 960 | 77 | 66 | 155 | 404 | 205 | 199 | -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="it-IT">
<title>Server-Sent Events Add-on</title>
<maps>
<homeID>sse.introduction</homeID>
... | thc202/zap-extensions | addOns/sse/src/main/javahelp/org/zaproxy/zap/extension/sse/resources/help_it_IT/helpset_it_IT.hs | apache-2.0 | 984 | 77 | 68 | 157 | 419 | 212 | 207 | -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>GraphQL Support Add-on</title>
<maps>
<homeID>graphql</homeID>
<mapref l... | thc202/zap-extensions | addOns/graphql/src/main/javahelp/org/zaproxy/addon/graphql/resources/help_pt_BR/helpset_pt_BR.hs | apache-2.0 | 971 | 77 | 67 | 157 | 413 | 209 | 204 | -1 | -1 |
{-# OPTIONS -fglasgow-exts #-}
module ShouldCompile where
import Control.Monad.ST
import Data.STRef
-- (Modified now that we don't have result type signatures)
f:: forall s. ST s Int
f = do v <- newSTRef 5
let g :: ST s Int
-- ^ should be in scope
g = readSTRef v
g
| hvr/jhc | regress/tests/1_typecheck/2_pass/ghc/tc105.hs | mit | 308 | 0 | 10 | 93 | 73 | 39 | 34 | -1 | -1 |
-- !!! checking that special ids are correctly handled.
module ShouldCompile where
as :: [as]
as = [head as]
qualified :: [qualified]
qualified = [head qualified]
hiding :: [hiding]
hiding = [head hiding]
export :: [export]
export = [head export]
label :: [label]
label = [head label]
dynamic :: [dynamic]
dynamic ... | hvr/jhc | regress/tests/0_parse/2_pass/ghc/read024.hs | mit | 467 | 0 | 6 | 85 | 176 | 103 | 73 | 19 | 1 |
module FrontEnd.FrontEnd(
doModules,
Tc.TiData(..)
) where
import Control.Monad
import qualified Data.Map as Map
import Doc.DocLike
import FrontEnd.Exports
import FrontEnd.HsSyn
import FrontEnd.Rename
import Ho.Type
import Options
import qualified FlagDump as FD
import qualified FrontEnd.Tc.Module as Tc
... | m-alvarez/jhc | src/FrontEnd/FrontEnd.hs | mit | 1,172 | 0 | 15 | 288 | 371 | 202 | 169 | 33 | 1 |
{-# LANGUAGE ScopedTypeVariables, RankNTypes, GADTs, PolyKinds #-}
module T10670 where
import Unsafe.Coerce
import Data.Kind (Type)
data TypeRepT (a::k) where
TRCon :: TypeRepT a
data G2 c a where
G2 :: TypeRepT a -> TypeRepT b -> G2 c (c a b)
getT2 :: TypeRepT (c :: k2 -> k1 -> k) -> TypeRepT (a :: k) -> Mayb... | sdiehl/ghc | testsuite/tests/polykinds/T10670.hs | bsd-3-clause | 610 | 0 | 10 | 146 | 239 | 130 | 109 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
-- | Markdown files.
module HL.Model.Markdown where
import HL.Controller
import HL.View
import HL.View.Code
import Control.Exception
import qualified Data.Text.IO as ST
import qualified Data.Text.Lazy as L
imp... | josefs/hl | src/HL/Model/Markdown.hs | bsd-3-clause | 1,170 | 0 | 17 | 327 | 300 | 165 | 135 | 28 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE GADTs #-}
module Ringo.Generator.Internal where
import qualified Data.Map as Map
import qualified Data.Text as Text
import Database.HsSqlPpp.Syntax (ScalarExpr)
import Data.List (find)
import Data.Monoid ((<>)... | quintype/ringo | src/Ringo/Generator/Internal.hs | mit | 1,457 | 0 | 14 | 285 | 373 | 209 | 164 | 33 | 2 |
module Dagger where
import Control.Monad (liftM, liftM2)
data Dagger
= Literal Double
| Add Dagger Dagger
| Multiply Dagger Dagger
| Absolute Dagger
| Signum Dagger
| Negate Dagger
| Divide Dagger Dagger deriving (Eq, Show)
instance Num Dagger where
(+) = Add
(*) = Multiply
nega... | gafiatulin/codewars | src/6 kyu/Dagger.hs | mit | 1,008 | 0 | 13 | 258 | 445 | 239 | 206 | 31 | 5 |
{-# LANGUAGE FlexibleContexts #-}
module PrimitiveFunc where
import Control.Monad.Except
import Types
import Unpack
primitives :: (MonadError LispError m) => [(String, [LispVal] -> m LispVal)]
primitives = [ ("+", nnn (+))
, ("-", nnn (-))
, ("*", nnn (*))
, ("/", nnn div)
... | ublubu/wyascheme | src/PrimitiveFunc.hs | mit | 3,852 | 0 | 11 | 1,152 | 1,747 | 929 | 818 | 94 | 1 |
{-# OPTIONS_HADDOCK hide, prune #-}
{-# LANGUAGE RecordWildCards #-}
module Handler.Mooc.Admin.ScenarioEditor
( getAdminScenarioEditorR
, postAdminCreateScenarioR
, getScenarioProblemImgR
, getScenarioProblemGeometryR
, getScenarioProblemEditR
, postScenarioProblemAttachCriterionR
, postScen... | mb21/qua-kit | apps/hs/qua-server/src/Handler/Mooc/Admin/ScenarioEditor.hs | mit | 7,230 | 0 | 19 | 2,075 | 1,594 | 815 | 779 | 169 | 3 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ForeignFunctionInterface #-}
import Haste.App (liftIO, mkConfig, remote,
runApp, runClient,
alert, MonadIO, forkServerIO,... | ababkin/partial_inspector | src/PartialInspector.hs | mit | 3,030 | 0 | 21 | 1,077 | 659 | 350 | 309 | 54 | 4 |
{-# LANGUAGE OverloadedStrings #-}
{-|
Module : Haste.GAPI.Result
Description : Managing Results within the Google API
Copyright : (c) Jonathan Skårstedt, 2016
License : MIT
Maintainer : jonathan.skarstedt@gmail.com
Stability : experimental
Portability : Haste
This module contains functions to work on re... | nyson/haste-gapi | Haste/GAPI/Result.hs | mit | 4,399 | 0 | 15 | 989 | 1,024 | 538 | 486 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Y2016.M12.D09.Solution where
import Control.Arrow ((&&&))
import Data.Aeson
import qualified Data.ByteString.Lazy.Char8 as BL
import Data.Function (on)
import Data.List (sortBy)
import Data.Maybe (fromJust)
-- below imports available from 1HaskellADay git repository
import ... | geophf/1HaskellADay | exercises/HAD/Y2016/M12/D09/Solution.hs | mit | 3,585 | 0 | 17 | 552 | 239 | 138 | 101 | 21 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE RecordWildCards #-}
module Tests.Sodium.OnetimeAuth.Poly1305 where
import Tests.Sodium.Auth.Common
import Crypto.Sodium.OnetimeAuth.Poly1305
import Test.Tasty
tests :: TestTree
tests = testGroup "Tests.Sodium.OnetimeAuth.Poly1305" $
... | dnaq/crypto-sodium | test/Tests/Sodium/OnetimeAuth/Poly1305.hs | mit | 1,634 | 0 | 9 | 456 | 600 | 398 | 202 | 33 | 1 |
-- State
module HS11_Variation3CBN where
import Prelude hiding (lookup)
----------------
-- State Monad
----------------
type State = Int
type S a = State -> (a, State)
unitS :: a -> S a
unitS a = \s0 -> (a, s0)
bindS :: S a -> (a -> S b) -> S b
m `bindS` k = \s0 -> let (a, s1) = m s0
... | BP-HUG/presentations | 2017_march/HS11_Variation3CBN.hs | mit | 2,270 | 6 | 13 | 775 | 998 | 529 | 469 | 55 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Text.Trifecta
import Test.Hspec
import qualified Data.Map as M
import DataIni
maybeSuccess :: Result a -> Maybe a
maybeSuccess (Success a) = Just a
maybeSuccess _ = Nothing
main :: IO ()
main = hspec $ do
describe "Assignment Parsing" $
it "can parse... | NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/Chapter24/DataIni/src/Main.hs | mit | 2,095 | 0 | 21 | 698 | 542 | 270 | 272 | 55 | 1 |
{-|
Module : Priority
Copyright : (c) Kai Lindholm, 2014
License : MIT
Maintainer : megantti@gmail.com
Stability : experimental
-}
module Network.RTorrent.Priority (
TorrentPriority (..)
, FilePriority (..)
) where
import Control.DeepSeq
import Network.XmlRpc.Internals
data TorrentPriority =
... | megantti/rtorrent-rpc | Network/RTorrent/Priority.hs | mit | 1,950 | 0 | 13 | 494 | 472 | 240 | 232 | 50 | 0 |
-- Opposites Attract
-- http://www.codewars.com/kata/555086d53eac039a2a000083
module Codewars.Kata.Opposites where
inlove :: Int -> Int -> Bool
inlove a b = odd (a+b)
| gafiatulin/codewars | src/8 kyu/Opposites.hs | mit | 169 | 0 | 7 | 23 | 42 | 24 | 18 | 3 | 1 |
module DynamicVector
( DynamicVector
, new, length, append, unsafeRead, unsafeWrite, freeze, imap_
, printVector
) where
import Control.Applicative
import Data.IORef
import Data.Vector (Vector)
import Data.Vector.Mutable (IOVector)
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as VM
imp... | mcschroeder/smc | DynamicVector.hs | mit | 2,779 | 4 | 13 | 626 | 798 | 400 | 398 | 49 | 2 |
module TokenizerSpec where
import Tokenizer
import ParserTestBase
import Test.Hspec
import Text.Parsec
import System.Exit (exitFailure , exitSuccess)
ppTokenizeShouldParse :: String -> [PPToken] -> Bool
ppTokenizeShouldParse input expectedOutput =
case ppTokenize input of
Right x -> x == expectedOutput
... | Spawek/HCPParse | test/TokenizerSpec.hs | mit | 4,045 | 0 | 13 | 1,275 | 796 | 350 | 446 | 94 | 2 |
module Text.Syslog.ParserSpec where
import Text.Syslog.Parser
import Data.Time.Clock.POSIX
import Test.Hspec
spec = do
describe "Syslog Parser" $ do
it "should parse lines" $ do
let logEntry = parseSyslog "<10>123 2015-12-03T23:12:17+11:00 keiths-macbook-pro.local logplex-parse 420 - [foo bar=\"\\\\\\\"ba... | keithduncan/logplex-parse | spec/Text/Syslog/ParserSpec.hs | mit | 545 | 0 | 20 | 74 | 125 | 66 | 59 | 9 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}
module LoadStuff
( MeaningData(..)
, loadMeaningData
, InputData(..)
, loadInputData
, readMeaning
) where
import ClassyPrelude
import Prelude (read)
import Data.Inflection
import Data.Word
-- Input data for lexicon
data MeaningData = MeaningData
... | Brightgalrs/con-lang-gen | src/LoadStuff.hs | mit | 3,014 | 0 | 22 | 722 | 573 | 325 | 248 | 66 | 1 |
module HelloWorldAgain where
helloAgain :: String
helloAgain = "hello again, world"
| hdgarrood/scotty-fay | test/fay-resources2/under-a-dir/HelloWorldAgain.hs | mit | 85 | 0 | 4 | 12 | 14 | 9 | 5 | 3 | 1 |
module Game.MagicTemplates
( occMasksR
, magicsR
, shiftsR
, occMasksB
, magicsB
, shiftsB
, attackSets
, Piece (Bishop, Rook)
) where
import Data.Bits ((.|.), (.&.), shiftL, shiftR)
import Data.List (sortBy)
import Language.Haskell.TH
import Game.BoardMask
-- {{{ Occupancy masks a... | TheBB/hess | src/Game/MagicTemplates.hs | mit | 7,578 | 0 | 20 | 1,172 | 1,622 | 971 | 651 | 122 | 1 |
module NES.Emulator (emulate
, loadProgram
, decodeInstruction
, execute
) where
import Data.Word (Word8, Word16)
import Data.Bits ((.&.), (.|.), shiftL, shiftR, xor, testBit, complement)
import Control.Monad (unless, when, void)
import Co... | ksaveljev/hNES | NES/Emulator.hs | mit | 17,114 | 0 | 17 | 6,021 | 5,253 | 2,454 | 2,799 | 447 | 84 |
{-# LANGUAGE OverloadedStrings, QuasiQuotes, RecordWildCards #-}
module Main where
import Data.Aeson
import Data.Monoid (mempty, (<>))
import qualified Data.Map.Strict as M
import Data.Text (Text)
import qualified Data.Text.Encoding as T (decodeUtf8)
import Data.List (intersperse)
import qualified Data.List
import qua... | danchoi/jsonfold | Main.hs | mit | 4,128 | 0 | 14 | 905 | 1,172 | 655 | 517 | 81 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Applicative ((<|>))
import Data.Attoparsec.Text
import Data.Either (fromRight)
import Data.Foldable (foldl')
import Data.Function ((&))
import Data.Set (Se... | genos/online_problems | advent_of_code_2021/day22/Main.hs | mit | 1,548 | 0 | 14 | 449 | 636 | 353 | 283 | 40 | 1 |
-- Copyright © 2014 Bart Massey
-- [This program is licensed under the "MIT License"]
-- Please see the file COPYING in the source
-- distribution of this software for license terms.
-- Decode quoted-printable text
import Data.ByteString.Lazy as B hiding (getContents)
import Data.Char (digitToInt, isHexDigit, ord)
im... | BartMassey/qpdecode | qpdecode.hs | mit | 852 | 2 | 12 | 161 | 286 | 142 | 144 | 16 | 1 |
-- Copyright (c) 2011-14, Nicola Bonelli
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- t... | Mr-Click/PFQ | user/Haskell/Network/PFq/Lang.hs | gpl-2.0 | 15,507 | 0 | 18 | 5,700 | 4,237 | 2,235 | 2,002 | 241 | 2 |
module Parser
(
parse
) where
import Text.Parsec hiding (parse)
import qualified Text.Parsec
import Control.Monad
import Syntax
currify :: [String] -> LExpr -> LExpr
currify [] b = b
currify (x:xs) b = Lambda x (currify xs b)
tok :: Parsec String () a -> Parsec String () a
tok p = do
spaces
r <- p
s... | iemxblog/ulci | src/Parser.hs | gpl-2.0 | 989 | 0 | 9 | 277 | 447 | 216 | 231 | 43 | 1 |
module Shapes
( Point(..)
, Shape(..)
, area
, nudge
, baseCircle
, baseRect
) where
data Point = Point Float Float deriving (Show)
data Shape = Circle Point Float | Rectangle Point Point deriving (Show)
area :: Shape -> Float
area (Circle _ r) = pi * r ^ 2
area (Rectangle (Point x1 y1) (Point x2 y2)) =... | medik/lang-hack | Haskell/LearnYouAHaskell/c07/Shapes.hs | gpl-3.0 | 738 | 0 | 9 | 162 | 397 | 211 | 186 | 19 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Prover
(proveImpl)
where
import qualified Data.Set as S
import qualified Data.Map as M
import Data.Maybe
import Data.SBV
import Control.Monad
import PrettyPrint
import Collect
import Transformer(toPrenexNF, mkFreshExpr)
--In the proveImpl we prove the implication.
--Fir... | Ferdinand-vW/Wlp-verification-engine | src/Prover.hs | gpl-3.0 | 5,574 | 0 | 18 | 1,420 | 2,289 | 1,108 | 1,181 | 134 | 3 |
module Util(stringToByteString,
byteStringToString,
dbExec,
dbQuery,
hashPassword,
runErrorable,
Errorable) where
import qualified Data.ByteString as BS
import Data.Char
import qualified Data.Text as DT
import qualified Database.SQLite3 as DS
impo... | sos22/himap | Util.hs | gpl-3.0 | 1,629 | 0 | 19 | 410 | 559 | 290 | 269 | 43 | 2 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeFamilies #-}
module Vdv.Exclusions(exclusionsOpt,Exclusions,ElementPath,foldrExclusion,parseExclusions) where
import ClassyPrelude
import qualified Data.Attoparsec.Text as AP
import Options.Applicative(eitherReader,ReadM)
import Vdv.Attoparsec
import Vdv.Ele... | pmiddend/vdvanalyze | src/Vdv/Exclusions.hs | gpl-3.0 | 886 | 0 | 12 | 100 | 262 | 147 | 115 | 17 | 1 |
{-# LANGUAGE RankNTypes #-}
module TB.TypesForProgrammingAndReasoning.Examples (
Fix,
FList (..),
FTree (..),
cata,
listSum,
treeSum
) where
newtype Fix o = Wrap (o (Fix o))
data FList a b = Cons a b | Nil
deriving (Eq, Show)
data FTree a b = N b b | L a
deriving (Eq, Show)
-- | FList functor
--
--... | adarqui/ToyBox | haskell/voigtlaender/types-for-programming-and-reasoning/src/TB/TypesForProgrammingAndReasoning/Examples.hs | gpl-3.0 | 2,152 | 0 | 17 | 582 | 846 | 462 | 384 | 41 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Sound.Tidal.UITest where
import TestUtils
import Test.Microspec
import Prelude hiding ((<*), (*>))
import qualified Data.Map.Strict as Map
-- import Sound.Tidal.Pattern
import Sound.Tidal.Control
import Sound.Tidal.Core
import Sound.Tidal.Params
import Sound.Tidal.ParseBP
... | bgold-cosmos/Tidal | test/Sound/Tidal/UITest.hs | gpl-3.0 | 15,712 | 59 | 26 | 5,561 | 4,907 | 2,566 | 2,341 | 327 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/WorkflowTemplates/Instantiate.hs | mpl-2.0 | 7,807 | 0 | 16 | 1,450 | 803 | 479 | 324 | 121 | 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 #-}
-- ... | olorin/amazonka | amazonka-ml/gen/Network/AWS/MachineLearning/CreateDataSourceFromRedshift.hs | mpl-2.0 | 10,546 | 0 | 13 | 1,991 | 981 | 614 | 367 | 115 | 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/CreativeGroups/Update.hs | mpl-2.0 | 3,416 | 0 | 14 | 760 | 406 | 242 | 164 | 64 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/GetGoogleServiceAccount.hs | mpl-2.0 | 6,504 | 0 | 17 | 1,473 | 864 | 506 | 358 | 123 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
-- Modul... | brendanhay/gogol | gen/src/Gen/Types/Data.hs | mpl-2.0 | 3,661 | 1 | 12 | 1,381 | 917 | 515 | 402 | 94 | 2 |
--
-- Copyright 2017-2018 Azad Bolour
-- Licensed under GNU Affero General Public License v3.0 -
-- https://github.com/azadbolour/boardgame/blob/master/LICENSE.md
--
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE DeriveGeneric #-}
module Bolour.Util.VersionStamped (
Versi... | azadbolour/boardgame | haskell-server/src/Bolour/Util/VersionStamped.hs | agpl-3.0 | 1,236 | 0 | 9 | 195 | 317 | 176 | 141 | 27 | 1 |
module Graphics.HIE.Persist where
import qualified Data.ByteString as BS
import Graphics.HIE.Session
serializeHie :: HieValues -> BS.ByteString
serializeHie = undefined
deserializeHie :: BS.ByteString -> Maybe HieValues
deserializeHie = undefined
| plcplc/hie | src/Graphics/HIE/Persist.hs | agpl-3.0 | 251 | 0 | 6 | 31 | 56 | 34 | 22 | 7 | 1 |
module ChapterExercises where
import Prelude hiding (Left, Right)
data Nope a =
NopeDotJpg
instance Functor Nope where
fmap _ _ = NopeDotJpg
instance Applicative Nope where
pure _ = NopeDotJpg
_ <*> _ = NopeDotJpg
instance Monad Nope where
return = pure
(>>=) _ _ = NopeDotJpg
data PhhhbbtttEither a b ... | thewoolleyman/haskellbook | 18/07/eric/ChapterExercises.hs | unlicense | 683 | 0 | 8 | 163 | 285 | 148 | 137 | 26 | 0 |
chain :: (Integral a) => a -> [a]
chain 1 = [1]
chain n
| even n = n:chain (n `div` 2)
| odd n = n:chain (n * 3 + 1)
numLongChains :: Int
numLongChains = length (filter (\xs -> length xs > 15) (map chain [1..100]))
| tokyo-jesus/university | src/haskell/higherOrderFunctions/chain.hs | unlicense | 221 | 0 | 11 | 54 | 145 | 74 | 71 | 7 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Int
import qualified Data.Text as T
import qualified Data.Text.Format as F
import Database.MySQL.Simple
import Options.Applicative
import Options.Applicative.Types
import Util... | erochest/get-links | AlterLinks.hs | apache-2.0 | 1,248 | 0 | 10 | 377 | 285 | 151 | 134 | 32 | 1 |
{-# LANGUAGE FlexibleContexts #-}
-----------------------------------------------------------------------------
-- Copyright 2019, Ideas project team. This file is distributed under the
-- terms of the Apache License 2.0. For more information, see the files
-- "LICENSE.txt" and "NOTICE.txt", which are included in t... | ideas-edu/ideas | src/Ideas/Common/Strategy/Derived.hs | apache-2.0 | 4,452 | 0 | 14 | 1,119 | 1,484 | 786 | 698 | 72 | 2 |
fib 0 a b = b
fib n a b = fib (n-1) (a+b) a
ans n = fib n 1 1
main = do
n' <- getLine
let n = read n' :: Int
o = ans n
print o
| a143753/AOJ | ALDS1_10_A.hs | apache-2.0 | 141 | 0 | 10 | 55 | 102 | 49 | 53 | 8 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QDialog_h.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... | keera-studios/hsQt | Qtc/Gui/QDialog_h.hs | bsd-2-clause | 62,099 | 0 | 18 | 13,846 | 21,191 | 10,206 | 10,985 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Grammata.Base.Html (lit, emph, today, para, heading, doc) where
import Grammata.Types
import Data.Monoid
import Grammata.Base.Common (todayS)
import Data.ByteString.Builder (Builder, charUtf8, stringUtf8, lazyByteString)
-- import Grammata.Chart
import Grammata.Util (showInte... | jgm/grammata | Grammata/Base/Html.hs | bsd-2-clause | 1,731 | 0 | 11 | 312 | 519 | 265 | 254 | 32 | 1 |
module Main where
import Control.Monad.Loops (whileM_)
import qualified Data.Vector.Storable as V
import qualified Graphics.UI.GLFW as GLFW
import Graphics.GL.Low
-- GLFW will be the shell of the demo
main = do
GLFW.init
GLFW.windowHint (GLFW.WindowHint'ContextVersionMajor 3)
GLFW.windowHint (GLFW.WindowHint'C... | evanrinehart/lowgl | examples/hello/Main.hs | bsd-2-clause | 1,527 | 0 | 17 | 329 | 436 | 210 | 226 | 42 | 2 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.StringQueries
-- Copyright : (c) Sven Panne 2003
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer : sven_panne@yahoo.com
-- Stability : provis... | OS2World/DEV-UTIL-HUGS | libraries/Graphics/Rendering/OpenGL/GL/StringQueries.hs | bsd-3-clause | 2,104 | 0 | 10 | 305 | 373 | 212 | 161 | 36 | 4 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE RankNTypes #-}
{- |
Module : Verifier.SAW.ExternalFormat
Copyright : Galois, Inc. 2012-2015
License : BSD3
Maintainer : huffman@galois.com
Stability : experimental
Portability : non-portable (language ext... | iblumenfeld/saw-core | src/Verifier/SAW/ExternalFormat.hs | bsd-3-clause | 6,087 | 0 | 19 | 1,919 | 2,402 | 1,221 | 1,181 | 113 | 29 |
import Common.Utils (isqrt)
import Control.Monad (forM_, when)
import Data.Array.Unboxed
import Data.Array.ST
import Control.Monad.ST
eratos :: Int -> UArray Int Int
eratos n = runSTUArray $ do
isPrime <- newListArray (1, n) (repeat True) :: ST s (STUArray s Int Bool)
minPrimePart <- newListArray (1, n) [1 ..... | foreverbell/project-euler-solutions | src/211.hs | bsd-3-clause | 1,657 | 0 | 29 | 645 | 656 | 322 | 334 | 40 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE OverlappingInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInst... | wdanilo/algebraic | src/Math/Coordinate/Cartesian.hs | bsd-3-clause | 10,838 | 0 | 14 | 2,527 | 3,800 | 2,025 | 1,775 | 265 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
-- | Install GHC/GHCJS and Cabal.
module Stack.SetupCmd
( setup
, setupParser
, SetupCmdOpts(..)
) where
im... | martin-kolinek/stack | src/Stack/SetupCmd.hs | bsd-3-clause | 5,340 | 0 | 19 | 1,533 | 1,081 | 565 | 516 | 138 | 3 |
import Test
main = testMain
| paolino/hft | TestMain.hs | bsd-3-clause | 29 | 0 | 4 | 6 | 9 | 5 | 4 | 2 | 1 |
{-|
Copyright : (c) Dave Laing, 2017
License : BSD3
Maintainer : dave.laing.80@gmail.com
Stability : experimental
Portability : non-portable
-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
... | dalaing/type-systems | src/Fragment/Int/Ast/Pattern.hs | bsd-3-clause | 1,705 | 0 | 9 | 302 | 491 | 263 | 228 | 46 | 0 |
{-# LANGUAGE OverloadedStrings #-}
------------------------------------------------------------------------------
-- |
-- Module : Data.XML.DTD.Parse
-- Copyright : Suite Solutions Ltd., Israel 2011
-- (c) 2013 Montez Fitzpatrick
--
-- Maintainer : Montez Fitzpatrick <montezf@gmail.com>
-- Por... | m15k/hs-dtd-text | Data/XML/DTD/Parse.hs | bsd-3-clause | 19,185 | 0 | 15 | 4,553 | 4,438 | 2,390 | 2,048 | 301 | 5 |
sumOfDigit :: Integer -> Integer
sumOfDigit = sum . map (read . (\x -> [x])) . show
main = print $ maximum [ sumOfDigit (a^b) | a <- [1 .. 99], b <- [1 .. 99] ]
| foreverbell/project-euler-solutions | src/56.hs | bsd-3-clause | 164 | 0 | 12 | 40 | 97 | 53 | 44 | 3 | 1 |
module Validations.Types
( module Validations.Types.PhoneNumber
) where
import Validations.Types.PhoneNumber
| mavenraven/validations-checkers | src/Validations/Types.hs | bsd-3-clause | 114 | 0 | 5 | 14 | 21 | 14 | 7 | 3 | 0 |
{-# OPTIONS_GHC -fwarn-unused-imports #-}
{-# LANGUAGE TemplateHaskell, ScopedTypeVariables, ViewPatterns, FlexibleContexts #-}
module Generics.Instant.Derive
(derive, derives, deriveWith, deriveCon, deriveConWith, deriveRep, deriveRepWith) where
import Generics.Instant
import Language.Haskell.TH
import Language.... | konn/derive-IG | Generics/Instant/Derive.hs | bsd-3-clause | 6,141 | 0 | 22 | 1,562 | 2,882 | 1,467 | 1,415 | 127 | 3 |
{-# LANGUAGE DoAndIfThenElse #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{- |
Since version 0.7 Spock features a new routing system that enables more type-safe... | nmk/Spock | src/Web/Spock/Simple.hs | bsd-3-clause | 7,903 | 0 | 15 | 1,890 | 1,649 | 882 | 767 | 117 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative ((<$>))
#endif
#if !(MIN_VERSION_base(4,11,0))
import Data.Monoid ((<>))
#endif
import qualified Data.Text as T
import qualified Graphics.Vty as V
import qualified Brick.Main as M
import... | sjakobi/brick | programs/BorderDemo.hs | bsd-3-clause | 2,497 | 0 | 14 | 698 | 707 | 416 | 291 | 81 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Semicircle where
import Graphics.Blank
import Wiki -- (578,200)
main :: IO ()
main = blankCanvas 3000 $ \ context -> do
send context $ do
beginPath();
arc(288, 75, 70, 0, pi, False);
closePath();
lineWidth 5;
fillStyle "red";
... | ku-fpg/blank-canvas | wiki-suite/Semicircle.hs | bsd-3-clause | 458 | 0 | 13 | 135 | 155 | 77 | 78 | 17 | 1 |
{-# LANGUAGE ScopedTypeVariables, QuasiQuotes, TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-}
module XPathNoAnnotation where
import Language.XHaskell
[xh|
data Html = Html Head Body
data Head = Head
data Body = Body (Star P)
data P = P deriving Show
class XPath a b where
(//) :: a -> b -> ... | luzhuomi/xhaskell | test/XPathNoAnnotation.hs | bsd-3-clause | 965 | 0 | 4 | 275 | 17 | 12 | 5 | 4 | 0 |
module SkeletonTemplates.FoldScalar where
import AstMappings
import qualified AbsCAL as C
import qualified AbsRIPL as R
import SkeletonTemplates.CalTypes
import Types
foldScalarActor :: String
-> Integer
-> Dimension
-> R.TwoVarFun
-> C.Type
... | robstewart57/ripl | src/SkeletonTemplates/FoldScalar.hs | bsd-3-clause | 3,951 | 0 | 21 | 1,489 | 1,092 | 559 | 533 | 116 | 1 |
module Candide.Generators where
import Control.Applicative
import Test.QuickCheck
import Vaultaire.Types
instance Arbitrary SimplePoint where
arbitrary = simpleStream
simpleStream :: Gen SimplePoint
simpleStream = SimplePoint <$> resize 10000 arbitrary
<*... | anchor/candide | lib/Candide/Generators.hs | bsd-3-clause | 399 | 0 | 8 | 132 | 74 | 39 | 35 | 10 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE DoAndIfThenElse #-}
{-# LANGUAGE NoMo... | arirahikkala/yaml-with-class | src/Text/YamlPickle.hs | bsd-3-clause | 14,277 | 0 | 22 | 3,604 | 4,147 | 2,161 | 1,986 | -1 | -1 |
{-# LANGUAGE TupleSections ,ViewPatterns ,NoMonomorphismRestriction ,BangPatterns ,ScopedTypeVariables #-}
module Flat.Instances.Util
( module F
-- sizeList
-- , decodeList
-- , encodeList
, encodeArray
)
where
import Flat.Class as F
import Flat.Decoder ... | tittoassini/flat | src/Flat/Instances/Util.hs | bsd-3-clause | 1,154 | 0 | 7 | 308 | 97 | 71 | 26 | 11 | 1 |
import Test.Tasty
import Test.Tasty.HUnit
import System.Hclip
main = defaultMain tests
tests :: TestTree
tests = testGroup "Tests" [unitTests]
unitTests = testGroup "Unit tests"
[ testCase "Clear Clipboard" $ do
setClipboard "Haskell"
clearClipboard
contents <- getClipboard
... | jetho/Hclip | tests/Tasty.hs | bsd-3-clause | 1,017 | 0 | 12 | 328 | 255 | 117 | 138 | 34 | 1 |
{- Textures.hs;
Mun Hon Cheong (mhch295@cse.unsw.edu.au) 2005 - original author
Garrett Bluma (gb@garrettbluma.com) 2012 - modified
This module is for loading textures
-}
module Textures where
import Graphics.Rendering.OpenGL
import PNG (readPng)
import Data.Word (Word8)
import Foreign.Mars... | gbluma/opengl1 | src/Textures.hs | bsd-3-clause | 2,058 | 0 | 13 | 428 | 527 | 266 | 261 | 35 | 1 |
import Web.Scotty (scotty)
import Control.Concurrent.STM.TVar (newTVarIO)
import Server (gameServer, GameState (..))
import Sartorial.World (freshWorld, addRoom)
import Sartorial.Room (freshRoom)
import Data.Map (empty)
main = do
let (... | MichaelBaker/sartorial-client | vendor/sartorial-server/vendor/sartorial-client/vendor/sartorial-server/src/Main.hs | mit | 477 | 0 | 10 | 131 | 131 | 72 | 59 | 10 | 1 |
{-# LANGUAGE TypeFamilies #-}
module Tuura.Graph (
Graph (..), fromList, vertices, clique, overlayList, connectList, printGraph,
GraphExpr (..), printGraphExpr
) where
import Tuura.Relation (Relation (..))
import qualified Tuura.Relation as Relation
class Graph g where
type Vertex g
empty :: g
... | snowleopard/process-mining | src/Tuura/Graph.hs | mit | 2,569 | 0 | 11 | 699 | 1,028 | 540 | 488 | 65 | 4 |
{-|
Re-export the modules of the hledger-chart program.
-}
module Hledger.Chart (
module Hledger.Chart.Main,
module Hledger.Chart.Options,
tests_Hledger_Chart
)
where
import Test.HUnit
import Hledger.Chart.Main
import Hledger.Chart.Options
... | Lainepress/hledger | hledger-chart/Hledger/Chart.hs | gpl-3.0 | 448 | 0 | 6 | 123 | 60 | 39 | 21 | 10 | 1 |
-- | test cases collected from some "Crash bugs"
{-# language OverloadedStrings #-}
import Control.Concurrent (threadDelay)
import Control.Monad (forM_)
import Sound.Tidal.Context
main = do
tidal <- startTidal (superdirtTarget {oLatency = 0.1, oAddress = "127.0.0.1", oPort = 57120}) (defaultConfig {cFrameTimespa... | bgold-cosmos/Tidal | test/dontcrash.hs | gpl-3.0 | 1,779 | 1 | 19 | 468 | 432 | 226 | 206 | 26 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/ResetImageAttribute.hs | mpl-2.0 | 3,775 | 0 | 9 | 813 | 464 | 283 | 181 | 58 | 1 |
{-# LANGUAGE PackageImports #-}
import "NewsPrint" Application (getApplicationDev)
import Network.Wai.Handler.Warp
(runSettings, defaultSettings, settingsPort)
import Control.Concurrent (forkIO)
import System.Directory (doesFileExist, removeFile)
import System.Exit (exitSuccess)
import Control.Concurrent (threadDel... | andrebask/newsprint | src/UserInterface/NewsPrint/devel.hs | apache-2.0 | 710 | 0 | 10 | 123 | 187 | 101 | 86 | 23 | 2 |
{-
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... | alphalambda/codeworld | codeworld-compiler/test/testcases/wrongTypeAnnotation/source.hs | apache-2.0 | 726 | 0 | 6 | 135 | 44 | 25 | 19 | 6 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Typechecking class declarations
-}
{-# LANGUAGE CPP #-}
module TcClassDcl ( tcClassSigs, tcClassDecl2,
findMethodBind, instantiateMethod,
tcClassMinimalDef,
HsS... | vTurbine/ghc | compiler/typecheck/TcClassDcl.hs | bsd-3-clause | 19,438 | 0 | 15 | 6,321 | 3,409 | 1,789 | 1,620 | 255 | 2 |
-- |
-- Module : Database.Oracle.OCIConstants
-- Copyright : (c) 2004 Oleg Kiselyov, Alistair Bayley
-- License : BSD-style
-- Maintainer : oleg@pobox.com, alistair@abayley.org
-- Stability : experimental
-- Portability : non-portable
-- Contains CInt equivalents of the #defines in the oc... | bagl/takusen-oracle | Database/Oracle/OCIConstants.hs | bsd-3-clause | 3,965 | 0 | 6 | 820 | 579 | 370 | 209 | 103 | 1 |
module PackageTests.BuildDeps.InternalLibrary2.Check where
import qualified Data.ByteString.Char8 as C
import PackageTests.PackageTester
import System.FilePath
import Test.HUnit
suite :: FilePath -> FilePath -> Test
suite ghcPath ghcPkgPath = TestCase $ do
let spec = PackageSpec ("PackageTests" </> "BuildDeps" <... | jwiegley/ghc-release | libraries/Cabal/cabal/tests/PackageTests/BuildDeps/InternalLibrary2/Check.hs | gpl-3.0 | 994 | 0 | 15 | 160 | 274 | 135 | 139 | 18 | 1 |
{-
Copyright 2015 Google Inc. 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 applicable law or a... | xwysp/codeworld | codeworld-base/src/GHC/IO/Encoding/UTF16.hs | apache-2.0 | 757 | 0 | 4 | 136 | 27 | 21 | 6 | 4 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Heist.Compiled.Tests
( tests
) where
import Blaze.ByteString.Builder
import Control.Error
import Control.Lens
import Control.Monad.Trans
import Data.Map.Syntax
import Data.Monoid
import Test.Framework (... | 23Skidoo/heist | test/suite/Heist/Compiled/Tests.hs | bsd-3-clause | 4,682 | 0 | 18 | 1,273 | 972 | 480 | 492 | 94 | 1 |
import Test.Cabal.Prelude
main = setupAndCabalTest $ do
skipUnless =<< ghcVersionIs (>= mkVersion [8,1])
r <- fails $ setup' "configure" []
assertOutputContains "MissingReq" r
return ()
| mydaum/cabal | cabal-testsuite/PackageTests/Backpack/Fail1/setup.test.hs | bsd-3-clause | 202 | 0 | 12 | 41 | 73 | 35 | 38 | 6 | 1 |
module ShouldCompile where
{-|
main=undefined
-}
main = undefined
| olsner/ghc | testsuite/tests/haddock/should_compile_noflag_haddock/haddockC008.hs | bsd-3-clause | 69 | 0 | 4 | 12 | 10 | 7 | 3 | 2 | 1 |
import Data.Numbers.Primes
largestPrimeFactor :: Integral a => a -> a
largestPrimeFactor = last . primeFactors
answer = largestPrimeFactor 600851475143
| cjhveal/Euler | 3.hs | mit | 154 | 0 | 6 | 21 | 40 | 21 | 19 | 4 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module SerializationSpec (spec) where
import qualified Data.ByteString as BS
import Data.DeriveTH (derives, makeArbitrary)
import qualified Data.Text as T
import Database.Persist.Sql
import Model.Types
import Prelude
import Test.H... | fpco/schoolofhaskell.com | tests/SerializationSpec.hs | mit | 1,574 | 0 | 10 | 351 | 407 | 219 | 188 | -1 | -1 |
module Main where
import System.Process (StdStream(..),createProcess,waitForProcess,shell,std_out)
import System.IO (hGetContents)
import Text.Regex (matchRegex,mkRegex)
import Data.List (intercalate,unfoldr)
import System.Environment (getArgs)
import System.Console.GetOpt (OptDescr(..),ArgDescr(..),ArgOrder(..),getO... | horia141/bachelor-thesis | dev/LineBR/Main.hs | mit | 3,343 | 0 | 21 | 1,185 | 1,009 | 540 | 469 | 62 | 6 |
import Prelude
import Development.Shake
( cmd,
shakeArgs,
shakeOptions,
getDirectoryFiles,
(%>),
need,
phony,
putInfo,
removeFilesAfter,
want )
import Development.Shake.FilePath ( (-<.>), (</>), dropDirectory1 )
main :: IO ()
main = shakeArgs shakeOptions $ do... | write-you-a-scheme-v2/scheme | Build.hs | mit | 1,113 | 0 | 17 | 299 | 369 | 195 | 174 | 32 | 1 |
module Main where
import Test.Tasty (defaultMain, testGroup)
import qualified Data.Bson.Binary.Tests
import qualified Data.Bson.Instances.Tests
import qualified Data.Bson.Utils.Tests
main :: IO ()
main = defaultMain . testGroup "Tests" $
[ Data.Bson.Binary.Tests.tests
, Data.Bson.Instances.Tests.tests
, ... | lambda-llama/bresson | tests/Tests.hs | mit | 354 | 0 | 7 | 53 | 91 | 60 | 31 | 10 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- | Testing module to play with logging.
module Main where
import Universum
#if ( __GLASGOW_HASKELL__ >= 802 )
import Control.Monad.Trans.Control (MonadBaseControl)
#e... | serokell/log-warper | examples/Playground.hs | mit | 3,256 | 0 | 15 | 807 | 696 | 346 | 350 | -1 | -1 |
{-# LANGUAGE TypeSynonymInstances #-}
-- Copyright (C) 2014 Google Inc. 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-... | MostAwesomeDude/gemstone | Gemstone/Drawable.hs | mit | 1,022 | 0 | 11 | 175 | 166 | 90 | 76 | -1 | -1 |
-- Copyright © 2013 Bart Massey
-- [This program is licensed under the "MIT License"]
-- Please see the file COPYING in the source
-- distribution of this software for license terms.
module Roman (Roman(..), toRoman, fromRoman, romanChars)
where
import qualified Text.Numeral.Roman as R (toRoman, fromRoman)
ro... | BartMassey/hseq | Roman.hs | mit | 814 | 0 | 10 | 164 | 222 | 122 | 100 | 18 | 2 |
module Main where
import Data.List
import Data.Char
-- import qualified Data.Map as Map
import Control.Monad
main = interact respondPalindromes
respondPalindromes :: String -> String
respondPalindromes =
unlines .
map (\xs->if isPal xs then "palindrome" else "not a palindrome.") .
lines
isPal :: String -> Boo... | sol2man2/Learn-You-A-Haskell-For-Great-Good | src/palindrome.hs | mit | 352 | 0 | 11 | 64 | 96 | 53 | 43 | 12 | 2 |
--
-- Graphics.Wavefront.Checks
-- Executable containing checks and tests for the modules in this package
--
-- Jonatan H Sundqvist
-- February 24 2015
--
-- TODO | - Use QuickCheck (?)
-- - Full coverage
-- - Benchmarking
-- SPEC | -
-- -
module Graphics.WaveFront.Checks where
------------... | SwiftsNamesake/3DWaves | test/Checks.hs | mit | 4,537 | 0 | 19 | 813 | 863 | 452 | 411 | 51 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.