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 DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-sqladmin/gen/Network/Google/Resource/SQL/Databases/Patch.hs | mpl-2.0 | 5,820 | 0 | 21 | 1,478 | 941 | 547 | 394 | 136 | 1 |
{- |
Module : $Header$
Description : Property tests for timespans.
Copyright : (c) plaimi 2014
License : AGPL-3
Maintainer : tempuhs@plaimi.net
-} module Tempuhs.Props.Timespan where
import Test.Framework
(
Test,
testGroup,
)
import Test.Framework.Providers.QuickCheck2
(
testProperty,
)... | plaimi/tempuhs-server | prop/Tempuhs/Props/Timespan.hs | agpl-3.0 | 950 | 0 | 8 | 216 | 165 | 98 | 67 | 24 | 1 |
{-# LANGUAGE DataKinds #-}
module Main where
-- Imports ---------------------------------------------------------------------
import Auth
import Relude
import Servant
import qualified Data.ByteString.Char8 as BS8
import qualified Data.Text as T
--port qualified Network.HTTP.Types as W
impor... | bsummer4/gcal | src/Main.hs | agpl-3.0 | 1,422 | 0 | 12 | 329 | 356 | 188 | 168 | -1 | -1 |
module PrimeNumber where
isPrime :: Int -> Bool
isPrime 1 = False
isPrime 2 = True
isPrime 3 = True
isPrime k = null [ x | x <- [2 .. (1 + (floor $ sqrt $ fromIntegral k))], k `mod` x == 0 ]
| ice1000/OI-codes | codewars/101-200/is-prime-number.hs | agpl-3.0 | 193 | 0 | 14 | 47 | 100 | 54 | 46 | 6 | 1 |
module Braxton.A284435 (a284435) where
import Helpers.BraxtonHelper (enumerateSequences, SymmetricRelation(..), ReflexiveRelation(..))
a284435 n = length $ enumerateA284435 n n
enumerateA284435 = enumerateSequences Reflexive NonSymmetric product
-- (1,1,2,2,4,4,4,48,144,144...)
-- Counts A282193
| peterokagey/haskellOEIS | src/Braxton/A284435.hs | apache-2.0 | 298 | 0 | 6 | 29 | 66 | 39 | 27 | 4 | 1 |
module Main where
import Codec.Sarsi (Event (..), Level (..), Location (..), Message (..))
import Control.Concurrent.Async (async, cancel)
import Control.Concurrent.STM (atomically)
import Control.Concurrent.STM.TBQueue (newTBQueue, readTBQueue)
import Control.Concurrent.STM.TVar (TVar, modifyTVar', newTVar, readTVar,... | aloiscochard/sarsi | sarsi-nvim/Main.hs | apache-2.0 | 12,234 | 0 | 23 | 3,125 | 4,738 | 2,392 | 2,346 | 272 | 10 |
import System.Environment
import Text.Read (readMaybe)
joinTuple :: Monad m => (m a, m b) -> m (a, b)
joinTuple (a', b') = do
a <- a'
b <- b'
return (a, b)
addMaybes :: Num a => Maybe a -> Maybe a -> Maybe a
addMaybes a b = uncurry (+) <$> joinTuple (a, b)
main :: IO ()
main = ge... | rebeccaskinner/erl_m | examples/example_maybe.hs | apache-2.0 | 408 | 0 | 12 | 122 | 209 | 109 | 100 | 12 | 1 |
module Model where
import Prelude
import Yesod
import Data.Text (Text)
import Database.Persist.Quasi
import Data.Time.Clock
-- You can define all of your database entities in the entities file.
-- You can find more information on persistent and how to declare entities
-- at:
-- http://www.yesodweb.com/book/persistent... | madebyjeffrey/socrsite | Model.hs | bsd-2-clause | 433 | 0 | 8 | 58 | 65 | 38 | 27 | -1 | -1 |
{-# LANGUAGE DeriveTraversable #-}
module Data.Propagator.Supported where
import Control.Applicative
import Data.HashSet
import Data.Propagator.Class
import Data.Propagator.Name
data Supported a = Supported !(HashSet Name) a
deriving (Functor, Foldable, Traversable, Show)
instance Eq a => Eq (Supported a) where
... | ekmett/propagators | src/Data/Propagator/Supported.hs | bsd-2-clause | 1,918 | 0 | 13 | 452 | 811 | 410 | 401 | 60 | 0 |
{-# LANGUAGE TemplateHaskell, BangPatterns #-}
{-# 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 fo... | apyrgio/snf-ganeti | test/hs/Test/Ganeti/Query/Query.hs | bsd-2-clause | 16,213 | 0 | 23 | 4,036 | 3,963 | 2,056 | 1,907 | 278 | 7 |
{-# LANGUAGE LiberalTypeSynonyms, UnboxedTuples, ScopedTypeVariables, Rank2Types #-}
module Data.TrieMap.TrieKey.Projection (MapMaybe, MapEither, Project(..), mapMaybeM, mapEitherM, both, both') where
import Data.TrieMap.Sized
import Data.TrieMap.TrieKey.Subset
type MapMaybe f a b = f a -> Maybe (f b)
type MapEither ... | lowasser/TrieMap | Data/TrieMap/TrieKey/Projection.hs | bsd-3-clause | 1,594 | 1 | 13 | 426 | 815 | 419 | 396 | 34 | 1 |
-- Copyright (c) 2017-2018, Travis Bemann
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- o Redistributions of source code must retain the above copyright notice, this
-- list of con... | tabemann/amphibian | src/Network/IRC/Client/Amphibian/Log.hs | bsd-3-clause | 9,765 | 0 | 17 | 2,816 | 2,336 | 1,192 | 1,144 | 209 | 5 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS_GHC -Wall #-}
{-# OPTIONS_GHC -fno-warn-unused-... | conal/reification-rules | src/ReificationRules/Exp.hs | bsd-3-clause | 9,559 | 0 | 19 | 2,554 | 2,622 | 1,382 | 1,240 | -1 | -1 |
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-}
module Text.XML.ToJSON
(
{-| This library provide a way to convert xml to json.
Further more, by combining with aeson's parsing facility, it provide a way to parse xml to haskell data type.
-}
xmlToJSON
, parseXML
, JSONParseError(JSONParseErro... | yihuang/xml2json | Text/XML/ToJSON.hs | bsd-3-clause | 3,268 | 0 | 14 | 710 | 821 | 456 | 365 | 69 | 5 |
--------------------------------------------------------------------
-- |
-- Module : Text.Feed.Types
-- Copyright : (c) Galois, Inc. 2008
-- License : BSD3
--
-- Maintainer: Sigbjorn Finne <sof@galois.com>
-- Stability : provisional
-- Portability:
--
--------------------------------------------------------------... | haskell-pkg-janitors/feed | Text/Feed/Types.hs | bsd-3-clause | 1,397 | 0 | 8 | 241 | 188 | 122 | 66 | 23 | 0 |
{-# LANGUAGE OverloadedStrings, RecordWildCards #-}
module DB.Deck.Queries where
import Prelude hiding (id)
import Control.Monad.IO.Class (liftIO)
import Data.Functor ((<$>))
import Data.Maybe (listToMaybe)
import Data.Text.Lazy (Text)
import Database.PostgreSQL.Simple
import Debug.Trace
import We... | ppseafield/backend-flashcard | src/DB/Deck/Queries.hs | bsd-3-clause | 2,331 | 0 | 11 | 521 | 586 | 309 | 277 | 38 | 2 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeOperators #-}
module TypeFamilies where
import Opaleye.Internal.TypeFamilies
data (:~) a b where
Eq :: (:~) a a
-- If it compiles, it works
tests :: ()
tests = ()
where _ = Eq :: a :~ (Pure :<$> Id :<| a :<| b)
_ = Eq :: a :~ (Id :<| a)
_ = Eq :: (... | WraithM/haskell-opaleye | Test/TypeFamilies.hs | bsd-3-clause | 603 | 0 | 13 | 211 | 274 | 154 | 120 | 16 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
module Main
(
main
) where
import LaTeXGrapher.Math
import LaTeXGrapher.Data.Function
import LaTeXGrapher.Data.Context
import LaTeXGrapher.Data.Markup
import LaTeXGrapher.Parser
import LaTeXGrapher.Parser.Expression
import LaTeXGrapher.Output
import LaTeXGra... | fryguybob/LaTeXGrapher | src/Main.hs | bsd-3-clause | 3,183 | 0 | 16 | 942 | 1,089 | 555 | 534 | 88 | 3 |
module Language.GDL.Query
( query, qextract
, instantiate
) where
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as M
import Data.Maybe
import Data.STRef
import Control.Monad
import Control.Monad.ST
import Language.GDL.Syntax
import... | ian-ross/ggp | Language/GDL/Query.hs | bsd-3-clause | 3,501 | 0 | 14 | 755 | 1,530 | 768 | 762 | 79 | 3 |
-- | The gists API as described at <http://developer.github.com/v3/gists/>.
module Github.Gists (
gists
,gists'
,gist
,gist'
,module Github.Data
) where
import Github.Data
import Github.Private
-- | The list of all gists created by the user
--
-- > gists' (Just ("github-username", "github-password")) "mike-burns"
... | kfish/github | Github/Gists.hs | bsd-3-clause | 976 | 0 | 10 | 163 | 210 | 118 | 92 | 16 | 1 |
{-# LANGUAGE CPP, NondecreasingIndentation, ScopedTypeVariables #-}
-- -----------------------------------------------------------------------------
--
-- (c) The University of Glasgow, 2005-2012
--
-- The GHC API
--
-- -----------------------------------------------------------------------------
module ETA.Main.GHC ... | pparkkin/eta | compiler/ETA/Main/GHC.hs | bsd-3-clause | 56,273 | 4 | 28 | 15,184 | 10,181 | 5,512 | 4,669 | -1 | -1 |
module Algebra.Structures.UFD
( module Algebra.Structures.IntegrallyClosedDomain
, UFD(..)
) where
import Algebra.Structures.IntegrallyClosedDomain
class IntegrallyClosedDomain a => UFD a
| Alex128/abstract-math | src/Algebra/Structures/UFD.hs | bsd-3-clause | 204 | 0 | 6 | 33 | 43 | 26 | 17 | -1 | -1 |
module Data.Bool.Kleisli (
allM,
anyM,
orM,
andM,
kleisify,
(<.>)
) where
import Control.Monad
import Control.Monad.Trans.Maybe
import Data.Maybe
boolToMaybe :: Monad m => Bool -> m (Maybe ())
boolToMaybe True = return $ Just ()
boolToMaybe False = return Nothing
infixr 4 <.>
(<.>) :: (Applicative m) => (b -> c) -... | AnkalagonBlack/bool-kleisli | src/Data/Bool/Kleisli.hs | bsd-3-clause | 906 | 0 | 12 | 219 | 534 | 283 | 251 | 26 | 1 |
module RefacConDef (subConstantDef) where
import PrettyPrint
import PosSyntax
import AbstractIO
import Maybe
import TypedIds
import UniqueNames hiding (srcLoc)
import PNT
import TiPNT
import List
import RefacUtils
import PFE0 (findFile)
import MUtils (( # ))
-- folding against a constant definition
subConstantDef ar... | forste/haReFork | refactorer/RefacConDef.hs | bsd-3-clause | 2,849 | 0 | 14 | 1,146 | 726 | 391 | 335 | -1 | -1 |
import Control.Applicative
import qualified Data.ByteString as BS
import Data.MessagePack
main = do
sb <- newSimpleBuffer
pc <- newPacker sb
pack pc [1,2,3::Int]
pack pc True
pack pc "hoge"
bs <- simpleBufferData sb
os <- unpackObjectsFromString bs
mapM_ print os
| tanakh/hsmsgpack | test/Stream.hs | bsd-3-clause | 284 | 0 | 8 | 59 | 105 | 50 | 55 | 12 | 1 |
module Style.ParserSpec (spec) where
import qualified Data.Map as M
import Test.Hspec
import Style.Color
import Style.Types
import Style.Parser
style :: [(PropKey, PropVal)] -> Style
style = Style . M.fromAscList
testRed s = parseStyle ("background-color:" ++ s) `shouldBe` style [(BackgroundColor, red)]
spec :: Sp... | forestbelton/orb | test/Style/ParserSpec.hs | bsd-3-clause | 1,317 | 0 | 18 | 374 | 334 | 184 | 150 | 27 | 1 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
module Data.XML.Pickle.Basic where
import Control.Applicative
import Control.Monad (ap)
import qualified Control.Category as Cat
import Control.Exception (Exception)
import Dat... | Philonous/xml-picklers | src/Data/XML/Pickle/Basic.hs | bsd-3-clause | 6,268 | 0 | 17 | 2,133 | 2,016 | 1,048 | 968 | 133 | 4 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANG... | tel/serv | http-kinder/src/Network/HTTP/Kinder/Header/Serialization.hs | bsd-3-clause | 8,388 | 0 | 13 | 1,790 | 1,719 | 907 | 812 | 124 | 3 |
module Paths_qed where
getDataDir :: IO FilePath
getDataDir = return "."
| ndmitchell/qed | src/Paths.hs | bsd-3-clause | 75 | 0 | 5 | 13 | 20 | 11 | 9 | 3 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.SBV.Examples.Uninterpreted.Deduce
-- Copyright : (c) Levent Erkok
-- License : BSD3
-- Maintainer : erkokl@gmail.com
-- Stability : experimental
--
-- Demonstrates uninterpreted sorts and how they can ... | Copilot-Language/sbv-for-copilot | Data/SBV/Examples/Uninterpreted/Deduce.hs | bsd-3-clause | 3,661 | 0 | 15 | 731 | 399 | 237 | 162 | 35 | 1 |
{-# LANGUAGE OverloadedStrings, TemplateHaskell, QuasiQuotes, TypeFamilies, MultiParamTypeClasses, ViewPatterns #-}
module YesodCoreTest.Reps
( specs
, Widget
, resourcesApp
) where
import Yesod.Core
import Test.Hspec
import Network.Wai
import Network.Wai.Test
import Data.ByteString.Lazy (ByteString)
i... | psibi/yesod | yesod-core/test/YesodCoreTest/Reps.hs | mit | 2,897 | 0 | 15 | 600 | 821 | 411 | 410 | 74 | 1 |
{-# LANGUAGE CPP, ScopedTypeVariables, OverloadedStrings #-}
-----------------------------------------------------------------------------
--
-- Module : IDE.LogRef
-- Copyright : (c) Juergen Nicklisch-Franken, Hamish Mackenzie
-- License : GNU-GPL
--
-- Maintainer : <maintainer at leksah.org>
-- Stabil... | juhp/leksah | src/IDE/LogRef.hs | gpl-2.0 | 25,553 | 0 | 28 | 8,980 | 7,157 | 3,474 | 3,683 | 576 | 18 |
{-# OPTIONS_GHC -Wall #-}
module Type.Constrain.Effects (constrain) where
import qualified Data.Map as Map
import qualified AST.Effects as Effects
import qualified AST.Module.Name as ModuleName
import qualified Reporting.Annotation as A
import qualified Reporting.Error.Type as Error
import qualified Type.Environment ... | mgold/Elm | src/Type/Constrain/Effects.hs | bsd-3-clause | 3,227 | 0 | 16 | 896 | 986 | 498 | 488 | 87 | 3 |
module ListCollaborators where
import qualified Github.Repos.Collaborators as Github
import Data.List
main = do
possibleCollaborators <- Github.collaboratorsOn "thoughtbot" "paperclip"
case possibleCollaborators of
(Left error) -> putStrLn $ "Error: " ++ (show error)
(Right collaborators) ->
putStrL... | jwiegley/github | samples/Repos/Collaborators/ListCollaborators.hs | bsd-3-clause | 514 | 0 | 12 | 83 | 145 | 75 | 70 | 12 | 2 |
module SimpleFormula ( Formula(..)
, parseString
, interpretFormula
, interpretFormulaDefault
) where
import SimpleFormula.Parser
import SimpleFormula.Types
xor :: Bool -> Bool -> Bool
True `xor` True = False
False `xor` False = False... | m4lvin/robbed | tests/SimpleFormula.hs | bsd-3-clause | 2,024 | 0 | 11 | 508 | 620 | 325 | 295 | 42 | 7 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
module ETA.BasicTypes.VarSet (
-- * Var, Id and TyVar set types
VarSet, IdSet, TyVarSet, CoVarSet,
-- ** Manipulating these sets
emptyVarSet, unitVarSet, mkVarSet,
extendVarSet, e... | pparkkin/eta | compiler/ETA/BasicTypes/VarSet.hs | bsd-3-clause | 4,447 | 0 | 8 | 1,140 | 919 | 528 | 391 | 80 | 1 |
{- |
Module : $Header$
Description : creating Haskell modules via translations
Copyright : (c) C. Maeder, Uni Bremen 2006
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : non-portable(Logic)
dumping a LibEnv to a Haskell module... | keithodulaigh/Hets | Haskell/CreateModules.hs | gpl-2.0 | 1,648 | 0 | 13 | 557 | 306 | 155 | 151 | 34 | 3 |
module StoryMode.Episode where
import Data.Maybe
import Data.Initial
import qualified Data.Map as Map
import System.FilePath
import Utils
import Base
import Editor.Pickle.LevelFile
import StoryMode.Types
import StoryMode.Configuration
loadEpisodes :: IO (Maybe [Episode LevelFile])
loadEpisodes = do
mEpPa... | geocurnoff/nikki | src/StoryMode/Episode.hs | lgpl-3.0 | 1,329 | 0 | 15 | 306 | 413 | 206 | 207 | 35 | 2 |
data T
= Add T T
| Mul T T
| Div T T
| Sub T T
| Num Int
eval :: T -> Int
eval x = case x of
Add a b -> eval a + eval b
Mul a b -> eval a + eval b
Div a b -> eval a + eval b
Sub a b -> eval a + eval b
Num a -> a
| FranklinChen/write-you-a-haskell | chapter10/eval.hs | mit | 235 | 0 | 9 | 95 | 152 | 72 | 80 | 13 | 5 |
----------------------------------------------------------------------------
-- |
-- Module : Test.Cabal.CheckArMetadata
-- Created : 8 July 2017
--
-- Check well-formedness of metadata of .a files that @ar@ command produces.
-- One of the crucial properties of .a files is that they must be
-- deterministic... | themoritz/cabal | cabal-testsuite/Test/Cabal/CheckArMetadata.hs | bsd-3-clause | 3,651 | 0 | 23 | 1,103 | 795 | 411 | 384 | 57 | 6 |
import System.Posix.User
main :: IO ()
main = getUserEntryForName "thisIsNotMeantToExist" >> return ()
| jimenezrick/unix | tests/getUserEntryForName.hs | bsd-3-clause | 105 | 0 | 7 | 15 | 34 | 17 | 17 | 3 | 1 |
{-# LANGUAGE Safe #-}
-- | Import all modules from prelude that should be safe
module Main where
import Numeric
import Prelude
-- import Foreign
import Control.Applicative
import Control.Arrow
import Control.Category
-- import Control.ST
-- import Control.ST.Lazy
-- import Control.ST.Strict
import Control.Concurren... | frantisekfarka/ghc-dsi | testsuite/tests/safeHaskell/unsafeLibs/GoodImport03.hs | bsd-3-clause | 2,028 | 0 | 6 | 235 | 441 | 277 | 164 | 80 | 1 |
-----------------------------------------------------------------------------
--
-- Module : Language.PureScript.Parser.Comments
-- Copyright : (c) Phil Freeman 2015
-- License : MIT
--
-- Maintainer : Phil Freeman <paf31@cantab.net>
-- Stability : experimental
-- Portability :
--
-- |
-- Defines the... | michaelficarra/purescript | src/Language/PureScript/Comments.hs | mit | 795 | 0 | 10 | 115 | 107 | 68 | 39 | 10 | 0 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE UndecidableInstances #-}
module Betfair.APING.Types.ErrorData
( ErrorData(..... | joe9/betfair-api | src/Betfair/APING/Types/ErrorData.hs | mit | 1,052 | 0 | 14 | 258 | 163 | 100 | 63 | 26 | 0 |
module Guguk where
| joom/Guguk | src/Guguk.hs | mit | 19 | 0 | 2 | 3 | 4 | 3 | 1 | 1 | 0 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.SVGLength
(newValueSpecifiedUnits, convertToSpecifiedUnits,
pattern SVG_LENGTHTYPE_UNKNOWN, pattern SVG_L... | ghcjs/jsaddle-dom | src/JSDOM/Generated/SVGLength.hs | mit | 4,720 | 0 | 12 | 699 | 1,014 | 575 | 439 | 74 | 1 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.WebGLActiveInfo (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.WebGLActiveInfo
#else
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
import GHCJS.DOM.JSFFI.G... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/WebGLActiveInfo.hs | mit | 358 | 0 | 5 | 33 | 33 | 26 | 7 | 4 | 0 |
import MyTree
--class Eq a where
-- (==) :: a -> a -> Bool
-- (/=) :: a -> a -> Bool
-- x == y = not (x /= y)
-- x /= y = not (x == y)
data TrafficLight = Red | Yellow | Green
instance Eq TrafficLight where
Red == Red = True
Yellow == Yellow = True
Green == Green = True
_ == _ = False
instance Show Tra... | RAFIRAF/HASKELL | Eq.hs | mit | 1,486 | 1 | 9 | 386 | 463 | 241 | 222 | -1 | -1 |
module ThreaseBench (benchmarks) where
import Criterion
benchmarks :: [Benchmark]
benchmarks = []
| tfausak/threase | benchmark/ThreaseBench.hs | mit | 110 | 0 | 5 | 24 | 27 | 17 | 10 | 4 | 1 |
module Y2017.M03.D31.Exercise where
import Data.Array
import Data.Map (Map)
-- below import available via 1HaskellADay git repository
import Control.Scan.CSV
import Data.Percentage
{--
Take a look at Fig. 2.6 from the Road Safety Web Publication No. 16
Relationship between Speed and Risk of Fatal Injury: Pedestrian... | geophf/1HaskellADay | exercises/HAD/Y2017/M03/D31/Exercise.hs | mit | 1,775 | 0 | 7 | 296 | 204 | 121 | 83 | 18 | 1 |
{-# LANGUAGE BangPatterns #-}
import Graphics.Gloss.Raster.Array
import System.Environment
import Data.Array.Repa.Algorithms.Randomish
import Data.Array.Repa as R
import Data.List
import Data.Bits
import Prelude as P
main :: IO ()
main
= do args <- getArgs
case a... | gscalzo/HaskellTheHardWay | gloss-try/gloss-master/gloss-examples/raster/Snow/Main.hs | mit | 1,590 | 0 | 18 | 649 | 431 | 226 | 205 | 38 | 3 |
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Test.Hspec
import qualified Data.ByteString.Lazy as L
import Codec.Xlsx (toXlsx)
import Control.Lens
import Applicant
main :: IO ()
main = hspec $ do
describe "processSheet" $ do
let testExcelFile = "test/xlsx-test.xlsx"
(sheetsA :: IO [App... | mjhoy/ybapp | test/Test.hs | mit | 1,472 | 0 | 21 | 429 | 427 | 201 | 226 | 38 | 1 |
-- | Module: Trans.CgrToStage1
-- Description: Translate from schema.capnp's codegenerator request to IR.Stage1.
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NamedFieldPuns #-}
module Trans.CgrToStage1 (cgrToCgr) where
import Data.Word
import Data.Function ((&... | zenhack/haskell-capnp | cmd/capnpc-haskell/Trans/CgrToStage1.hs | mit | 17,254 | 0 | 28 | 6,242 | 4,199 | 2,125 | 2,074 | 297 | 29 |
-----------------------------------------------------------------------------
-- |
-- Module : Distributed.Data.Fifo
-- Copyright : (c) Phil Hargett 2014
-- License : MIT (see LICENSE file)
--
-- Maintainer : phil@haphazardhouse.net
-- Stability : experimental
-- Portability : non-portable (require... | hargettp/distributed-containers | src/Data/Fifo.hs | mit | 1,902 | 0 | 12 | 456 | 543 | 293 | 250 | 41 | 3 |
module AyaScript.Types where
type Program = [Stmt]
data Stmt = Expr Expr
| Decl Expr Expr
| Assign Expr Expr
deriving (Show, Eq)
data Expr = Natural Integer
| Str String
| UnaryOp String Expr
| BinOp String Expr Expr
| Var String
| Fun String Ex... | AyaMorisawa/aya-script | src/AyaScript/Types.hs | mit | 424 | 0 | 7 | 168 | 127 | 74 | 53 | 16 | 0 |
{-# htermination lookupFM :: FiniteMap Float b -> Float -> Maybe b #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_lookupFM_6.hs | mit | 88 | 0 | 3 | 15 | 5 | 3 | 2 | 1 | 0 |
{-# LANGUAGE TemplateHaskell #-}
module Rewriting.SRS.Apply where
import qualified Rewriting.Apply as A
import Rewriting.Derive.Instance
import Rewriting.SRS.Raw
import Rewriting.SRS.Step
import Rewriting.SRS.Steps
import Autolib.TES.Identifier
import Autolib.Reporter
import Autolib.ToDoc
import Autolib.Reader
im... | florianpilz/autotool | src/Rewriting/SRS/Apply.hs | gpl-2.0 | 933 | 0 | 9 | 233 | 229 | 131 | 98 | -1 | -1 |
{-# LANGUAGE OverloadedStrings, DataKinds #-}
module PostResponse where
import Text.Blaze ((!))
import qualified Text.Blaze.Html5 as H
import qualified Text.Blaze.Html5.Attributes as A
import Happstack.Server
import MakeElements
import MasterTemplate
import Scripts
postResponse :: ServerPart Response
postR... | cchens/courseography | hs/PostResponse.hs | gpl-3.0 | 15,153 | 433 | 14 | 5,757 | 3,434 | 1,710 | 1,724 | 232 | 1 |
-- Static configuration for CelfToGraph (This is a dirty way... needs to be fixed in the future. TODO)
module CelfToGraphConf where
celf_cmd = "/home/jff/work/code/TeLLer/local/celf/celf"
| jff/TeLLer | src/CelfToGraphConf.hs | gpl-3.0 | 189 | 0 | 4 | 25 | 10 | 7 | 3 | 2 | 1 |
-- From Simon Peyton-Jones's "A taste of haskell"
module Stack(Stack,
-- swap1,
swap2,
swap3,
swap4,
swap5) where
type Stack w = [w]
-- swap1 :: Stack w -> Stack w
-- swap1 [] = []
-- swap1 (w : []) = w : []
-- swap1 (w1 : w2 : ws) = w2 : w1 : ws
swap2 :: Stack w -> Stack w
swap2 [] = []
swap2 [w] = [... | wtanaka/haskell | Stack.hs | gpl-3.0 | 722 | 0 | 10 | 207 | 290 | 157 | 133 | 22 | 3 |
module Program (
processDirectory,
defaultConfig,
LogLevel(..),
Config(..),
Result(..)
) where
import Data.List(intercalate)
import Control.Monad (forM_, forM)
import Control.Concurrent (forkIO)
import Control.Concurrent.Chan (newChan, writeChan, readChan)
import FileFinder (listAllFiles)
import DepPro... | splondike/depcache | src/Program.hs | gpl-3.0 | 4,489 | 0 | 16 | 1,007 | 1,032 | 542 | 490 | 82 | 3 |
{-# 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-iam/gen/Network/AWS/IAM/UpdateServerCertificate.hs | mpl-2.0 | 5,200 | 0 | 11 | 958 | 536 | 328 | 208 | 73 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
module Foldable (
Foldable(..)
) where
import Prelude ((.), id, flip)
import Maybe
import Either
import Monoid
import qualified Data.List as List
class Foldable t where
fold :: Monoid m => t m -> m
fold = foldMap id
-- foldMap's defau... | seckcoder/lang-learn | haskell/lambda-calculus/src/Foldable.hs | unlicense | 1,209 | 0 | 14 | 412 | 468 | 244 | 224 | 31 | 0 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
import Data.Reify
newtype Mu a = In (a (Mu a))
data List a b = Cons a b | Nil deriving Show
type MyList a = Mu (List a)
g = In (Cons 1 (In (Cons 2 (In (Cons 3 (In Nil))))))
instance (Traversable a) => MuRef (Mu a) where
type DeRef (Mu a) = a
mapD... | egaburov/funstuff | Haskell/sharing/example_lists.hs | apache-2.0 | 879 | 4 | 16 | 228 | 496 | 236 | 260 | 28 | 1 |
module {-# REL #-} Main where --pragma here is unecessary, but does not hurt
import {-#REL#-} Middle.MiddleExposed
import {-# REL #-} Middle.MiddleHidden
main = do
putStrLn "Hi there!"
putStrLn $ "The hidden middle value is: " ++ show someHiddenValue
putStrLn $ "The hidden bottom type is: " ++ show (Expo... | dimitri-xyz/relative-imports-test-top-exec-A | Main.hs | apache-2.0 | 398 | 0 | 12 | 83 | 83 | 42 | 41 | 8 | 1 |
{-# OPTIONS -fglasgow-exts -#include "../include/gui/qtc_hs_QItemEditorCreatorBase.h" #-}
-----------------------------------------------------------------------------
{-| Module : QItemEditorCreatorBase.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-... | keera-studios/hsQt | Qtc/Gui/QItemEditorCreatorBase.hs | bsd-2-clause | 5,401 | 0 | 14 | 712 | 1,278 | 655 | 623 | -1 | -1 |
module Assembler where
import Parser
import qualified Data.ByteString.Lazy as B
import Data.Binary.Put
import Data.Bits
import Data.Word
import Data.Char as C
import qualified Data.Map as Map
import Control.Monad (forM)
import System.IO (openBinaryFile, IOMode(..), hClose)
type LabelMap = Map.Map String Int
genRegis... | mrgaaron/dcpu-16 | src/haskell/Assembler.hs | bsd-2-clause | 4,802 | 0 | 18 | 1,250 | 1,641 | 854 | 787 | 119 | 5 |
{-# language CPP #-}
-- | = Name
--
-- VK_NVX_multiview_per_view_attributes - device extension
--
-- == VK_NVX_multiview_per_view_attributes
--
-- [__Name String__]
-- @VK_NVX_multiview_per_view_attributes@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
-- 98
--
-- [_... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_NVX_multiview_per_view_attributes.hs | bsd-3-clause | 11,223 | 0 | 14 | 1,654 | 1,020 | 656 | 364 | -1 | -1 |
{-|
Module :
Description :
Copyright : (c) Alexander Vieth, 2015
Licence : BSD3
Maintainer : aovieth@gmail.com
Stability : experimental
Portability : non-portable (GHC only)
-}
{-# LANGUAGE AutoDeriveTypeable #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE Kin... | avieth/Relational | Types/SomeFunctorial.hs | bsd-3-clause | 833 | 0 | 9 | 179 | 118 | 67 | 51 | 11 | 0 |
module Data.Kiln.Examples where
import Data.Kiln
import Control.Arrow
import Data.List
import Data.Functor.Compose
import Data.Traversable
import Data.Foldable
import Control.Applicative
-- | Apply a function to the value inside a Compose.
composedly :: (f (g a) -> f' (g' a')) -> Compose f g a -> Compose f' g' a'
co... | kwf/data-kiln | Data/Kiln/Examples.hs | bsd-3-clause | 2,240 | 0 | 12 | 536 | 1,104 | 557 | 547 | 55 | 2 |
-- | Tools for propositional logic, including an interface to the MiniSat SAT solver.
module Language.TRS.Prop
( Formula (Var, Const, Not, And, Or)
, xor
, imply
, equiv
, mux
, fullAdd
, fullSub
, sat
) where
import qualified Data.Set as Set
import qualified Data.Map as Map
import Data.Maybe
import... | tomahawkins/trs | Language/TRS/Prop.hs | bsd-3-clause | 7,172 | 0 | 16 | 2,019 | 2,795 | 1,395 | 1,400 | 147 | 15 |
{-
The License datatype. For more information about these and other
open-source licenses, you may visit <http://www.opensource.org/>.
The @.faction@ file allows you to specify a license file. Of course you can
use any license you like but people often pick common open source licenses
and it's useful if we can automat... | IreneKnapp/Faction | libfaction/Distribution/License.hs | bsd-3-clause | 3,837 | 0 | 16 | 959 | 683 | 384 | 299 | 49 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Bort.Application
( runBot
, ApplicationSettings
, sendCommand
) where
import Control.Applicative ((<$>), pure)
import Control.Lens (view,(^.))
import Control.Monad (forM_)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Class (lift)
import Co... | breestanwyck/bort | src/Bort/Application.hs | bsd-3-clause | 2,766 | 0 | 17 | 701 | 967 | 496 | 471 | 60 | 9 |
module Physics.Falling2d.RigidBody2d
(
RigidBody2d
, OrderedRigidBody2d
)
where
import Data.Vect.Double.Base
import Physics.Falling.RigidBody.RigidBody
import Physics.Falling.RigidBody.OrderedRigidBody
import Physics.Falling2d.InertiaTensor2d
import Physics.Falling2d.Vec1
import Physics.Falling2d.Shape2d
type RigidBo... | sebcrozet/falling2d | Physics/Falling2d/RigidBody2d.hs | bsd-3-clause | 1,435 | 0 | 5 | 805 | 107 | 65 | 42 | 29 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Network.HTTP2.Arch.HPACK (
hpackEncodeHeader
, hpackEncodeHeaderLoop
, hpackDecodeHeader
, hpackDecodeTrailer
, just
, fixHeaders
) where
import qualified Control.Exception as E
import Network.ByteOrder
import qualified Network... | kazu-yamamoto/http2 | Network/HTTP2/Arch/HPACK.hs | bsd-3-clause | 3,574 | 0 | 10 | 854 | 777 | 408 | 369 | 73 | 2 |
module Main where
import Test.Hspec
import Day2
spec :: Spec
spec = do
describe "Day2" $ do
context "parseInstrs" $ do
it "should return correct result" $ do
parseInstrs ["UDRL", "DDUULLRR"] `shouldBe` [[U,D,R,L],[D,D,U,U,L,L,R,R]]
context "getFinalPosition" $ do
it "should return (0,0)... | reidwilbur/aoc2016 | test/Day2Spec.hs | bsd-3-clause | 4,071 | 2 | 35 | 379 | 619 | 337 | 282 | 37 | 1 |
-- © 2001, 2002 Peter Thiemann
module Main where
import Prelude hiding (map, span, head, div)
import WASH.CGI.CGI
import qualified Persistent2 as P
counterStore :: CGI (P.T Int)
counterStore = P.init "Counter" 0
main =
run mainCGI
mainCGI =
forever counter
counter = do
counterHandle <- counterStore
count... | nh2/WashNGo | Examples/old/CounterWithBoundedLog.hs | bsd-3-clause | 942 | 2 | 16 | 222 | 315 | 151 | 164 | 31 | 2 |
import System.Environment (getArgs)
dsig :: Int -> Int
dsig 0 = 0
dsig x | mod x 10 > 0 = 2^(3 * mod x 10) + dsig (div x 10)
| otherwise = dsig (div x 10)
nextNu :: Int -> Int -> Int
nextNu x y | x == dsig y = y
| otherwise = nextNu x (y + 9)
nextNum :: Int -> Int
nextNum x = nextNu (dsig... | nikai3d/ce-challenges | hard/next_number.hs | bsd-3-clause | 477 | 0 | 12 | 148 | 261 | 126 | 135 | 15 | 1 |
{-# LANGUAGE DeriveDataTypeable
, ScopedTypeVariables
, FlexibleInstances
, FlexibleContexts
#-}
{-# OPTIONS -IControl/Workflow #-}
{- | This module contains monadic combinators that express some workflow patterns.
see the docAprobal.hs example included in t... | agocorona/Workflow | Control/Workflow/Patterns.hs | bsd-3-clause | 9,653 | 0 | 27 | 2,937 | 1,903 | 966 | 937 | 157 | 7 |
module Data.Quantities.DefinitionParserSpec (spec) where
import Data.Quantities.Data (Definition(..), SimpleUnit(..), baseQuant)
import Data.Quantities.DefinitionParser
import Test.Hspec
{-# ANN module "HLint: ignore Redundant do" #-}
spec :: Spec
spec = do
describe "parseDefinitions" $ do
let mLine = "... | jdreaver/quantities | test-suite/Data/Quantities/DefinitionParserSpec.hs | bsd-3-clause | 1,241 | 0 | 15 | 353 | 314 | 166 | 148 | 28 | 1 |
module Lens where
import Control.Lens
data P a = P String a deriving Show
val :: Lens (P a) (P b) a b
val f (P k v) = fmap (\b -> P k b) (f v)
-- liftPV :: Applicative f => P a -> P (f a)
-- liftPV = val %~ pure
-- liftL :: Applicative f => Lens s t a b -> s -> t
-- liftL l = over l pure
| notae/haskell-exercise | cp/Lens.hs | bsd-3-clause | 293 | 0 | 8 | 81 | 96 | 53 | 43 | 5 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
module Control.Category.Structural.Rules where
import Language.Haskell.... | tomberek/rulestesting | src/Control/Category/Structural/Rules.hs | bsd-3-clause | 7,518 | 2 | 12 | 2,142 | 1,847 | 1,088 | 759 | 122 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
--import Prelude hiding (FilePath)
import Network.DNS.Pocket
import Options.Applicative
import qualified Data.ByteString.Char8 as B8
import qualified Data.Text as T
import Control.Monad
import System.Ex... | junjihashimoto/pocket-dns | Main.hs | bsd-3-clause | 2,423 | 5 | 16 | 568 | 871 | 426 | 445 | 69 | 2 |
{-
(c) The AQUA Project, Glasgow University, 1993-1998
\section[Simplify]{The main module of the simplifier}
-}
{-# LANGUAGE CPP #-}
module Simplify ( simplTopBinds, simplExpr, simplRule ) where
#include "HsVersions.h"
import DynFlags
import SimplMonad
import Type hiding ( substTy, extendTvSubst, substTyVar )... | fmthoma/ghc | compiler/simplCore/Simplify.hs | bsd-3-clause | 122,648 | 20 | 25 | 37,505 | 15,132 | 8,004 | 7,128 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
#ifdef TRUSTWORTHY
{-# LANGUAGE Trustworthy #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Data.Text.Lens
-- Copyright : (C) 2012-14 Edward Kmett
-- License : BSD-style (see the file LICENSE)
... | hvr/lens | src/Data/Text/Lens.hs | bsd-3-clause | 2,239 | 0 | 7 | 473 | 257 | 173 | 84 | 33 | 1 |
module Main where
import ABS
(a:b:tmp:n:n1:res:the_end:_)=[1..]
main_ :: Method
main_ [] this wb k =
Assign n (Val (I 2)) $
Assign a (Val (I 1)) $
Assign b (Val (I 3)) $
Assign tmp (Val (I 2)) $
Assign res (Sync hanoi [a,b,tmp,n]) k
hanoi :: Method
hanoi [a,b,tmp,n] this wb k =
Assign res (Val (I 0)) $
... | abstools/abs-haskell-formal | benchmarks/6_hanoi/progs/2.hs | bsd-3-clause | 652 | 0 | 19 | 185 | 416 | 216 | 200 | 22 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
module Database.Persist.Sql.Raw where
import Database.Persist
import Database.Persist.Sql.Types
import Database.Persist.Sql.Class
import qualified Data.Map as Map
import Control.Monad.IO.... | bitemyapp/persistent | persistent/Database/Persist/Sql/Raw.hs | mit | 10,124 | 0 | 22 | 3,109 | 1,793 | 956 | 837 | 141 | 7 |
{-# LANGUAGE OverloadedStrings #-}
{- |
Module : Network.MPD.Commands.Status
Copyright : (c) Ben Sinclair 2005-2009, Joachim Fasting 2012
License : MIT (see LICENSE)
Maintainer : joachim.fasting@gmail.com
Stability : stable
Portability : unportable
Querying MPD's status.
-}
module Network.MPD.Commands... | sol/libmpd-haskell | src/Network/MPD/Commands/Status.hs | mit | 1,608 | 0 | 8 | 314 | 261 | 151 | 110 | 24 | 1 |
{-- snippet doblock --}
useAsCString str $ \cstr -> do
... operate on the C string
... return a result
{-- /snippet doblock --}
{-- snippet alloc --}
alloca $ \stringptr -> do
... call some Ptr CString function
peek stringptr
{-- /snippet alloc --}
| binesiyu/ifl | examples/ch17/DoBlock.hs | mit | 262 | 2 | 10 | 58 | 77 | 37 | 40 | -1 | -1 |
import Control.Monad
import Data.Maybe
import Data.Functor
import System.Posix.Env
import Text.XkbCommon
import Text.XkbCommon.Constants
import Text.XkbCommon.KeycodeList
import Common
setRmlvoEnv :: RMLVO -> IO ()
setRmlvoEnv rmlvo = do
procEnv "XKB_DEFAULT_RULES" rules
procEnv "XKB_DEFAULT_MODEL" model
p... | tulcod/haskell-xkbcommon | tests/rulescomp.hs | mit | 5,090 | 0 | 13 | 1,560 | 1,382 | 726 | 656 | 144 | 2 |
module Phone where
import Data.List (elemIndex, findIndex)
import Data.Maybe (fromJust)
import Data.Char (isUpper, toLower, isLetter, toUpper, ord, chr)
convo :: [String]
convo = [
"Hope is the beginning of despair",
"Ok Marneas calm down",
"We were betrayed at Calth",
"True enough",
"Only the Emperor can s... | brodyberg/Notes | ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/PhoneExercise.hs | mit | 9,097 | 0 | 17 | 2,354 | 3,124 | 1,753 | 1,371 | 232 | 3 |
module Run.Shrink (runShrink) where
import Control.Monad
import Test.QuickFuzz.Gen.FormatInfo
import Args
import Debug
-- Run shrink subcommand
runShrink :: QFCommand -> FormatInfo base actions -> IO ()
runShrink cmd fmt = do
when (hasActions fmt)
(putStrLn "Selected format supports actions base gene... | elopez/QuickFuzz | app/Run/Shrink.hs | gpl-3.0 | 340 | 0 | 9 | 60 | 83 | 45 | 38 | 9 | 1 |
module Lamdu.Data.Export.JSON.Migration.ToVersion10 (migrate) where
import qualified Control.Lens as Lens
import Control.Lens.Extended ((~~>))
import qualified Data.Aeson as Aeson
import qualified Data.Text as Text
import qualified Lamdu.CharClassification as Chars
import Lamdu.Data.Export.JSON.Mig... | lamdu/lamdu | src/Lamdu/Data/Export/JSON/Migration/ToVersion10.hs | gpl-3.0 | 1,160 | 0 | 17 | 310 | 350 | 188 | 162 | 29 | 3 |
module IrcServer (
IrcServer(..),
IrcConnection(..),
connect,
listen,
send
) where
import Config
import Prelude hiding ()
import IrcMessage
import Network (connectTo, PortID(PortNumber))
import System.IO (Handle, hSetBuffering, BufferMode(..), hGetLine, hPutStrLn,
mkTextEncodi... | bqv/mako | IrcServer.hs | mpl-2.0 | 3,125 | 0 | 17 | 1,105 | 902 | 492 | 410 | 63 | 1 |
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
module NumberSix.Handlers.Sup
( handler
) where
--------------------------------------------------------------------------------
import Control.Applicative ((<$>))
import Con... | itkovian/number-six | src/NumberSix/Handlers/Sup.hs | bsd-3-clause | 997 | 0 | 12 | 173 | 159 | 91 | 68 | 17 | 1 |
module Numeric.Coalgebra.Trigonometric.Class
( Trigonometric(..)
) where
import Prelude (return)
import Numeric.Covector
class Trigonometric r where
cos :: r
sin :: r
instance Trigonometric a => Trigonometric (Covector r a) where
cos = return cos
sin = return sin
| athanclark/algebra | src/Numeric/Coalgebra/Trigonometric/Class.hs | bsd-3-clause | 279 | 0 | 7 | 53 | 88 | 49 | 39 | 10 | 0 |
{-# LANGUAGE CPP, DeriveDataTypeable #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module Language.Java.Paragon.TypeCheck.NullAnalysis
(
NullType, NullAnnot(..), NullModif(..),
nullable, committed, free,
joinNT
) where
import Language.Java.Paragon.Pretty
#ifdef BAS... | bvdelft/parac2 | src/Language/Java/Paragon/TypeCheck/NullAnalysis.hs | bsd-3-clause | 1,609 | 0 | 10 | 365 | 494 | 274 | 220 | 44 | 1 |
-- | The Github issue comments API from
-- <http://developer.github.com/v3/issues/comments/>.
module Github.Issues.Comments (
comment
,comments
,comments'
-- * Modifying Comments
-- |
-- Only authenticated users may create and edit comments.
,GithubAuth(..)
,createComment
,editComment
,module Github.Data
) where
im... | deckool/my-hs-github | Github/Issues/Comments.hs | bsd-3-clause | 2,032 | 0 | 12 | 338 | 452 | 256 | 196 | 29 | 1 |
module Main where
import Criterion.Main
import CV.Image
import qualified CV.ImageMath as IM
import System.IO.Unsafe
import CV.ColourUtils
import CV.Pixelwise
import qualified CV.Transforms as T
pwFlip :: Image GrayScale D32 -> Image GrayScale D32
pwFlip i = unsafePerformIO $ withClone i (return . toImage . remap flip... | TomMD/CV | performance/Pixelwise.hs | bsd-3-clause | 2,833 | 0 | 16 | 965 | 1,036 | 527 | 509 | 51 | 1 |
-- |
-- Module : Template
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : portable
--
-- A very simple template engine
--
module Template
(
-- * Types
Template
, Attrs
-- * methods
, parseTemplate
, renderT... | tekul/cryptonite | gen/Template.hs | bsd-3-clause | 6,160 | 0 | 21 | 1,935 | 1,728 | 897 | 831 | 132 | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.