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-monitoring/gen/Network/Google/Resource/Monitoring/Services/ServiceLevelObjectives/Patch.hs | mpl-2.0 | 6,278 | 0 | 17 | 1,353 | 859 | 500 | 359 | 131 | 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-importexport/gen/Network/AWS/ImportExport/ListJobs.hs | mpl-2.0 | 5,270 | 0 | 16 | 1,269 | 926 | 541 | 385 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ServiceAccountkeys/Insert.hs | mpl-2.0 | 6,018 | 0 | 19 | 1,338 | 794 | 465 | 329 | 117 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-admin-directory/gen/Network/Google/Resource/Directory/ResolvedAppAccessSettings/GetSettings.hs | mpl-2.0 | 2,879 | 0 | 12 | 603 | 221 | 137 | 84 | 45 | 1 |
module BrickStacking.A333650Spec (main, spec) where
import Test.Hspec
import BrickStacking.A333650 (a333650)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A333650" $
it "correctly computes the six rows elements" $
map a333650 [1..21] `shouldBe` expectedValue where
expectedValue = [1,1,2,1,... | peterokagey/haskellOEIS | test/BrickStacking/A333650Spec.hs | apache-2.0 | 365 | 0 | 8 | 57 | 157 | 94 | 63 | 10 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- | Count running jobs on Jenkins instance
--
-- Uses an awful hack, that is inspecting the job ball color. Jenkins sets
-- it to "blue_anime", meaning "animated blue ball" if job is running
module Main (main) where
import Control.Lens -- lens
import ... | supki/libjenkins | example/running-jobs-count.hs | bsd-2-clause | 1,333 | 0 | 11 | 367 | 288 | 159 | 129 | 23 | 1 |
module Codec.Base64 (encode, decode) where
import Data.Array.Unboxed
import Data.Bits
import Data.Char
import Data.Word
-- |
-- Base64 encoding.
--
-- >>> encode "foo bar"
-- "Zm9vIGJhcg=="
encode :: String -> String
encode = map (base64array !) . encode' . map (fromIntegral . ord)
encode' :: [Word8] -> [Word8]
enco... | tonosaman/haskell-code-snippets | src/Codec/Base64.hs | bsd-2-clause | 2,173 | 0 | 10 | 605 | 1,200 | 682 | 518 | 53 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- | Most of this code depends on OverloadedStrings.
--
-- This is a utility package for Scotty web framework which provides signed cookie functionality
module Web.Scotty.SignedCookies ( setSignedCookie
, getSignedCookie
... | kgwinnup/signed-cookies | Web/Scotty/SignedCookies.hs | bsd-2-clause | 3,682 | 0 | 21 | 1,131 | 730 | 407 | 323 | 65 | 5 |
-- | Support for running propellor, as built outside a container,
-- inside the container, without needing to install anything into the
-- container.
--
-- Note: This is currently Debian specific, due to glibcLibs.
module Propellor.Shim (setup, cleanEnv, file) where
import Propellor
import Utility.LinuxMkLibs
import ... | avengerpenguin/propellor | src/Propellor/Shim.hs | bsd-2-clause | 2,623 | 21 | 19 | 456 | 733 | 368 | 365 | 55 | 2 |
{-# LANGUAGE OverloadedStrings #-}
-- Rendering a bread recipe.
module Rendering where
import qualified Data.Ratio as R
import Formatting
import BreadData
type RecipeFieldLengths = (Int, Int, Int)
-- Render ingredient record into a line
render :: Int -> RecipeFieldLengths -> IngredientRecord -> String
render sigFi... | ramanshah/bread | src/Rendering.hs | bsd-3-clause | 3,631 | 0 | 13 | 747 | 878 | 479 | 399 | 51 | 2 |
--------------------------------------------------------------------------------
-- | Read templates in Hakyll's native format
module Hakyll.Web.Template.Read
( readTemplate
) where
--------------------------------------------------------------------------------
import Data.List (... | bergmark/hakyll | src/Hakyll/Web/Template/Read.hs | bsd-3-clause | 1,490 | 0 | 14 | 389 | 325 | 173 | 152 | 23 | 4 |
module Math.Probable.Distribution
( -- * Common distributions
beta
, cauchy
, cauchyStd
, chiSquared
, fisher
, gamma
, improperGamma
, geometric
, geometric0
, student
, uniform
, normal
, standard
, normalFromSample
, exponential
, exponentialFrom... | alpmestan/probable | src/Math/Probable/Distribution.hs | bsd-3-clause | 9,954 | 0 | 9 | 1,799 | 1,063 | 635 | 428 | 114 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
{-# OPTIONS_GHC -fno-warn-implicit-prelude #-}
module Paths_Test (
version,
getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import Foreig... | Hidowga/Projetos | dist/build/autogen/Paths_Test.hs | bsd-3-clause | 3,435 | 0 | 21 | 792 | 911 | 482 | 429 | 77 | 5 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Network.Syncthing.Types.Config
( Config(..)
, FolderConfig(..)
, DeviceConfig(..)
, VersioningConfig(..)
, OptionsConfig(..)
, GuiConfig(..)
, AddressType(..)
) where
import Control.Applicative ... | jetho/syncthing-hs | Network/Syncthing/Types/Config.hs | bsd-3-clause | 12,516 | 0 | 32 | 4,309 | 2,277 | 1,301 | 976 | 248 | 1 |
{-
- qqlele/src/QQLeLe/CFG.hs
- copyright (c) 2014 Frano Perleta
-}
-- extensions {{{
{-# LANGUAGE
FlexibleContexts, FlexibleInstances, FunctionalDependencies,
GeneralizedNewtypeDeriving, KindSignatures, MultiParamTypeClasses,
OverlappingInstances, RankNTypes, ScopedTypeVariables,
U... | fperleta/qqlele | src/QQLeLe/CFG.hs | bsd-3-clause | 7,323 | 160 | 13 | 2,200 | 2,928 | 1,586 | 1,342 | 180 | 2 |
module Trains where
import Db
-- Data
u1_01 = TrainId "u1_01"
u1_02 = TrainId "u1_02"
--u1_03 = TrainId "u1_03"
--u1_04 = TrainId "u1_04"
u2_01 = TrainId "u2_01"
u2_02 = TrainId "u2_02"
--u2_03 = TrainId "u2_03"
--u2_04 = TrainId "u2_04"
u3_01 = TrainId "u3_01"
u3_02 = TrainId "u3_02"
--u3_03 = TrainId "u3_03"
--u3... | fadeopolis/prog-spr-ue3 | Trains.hs | bsd-3-clause | 4,097 | 0 | 8 | 614 | 1,158 | 628 | 530 | 107 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.GHC
-- Copyright : Isaac Jones 2003-2007
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- This is a fairly large module. It contains most of the GHC-specific code for
... | dcreager/cabal | Distribution/Simple/GHC.hs | bsd-3-clause | 48,956 | 0 | 27 | 15,245 | 9,837 | 5,178 | 4,659 | 776 | 12 |
{-|
Copyright : (c) Dave Laing, 2017
License : BSD3
Maintainer : dave.laing.80@gmail.com
Stability : experimental
Portability : non-portable
-}
module Fragment.IsoRec.Helpers (
tyRec
, tmFold
, tmUnfold
) where
import Bound (Bound)
import Control.Lens (review)
import Ast.Type
import Ast.Term
import... | dalaing/type-systems | src/Fragment/IsoRec/Helpers.hs | bsd-3-clause | 830 | 0 | 8 | 185 | 279 | 146 | 133 | 20 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
module Snap.Snaplet.Internal.Initializer
( addPostInitHook
, addPostInitHookBase
, toSnapletHook
, bracketInit
, modifyCfg
, nestSnaplet
, embedSnaplet
, makeSnaplet
, nameSnaplet
, onUnload
,... | snapframework/snap | src/Snap/Snaplet/Internal/Initializer.hs | bsd-3-clause | 29,192 | 0 | 19 | 7,776 | 5,567 | 2,891 | 2,676 | 386 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
module Numeric.Sparse.Vector where
import qualified Data.IntMap as M hiding ((!))
import Data.Maybe
import Data.Proxy
import GHC.TypeLits
import Numeric.Sp... | mnick/hsparse | src/Numeric/Sparse/Vector.hs | bsd-3-clause | 4,277 | 0 | 11 | 1,113 | 2,009 | 1,039 | 970 | 75 | 2 |
{-# LANGUAGE EmptyDataDecls, TypeSynonymInstances #-}
{-# OPTIONS_GHC -fcontext-stack42 #-}
module Games.Chaos2010.Database.Current_wizard_square where
import Games.Chaos2010.Database.Fields
import Database.HaskellDB.DBLayout
type Current_wizard_square =
Record
(HCons (LVPair X (Expr (Maybe Int)))
... | JakeWheat/Chaos-2010 | Games/Chaos2010/Database/Current_wizard_square.hs | bsd-3-clause | 480 | 0 | 15 | 67 | 104 | 58 | 46 | 11 | 1 |
{-# OPTIONS_GHC -F -pgmF she #-}
{-# LANGUAGE GADTs, FlexibleContexts, RankNTypes, KindSignatures #-}
module Generics.Morphism.Para where
import Annotation.Annotation
import Control.Applicative
import Control.Category
import Control.Monad hiding (mapM)
import Control.Monad.Identity
import Control.Monad.Lazy
import Dat... | sebastiaanvisser/islay | src/Generics/Morphism/Para.hs | bsd-3-clause | 3,805 | 2 | 14 | 882 | 1,872 | 968 | 904 | -1 | -1 |
module Main where
import UTPC (runApp)
main :: IO ()
main = runApp
| arknave/utpc | app/Main.hs | bsd-3-clause | 69 | 0 | 6 | 15 | 27 | 16 | 11 | 4 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Prompt.AppLauncher
-- Copyright : (C) 2008 Luis Cabellos
-- License : BSD3
--
-- Maintainer : zhen.sydow@gmail.com
-- Stability : unstable
-- Portability : unportable
--
-- A module for launch appli... | MasseR/xmonadcontrib | XMonad/Prompt/AppLauncher.hs | bsd-3-clause | 2,528 | 0 | 9 | 624 | 251 | 149 | 102 | 16 | 1 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
{-# LANGUAGE Over... | rfranek/duckling | Duckling/Quantity/RO/Corpus.hs | bsd-3-clause | 953 | 0 | 11 | 224 | 165 | 98 | 67 | 19 | 1 |
module Text.Search.Sphinx.Configuration where
import qualified Text.Search.Sphinx.Types as T
-- | The configuration for a query
--
-- A note about encodings: The encoding specified here is used to encode
-- every @Text@ value that is sent to the server, and it used to decode all
-- of the server's answers, including ... | gregwebs/haskell-sphinx-client | Text/Search/Sphinx/Configuration.hs | bsd-3-clause | 3,678 | 0 | 10 | 1,253 | 434 | 299 | 135 | 55 | 1 |
{--
Copyright (c) 2009 Maciej Pacula
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distr... | petabricks/petabricks | scripts/oldtuner2/src/GP/Types.hs | mit | 2,810 | 0 | 12 | 769 | 461 | 253 | 208 | 33 | 1 |
{-# LANGUAGE FlexibleContexts, GADTs, OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell, TypeFamilies, QuasiQuotes #-}
module Model where
import Control.Monad (liftM)
import Data.Time
import Database.Persist.Sql
import Database.Persist.TH
import ModelTypes
import Types
import Utils
share [mkPersist sqlSettings, m... | wass80/WXCS | src/Model.hs | mit | 1,868 | 0 | 11 | 336 | 474 | 236 | 238 | 36 | 2 |
module Encryption (encryptPassword) where
import Crypto.Hash.SHA512 (hash)
import Data.ByteString.Char8 (pack, unpack)
encryptPassword :: String -> String
encryptPassword password =
unpack $ hash $ pack $ password
| jkwatson/eboshi_api_shootout | haskell_scotty/Encryption.hs | mit | 219 | 0 | 7 | 31 | 63 | 37 | 26 | 6 | 1 |
module Tandoori.GHC.Parse (parseMod, getDecls) where
import Tandoori.GHC.Internals
--import DynFlags (Settings (..))
import Control.Monad.IO.Class (liftIO)
import GHC
import GHC.Paths (libdir)
import HsSyn (hsmodDe... | themattchan/tandoori | library/Tandoori/GHC/Parse.hs | bsd-3-clause | 1,051 | 0 | 12 | 358 | 270 | 146 | 124 | 20 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
-- | Perform a build
module Stack.Build.Execute... | lukexi/stack | src/Stack/Build/Execute.hs | bsd-3-clause | 60,986 | 344 | 28 | 24,588 | 11,448 | 6,103 | 5,345 | -1 | -1 |
{-# LANGUAGE BangPatterns #-}
{- | This module defines `Schema`s,
which can generate passwords. -}
module Scat.Schemas
(
-- * Type
Schema
-- ** Constructors
, withDefaultSize
, ignoreSize
-- ** Destructor
, getBuilder
-- * Built-in schemas
-- ** Passwords
, safe
... | rnhmjoj/scat | src/Scat/Schemas.hs | bsd-3-clause | 5,552 | 0 | 18 | 1,550 | 1,539 | 804 | 735 | 114 | 8 |
-- Copyright (c) 2014 Eric McCorkle. All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:
--
-- 1. Redistributions of source code must retain the above copyright
-- notice, this list of conditi... | emc2/compiler-misc | src/Control/Monad/Frontend.hs | bsd-3-clause | 5,714 | 0 | 15 | 1,312 | 957 | 543 | 414 | 99 | 1 |
{-# LANGUAGE CPP, TypeFamilies #-}
-- Type definitions for the constraint solver
module TcSMonad (
-- The work list
WorkList(..), isEmptyWorkList, emptyWorkList,
extendWorkListNonEq, extendWorkListCt, extendWorkListDerived,
extendWorkListCts, appendWorkList,
selectNextWorkItem,
workListSize, w... | anton-dessiatov/ghc | compiler/typecheck/TcSMonad.hs | bsd-3-clause | 110,988 | 42 | 24 | 31,351 | 17,791 | 9,401 | 8,390 | -1 | -1 |
module Model where
import Prelude
import Yesod
import Data.Text (Text)
import Database.Persist.Quasi
import Data.Typeable (Typeable)
import Data.Time
import Yesod.Auth.HashDB (HashDBUser(..))
-- You can define all of your database entities in the entities file.
-- You can find more information on persistent and how t... | ikeda-yuko/nomnichi-haskell | Model.hs | bsd-2-clause | 742 | 0 | 8 | 157 | 140 | 81 | 59 | -1 | -1 |
-- GSoC 2015 - Haskell bindings for OpenCog.
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
-- | This Module defines some useful data types for proper interaction
-- with the AtomSpace C wrapper library.
-- Intended for internal use only.
module OpenCog.AtomSpace.Internal ... | inflector/atomspace | opencog/haskell/OpenCog/AtomSpace/Internal.hs | agpl-3.0 | 1,812 | 0 | 13 | 471 | 572 | 320 | 252 | 34 | 1 |
{-# LANGUAGE DatatypeContexts #-}
import Data.Array
type IndirectDfa a = (Int, [IndirectState a])
data IndirectState a =
IndirectState Bool [(a, Int)]
data DirectDfa a
= DirectState Bool [(a, DirectDfa a)]
runDfa :: (Eq a) => DirectDfa a -> [a] -> Bool
runDfa (DirectState final trans) []
= final
runDfa (Di... | bitemyapp/ghc-vis | docs/dfa.hs | bsd-3-clause | 1,133 | 0 | 12 | 330 | 472 | 263 | 209 | 29 | 2 |
<?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>Windows WebDrivers</title>
<maps>
<homeID>top</homeID>
<mapref location=... | kingthorin/zap-extensions | addOns/webdrivers/webdriverwindows/src/main/javahelp/org/zaproxy/zap/extension/webdriverwindows/resources/help_it_IT/helpset_it_IT.hs | apache-2.0 | 963 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1998
\section[ConLike]{@ConLike@: Constructor-like things}
-}
{-# LANGUAGE CPP #-}
module ConLike (
ConLike(..)
, conLikeArity
, conLikeFieldLabels
, conLikeInstOrigArgTys
, conLikeExTyVars... | ezyang/ghc | compiler/basicTypes/ConLike.hs | bsd-3-clause | 6,688 | 0 | 11 | 1,430 | 1,288 | 695 | 593 | 101 | 1 |
module T13585 where
import T13585b (extractZonedTime)
main :: IO ()
main = print extractZonedTime
| ezyang/ghc | testsuite/tests/typecheck/should_compile/T13585.hs | bsd-3-clause | 99 | 0 | 6 | 15 | 30 | 17 | 13 | 4 | 1 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
\section[StgLint]{A ``lint'' pass to check for Stg correctness}
-}
{-# LANGUAGE CPP #-}
module StgLint ( lintStgBindings ) where
import StgSyn
import Bag ( Bag, emptyBag, isEmptyBag, snocBag, bagToList )
import Id ( Id, idType,... | forked-upstream-packages-for-ghcjs/ghc | compiler/stgSyn/StgLint.hs | bsd-3-clause | 18,280 | 0 | 19 | 5,286 | 4,898 | 2,496 | 2,402 | -1 | -1 |
{-# LANGUAGE RankNTypes #-}
-- This program must be called with GHC's libdir as the single command line
-- argument.
module Main where
-- import Data.Generics
import Data.Data
import Data.List
import System.IO
import GHC
import DynFlags
import MonadUtils
import Outputable
import Bag (filterBag,isEmptyBag)
import Syste... | forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/ghc-api/annotations-literals/parsed.hs | bsd-3-clause | 3,322 | 1 | 14 | 943 | 1,041 | 540 | 501 | 69 | 13 |
module R where
import P
r = "R: " ++ p
| mydaum/cabal | cabal-testsuite/PackageTests/InternalLibraries/r/R.hs | bsd-3-clause | 39 | 0 | 5 | 11 | 16 | 10 | 6 | 3 | 1 |
module T11462_Plugin(plugin) where
import TcRnMonad ( TcPlugin(..), TcPluginResult(..) )
import Plugins ( defaultPlugin, Plugin(..), CommandLineOption )
plugin :: Plugin
plugin = defaultPlugin { tcPlugin = Just . thePlugin }
thePlugin :: [CommandLineOption] -> TcPlugin
thePlugin opts = TcPlugin
{ tcPluginInit = r... | olsner/ghc | testsuite/tests/typecheck/should_compile/T11462_Plugin.hs | bsd-3-clause | 427 | 0 | 10 | 77 | 147 | 87 | 60 | 10 | 1 |
{-# LANGUAGE PatternGuards #-}
module Text.BraVal.Types
( Symbolic (..)
, Symbol (..)
, SymbolPrimitive (..)
, Cursor (..), startingCursor, advanceLine, advanceColumn
, table
) where
import Control.Arrow ((>>>))
import Data.List (groupBy)
import Data.Monoid ((<>))
data SymbolPrimitive = ORoun... | kindaro/BraVal | src/Text/BraVal/Types.hs | isc | 2,896 | 0 | 15 | 973 | 1,131 | 619 | 512 | 77 | 1 |
module GHCJS.DOM.StorageQuotaCallback (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/StorageQuotaCallback.hs | mit | 50 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
module TicTacToe (Board, Player, gameOver, winner, tie, move, initBoard, yourTurn) where
import Data.Maybe (isNothing, isJust)
data Player = Xer | Oer
deriving (Eq, Show)
data Cell = X | O | E
deriving (Eq, Show)
type Board = [Cell]
rows :: Board -> [[Cell]]
rows b = [[b!!0 , b!!1, b!!2]... | CementTheBlock/TicTacToe | src/TicTacToe.hs | mit | 2,945 | 0 | 10 | 899 | 1,221 | 652 | 569 | 73 | 2 |
module Main where
import Control.Monad (forever)
import Reactive.Banana
import Reactive.Banana.Frameworks
import System.IO (BufferMode(..), hSetEcho, hSetBuffering, stdin)
import Render
import Bananasnake
main :: IO ()
main = do
turnOffInputBuffering
(addKeyEvent, fireKey) <- newAddHandler
network <- compile $... | CRogers/bananasnake | src/Main.hs | mit | 754 | 0 | 10 | 113 | 225 | 113 | 112 | 23 | 1 |
module Mozart.Composition (compose) where
import Control.Concurrent.Async
import qualified Data.ByteString.Lazy as BL
import qualified Data.ByteString.Lazy.Char8 as CL
import Data.List
import Data.String.Utils (replace)
import Mozart.Configuration
import Mozart.Envelope as E
import Network.HTTP
import Network.URI (p... | wildlyinaccurate/mozart | src/Mozart/Composition.hs | mit | 1,878 | 0 | 15 | 440 | 515 | 263 | 252 | 42 | 2 |
module Problem25 where
main = print $ fst . head $ dropWhile (\(c, n) -> digitCount n < 1000) $
zip [1..] fib
digitCount :: Integer -> Int
digitCount = length . show
fib :: [Integer]
fib = 1 : 1 : zipWith (+) fib (tail fib)
| DevJac/haskell-project-euler | src/Problem25.hs | mit | 237 | 0 | 11 | 60 | 111 | 61 | 50 | 7 | 1 |
module LSys.Sierpinski (sierpinski) where
import LSys.LSys
import Turtle
import Data.Set (fromList)
sierpinski :: LSys Char
sierpinski = LSys {
_alph = fromList "AB+-",
_state = "A",
_rule = sieRule,
_display = sieDraw
}
sieRule :: Char -> String
sieRule 'A' = "+B-A-B+"
sieRule 'B' = "-A+B+A-"
sieRule... | lesguillemets/lsyst.hs | src/LSys/Sierpinski.hs | mit | 617 | 0 | 9 | 119 | 234 | 126 | 108 | 23 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
import Data.Conduit
import qualified Data.Conduit.Binary as CB
import qualified Data.Conduit.Combinators as CC
import Control.Monad.Trans.Resource
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as BSC
import Data.Maybe
impo... | dancor/melang | src/Main/gww-word-count.hs | mit | 2,817 | 0 | 18 | 792 | 887 | 464 | 423 | 69 | 2 |
isPalindrome :: Eq a => [a] -> Bool
isPalindrome xs = all (uncurry (==)) $ zip xs $ reverse xs
| tamasgal/haskell_exercises | 99questions/Problem06.hs | mit | 96 | 0 | 9 | 21 | 53 | 26 | 27 | 2 | 1 |
{-# LANGUAGE CPP #-}
{- arch-tag: Path utilities main file
Copyright (C) 2004-2011 John Goerzen <jgoerzen@complete.org>
All rights reserved.
For license and copyright information, see the file LICENSE
-}
{- |
Module : System.Path
Copyright : Copyright (C) 2004-2011 John Goerzen
License : BSD3
Ma... | haskellbr/missingh | missingh-all/src/System/Path.hs | mit | 5,378 | 0 | 11 | 1,387 | 618 | 330 | 288 | 59 | 2 |
-- | The user module, for user logic.
module ChatCore.ChatUser
( ChatUser (..)
, chatUserName
, bUserNetworks
, bUserClients
, chatUser
) where
import Control.Applicative
import Control.Lens
import Control.Monad
import Data.Acid
import qualified Data.IxSet as I
import qualified Data.Map as M
i... | Forkk/ChatCore | ChatCore/ChatUser.hs | mit | 5,458 | 8 | 15 | 1,179 | 1,039 | 552 | 487 | -1 | -1 |
module Experiments where
import InterBasics(join)
import Control.Monad(replicateM)
import System.IO(hSetBuffering,stdout,BufferMode(LineBuffering))
{- getting n lines - still consumes the whole of the input :-( -}
getNlines :: Int -> IO String
getNlines 0 =
return []
getNlines n =
do l <- getLine
... | simonjohnthompson/Interaction | Experiments.hs | mit | 830 | 0 | 11 | 196 | 267 | 137 | 130 | 21 | 1 |
module AI.Lab1.Lab1 where
import Data.Maybe
import System.IO
import qualified Data.Vector.Unboxed as VU
-- | Sampling time for all samples in milliseconds
samplingTime :: Int
samplingTime = 300
-- | Calculate the sampling rate from a signal
samplingRate :: [Int] -> Double
samplingRate samples = fromIntegral (length... | RossMeikleham/AI | src/AI/Lab1/Lab1.hs | mit | 6,810 | 0 | 24 | 2,537 | 1,728 | 933 | 795 | 98 | 1 |
{-# OPTIONS_GHC -Wall #-}
-- Dependant on cabal packages: sdl2, wave.
module Main where
import qualified Control.Concurrent as C
--import qualified Control.Monad as M
import qualified Data.Vector.Storable.Mutable as V
import qualified Data.Set as S
import Foreign.ForeignPtr as P
import qualified SDL
import quali... | MiroslavVitkov/voiceid | src/Main.hs | mit | 1,767 | 0 | 12 | 519 | 432 | 248 | 184 | 37 | 1 |
{-# LANGUAGE
GADTs,
MultiParamTypeClasses,
TypeSynonymInstances,
FunctionalDependencies,
FlexibleInstances,
FlexibleContexts,
UndecidableInstances
#-}
-- NOTE - This module isn't even used in this project. This was an experimental
-- next move that I was overzealously planning while ... | orblivion/Haskell-Synth | Units.hs | mit | 6,050 | 0 | 9 | 1,093 | 1,280 | 669 | 611 | 83 | 1 |
{- |
Copyright: (c) 2022 Kowainik
SPDX-License-Identifier: MIT
Maintainer: Kowainik <xrom.xkov@gmail.com>
Full-featured test project
-}
module FullBatteries
( projectName
) where
projectName :: String
projectName = "full-batteries"
| vrom911/hs-init | summoner-cli/examples/full-batteries/src/FullBatteries.hs | mit | 244 | 0 | 4 | 39 | 20 | 13 | 7 | 4 | 1 |
module Examples.EX2 where
import Control.Lens
import Control.Lens.Setter
import Control.Monad (void)
import Control.Monad.Trans.Class (lift)
import Data.List (intersperse)
import Data.Time.LocalTime
import Twilio.IVR
data User = User {
uid :: String,
name :: String,
balance :: Int
}
users = [
U... | steven777400/TwilioIVR | src/Examples/EX2.hs | mit | 1,352 | 0 | 14 | 380 | 373 | 197 | 176 | 36 | 3 |
#!/usr/bin/env stack
{- stack
--resolver nightly-2022-01-10
script
--package base
-}
main :: IO ()
main = putStrLn "Hello, World!"
| vrom911/hs-init | summoner-cli/examples/stackScript.hs | mit | 138 | 1 | 6 | 26 | 24 | 11 | 13 | 2 | 1 |
main = print $ answer 1 $ length $ collatz 1
answer :: Int -> Int -> Int
answer 1000000 x = x
answer n x = if (length $ collatz n) > (length $ collatz x)
then answer (n+1) n
else answer (n+1) x
collatz :: Int -> [Int]
collatz n | n == 1 = [n]
| even n = n : (collatz $ n `qu... | lekto/haskell | Project-Euler-Solutions/problem0014.hs | mit | 375 | 1 | 10 | 135 | 215 | 105 | 110 | 10 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Ketchup.Routing
( Route
, match
, prefix
, route
, useHandler
) where
import qualified Data.ByteString.Char8 as B
import Ketchup.Httpd
import Ketchup.Utils
import Network
type Route = Socket -> HTTPRequest -> (B.ByteString -> Ma... | silverweed/ketchup | Ketchup/Routing.hs | mit | 2,466 | 0 | 11 | 714 | 762 | 409 | 353 | 49 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Page
(
gameSite
, jsInject
, makeMove
, getScore
, getGameState
) where
import Board
import Test.WebDriver
import Data.List (transpose)
import qualified Data.Aeson as A
import qualified Data.Text as T
gameSite :: WD ()
gameSite = openPage "http:/... | mattvperry/AI-2048-hs | src/Page.hs | mit | 1,330 | 0 | 12 | 256 | 343 | 174 | 169 | 35 | 1 |
{-# LANGUAGE PackageImports #-}
module Netmosphere.IPFilter where
import "bytestring-trie" Data.Trie
| TOSPIO/netmosphere-core | src/Netmosphere/IPFilter.hs | mit | 105 | 0 | 4 | 14 | 13 | 9 | 4 | 3 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
module Ledger.Errors where
import Control.Exception
import Data.Text
import Data.Typeable
import Ledger.Types
data LedgerException = CommodityMismatch { leCmOperator :: Text
, leCmLeft :: Amount
... | ledger/commodities | Data/Commodity/Errors.hs | mit | 430 | 0 | 8 | 152 | 72 | 43 | 29 | 11 | 0 |
import Hand (Suit(..), Rank(..), Card(..), Hand(Hand))
-- | 'main' runs the main program
main :: IO ()
main = print $ straightFlush `compare` quads
where
straightFlush = Hand Card {rank = Three, suit = Spades}
Card {rank = Four, suit = Spades}
Card {rank = Five,... | benperez/chinese-poker | src/Main.hs | mit | 717 | 0 | 9 | 284 | 234 | 145 | 89 | 13 | 1 |
{-# LANGUAGE RecordWildCards, NoMonomorphismRestriction #-}
module Idea(module Idea, Severity(..)) where
import HSE.All
import Settings
import Language.Haskell.HsColour.TTY
import Language.Haskell.HsColour.Colourise
import Util
data Idea
= Idea {func :: FuncName, severity :: Severity, hint :: String, loc :: Src... | alphaHeavy/hlint | src/Idea.hs | gpl-2.0 | 1,433 | 0 | 14 | 337 | 549 | 299 | 250 | 33 | 1 |
import Data.Maybe
maybeRead :: Read a => String -> Maybe a
maybeRead s = case reads s of
[(x,"")] -> Just x
_ -> Nothing
getListFromString :: String -> Maybe [Integer]
getListFromString str = maybeRead $ "[" ++ str ++ "]"
askUser :: IO [Integer]
askUser =
putStrLn... | ardumont/haskell-lab | src/io.hs | gpl-2.0 | 581 | 0 | 12 | 181 | 198 | 99 | 99 | 18 | 2 |
module Test where
scalaskel :: (Enum t, Eq t, Num t) => t -> [(t, t, t, t)]
scalaskel n = [(w, x, y, z) |
w <- [0..n],
x <- [0..n],
y <- [0..n],
z <- [0..n],
(1 * w) + (7 * x) + (11 * y) + (21 * z) == n]
-- *Test> map scalaskel [1..10]
-- [[(1... | ardumont/haskell-lab | src/enonce1.hs | gpl-2.0 | 479 | 0 | 12 | 139 | 174 | 99 | 75 | 8 | 1 |
{-# LANGUAGE OverlappingInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module Blubber where
class Test a where
foo :: a -> Int
instance Test Int where
foo _ = 2
instance Test a where
foo _ = 66
jsf
test1 = foo (2::Int) -- chooses more specific instance
-- test2 = foo 22 -- fails to compile. not so i... | haraldsteinlechner/lambdaWolf | Blubber.hs | gpl-3.0 | 484 | 0 | 7 | 111 | 77 | 43 | 34 | -1 | -1 |
-- | Gets the GHC Core information we need, also obtains or creates the
-- QuickSpec signature
{-# LANGUAGE RecordWildCards, CPP #-}
module HipSpec.Read (execute,EntryResult(..),SigInfo(..)) where
import Test.QuickSpec.Signature (Sig)
import HipSpec.ParseDSL
import Data.List.Split (splitOn)
import HipSpec.Sig.Res... | danr/hipspec | src/HipSpec/Read.hs | gpl-3.0 | 5,927 | 0 | 24 | 1,896 | 1,244 | 663 | 581 | 114 | 4 |
module Handler.CCSpec(spec) where
import TestImport
import qualified TestImport as I
import qualified Yesod.Test.TransversingCSS as CSS
import Yesod.Auth
import Test.QuickCheck.Monadic
import Test.QuickCheck
import qualified Test.HUnit
import Network.Wai.Test
import Network.HTTP.Types.Method
import qualified Data.Map... | nishiuramakoto/logiku | test/Handler/CCSpec.hs | gpl-3.0 | 7,092 | 0 | 18 | 1,822 | 1,686 | 749 | 937 | 189 | 1 |
-- find the prime factors of a number
p35 n = f n primes where
f n p@(x:xs)
| n < 2 = []
| mod n x == 0 = x : f (div n x) p
| otherwise = f n xs
primes = sieve [2..] where
sieve (x:xs) = x : sieve [ z | z <- xs, mod z x /= 0 ]
| yalpul/CENG242 | H99/31-41/p35.hs | gpl-3.0 | 308 | 0 | 14 | 148 | 157 | 76 | 81 | 7 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-accesscontextmanager/gen/Network/Google/Resource/AccessContextManager/AccessPolicies/AccessLevels/List.hs | mpl-2.0 | 7,008 | 0 | 19 | 1,555 | 962 | 556 | 406 | 143 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/Types.hs | mpl-2.0 | 74,709 | 0 | 37 | 17,096 | 13,021 | 7,405 | 5,616 | -1 | -1 |
module Main where
import Criterion.Main
import Data.Either
import Data.String.Utils (replace)
import Parsing.Parse (parse)
import Parsing.ParseOptions (defaultParseOptions)
import Rendering.Render (toHtml)
import Rendering.RenderOptions (RenderOptions, defaultRenderOptions, inlineCSS, inlineJS)
parseAndRender :: Ren... | alexbecker/blogdown | test/Benchmark.hs | agpl-3.0 | 870 | 0 | 14 | 138 | 237 | 125 | 112 | 17 | 1 |
{-
Author : shelarcy 2004
Advised by: Sean Seefried
Adapted from: BezCurve.hs
By: (c) Sven Panne 2003 <sven_panne@yahoo.com>
"BezCurve.hs (adapted from fog.c which is (c) Silicon Graphics, Inc)
This file is part of HOpenGL and distributed under a BSD-style license
See the file librar... | ekmett/wxHaskell | samples/contrib/GLCanvas.hs | lgpl-2.1 | 3,862 | 0 | 13 | 963 | 1,355 | 693 | 662 | 74 | 2 |
-- Hoff -- A gatekeeper for your commits
-- Copyright 2016 Ruud van Asseldonk
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- A copy of the License has been included in the root of the repository.
{-# LANGUAGE OverloadedString... | ruuda/hoff | src/WebInterface.hs | apache-2.0 | 6,316 | 0 | 17 | 1,291 | 1,460 | 741 | 719 | 124 | 2 |
-- starman.hs
-- Jeremy Singer
-- based on a Functional Programming
-- exercise from Glasgow,
-- (inherited from John O'Donnell)
check :: String -> String -> Char -> (Bool, String)
-- check whether a single char is in the mystery word
check word display c
= (c `elem` word, [if x==c
then c
else y... | P7h/FutureLearn__FP_in_Haskell | Week2_Code__starman.hs | apache-2.0 | 1,191 | 0 | 12 | 314 | 365 | 186 | 179 | 22 | 3 |
-- | Simple rate limiting combinator.
module NationStates.RateLimit (
RateLimit(),
newRateLimit,
rateLimit,
setDelay,
) where
import Control.Concurrent
import Control.Exception
import System.Clock
data RateLimit = RateLimit {
_rateLock :: !(MVar TimeSpec),
_rateDelay :: !TimeSpec
}
... | lfairy/nationstates | NationStates/RateLimit.hs | apache-2.0 | 1,470 | 0 | 13 | 331 | 368 | 191 | 177 | 37 | 1 |
import GHC.Conc (setNumCapabilities)
import LogicGrowsOnTrees.Parallel.Adapter.Threads
(RunOutcome(..)
,TerminationReason(..)
,exploreTree
,setNumberOfWorkers
)
import LogicGrowsOnTrees.Utils.WordSum (WordSum(..))
import LogicGrowsOnTrees.Examples.Queens (nqueensUsingBitsSolutions)
main = do
s... | gcross/LogicGrowsOnTrees | LogicGrowsOnTrees/tutorial/tutorial-6.hs | bsd-2-clause | 780 | 3 | 15 | 184 | 203 | 100 | 103 | 22 | 3 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Text.XML.Cursor.FromXML
( FromXML
, fromXML
, (!<@>)
, (?<@>)
, (!<|>)
, cont
, (?<|>)
, (?<.>)
, (!<.>)
, (!<=>)
, (?<=>)
, (<//.>)
, (!<//.>)
, (<//=>... | ocharles/Web-MusicBrainz | Text/XML/Cursor/FromXML.hs | bsd-2-clause | 4,055 | 0 | 11 | 866 | 1,172 | 654 | 518 | 72 | 1 |
{- |
Module : Data.Conduit.EndOnQ
Copyright : (c) Nathan Ingle
Licence : BSD2
Maintainer : elgni.nahtan@gmail.com
Stability : experimental
Portability : portable
Provides a conduit to watch standard input and terminate upon receipt of 'q'.
-}
module Data.Conduit.EndOnQ (endOnQ) where
import Data.Condui... | nathaningle/hs-ifstat | src/Data/Conduit/EndOnQ.hs | bsd-2-clause | 751 | 5 | 14 | 169 | 187 | 93 | 94 | 22 | 4 |
-- http://www.codewars.com/kata/540c013634e6bac0350000a5
module Codewars.Kata.Unique where
import Control.Arrow
projectPartners :: Integer -> Integer
projectPartners = (`div` 2) . uncurry (*) . (id &&& pred) | Bodigrim/katas | src/haskell/7-Unique-Pairs.hs | bsd-2-clause | 210 | 0 | 7 | 25 | 53 | 33 | 20 | 4 | 1 |
{-# LANGUAGE NamedFieldPuns #-}
-- |A Node that detects UFOs (white pixels on a black sky background)
-- in a video feed from a sensor.
module DetectUFO (detectUFO, main) where
import Ros.Node
import qualified Data.Vector.Storable as V
import Data.Word (Word8)
import Ros.Sensor_msgs.Image (Image(..), width, height, enc... | rgleichman/roshask | Examples/NodeCompose/src/DetectUFO.hs | bsd-3-clause | 1,017 | 0 | 11 | 216 | 344 | 189 | 155 | 20 | 1 |
{-# LANGUAGE OverlappingInstances, TypeSynonymInstances, FlexibleInstances #-}
-- | Define BERT terms their binary encoding & decoding and a typeclass
-- for converting Haskell values to BERT terms and back.
--
-- We define a number of convenient instances for 'BERT'. Users will
-- probably want to define their own ins... | feuerbach/bert | src/Data/BERT/Term.hs | bsd-3-clause | 11,297 | 0 | 15 | 2,695 | 3,957 | 2,015 | 1,942 | 253 | 21 |
import Control.Monad.IO.Class
import Data.Conduit.Shell
import System.Directory
main =
run (do exists <- liftIO (doesDirectoryExist "fpco")
if exists
then rm "fpco/.hsenvs" "-rf"
else git "clone" "git@github.com:fpco/fpco.git"
liftIO (setCurrentDirectory "fpco")
... | chrisdone/shell-conduit | examples/Clone.hs | bsd-3-clause | 425 | 0 | 12 | 112 | 94 | 45 | 49 | 12 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Text.Pandoc.Readers.ScalarSpec (main, spec) where
import Test.Hspec
import Test.QuickCheck
import Text.Scalar.Types
import Text.Pandoc.Readers.Scalar
import Text.Pandoc
import Text.Pandoc.Builder
import Data.Either (isRight)
import qualified Data.Map as Map
import Text.Sca... | corajr/scalar-convert | test/Text/Pandoc/Readers/ScalarSpec.hs | bsd-3-clause | 2,084 | 0 | 18 | 389 | 509 | 279 | 230 | 44 | 1 |
module Rules.Gmp (gmpRules, gmpBuildPath, gmpObjects, gmpLibraryH) where
import Base
import Context
import Oracles.Setting
import Packages
import Target
import Utilities
-- | Build GMP library objects and return their paths.
gmpObjects :: Action [FilePath]
gmpObjects = do
gmpPath <- gmpBuildPath
need [gmpPath... | sdiehl/ghc | hadrian/src/Rules/Gmp.hs | bsd-3-clause | 5,369 | 0 | 22 | 1,338 | 1,048 | 535 | 513 | 84 | 2 |
{-# LANGUAGE DeriveFunctor #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Types
-- Copyright : (c) David Himmelstrup 2005
-- Duncan Coutts 2011
-- License : BSD-like
--
-- Maintainer : cabal-devel@haskell.org
-- S... | ian-ross/cabal | cabal-install/Distribution/Client/Types.hs | bsd-3-clause | 10,643 | 0 | 11 | 2,183 | 1,481 | 871 | 610 | 143 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : RefacTypeSig
-- Copyright : (c) Christopher Brown 2006
--
-- Maintainer : cmb21@kent.ac.uk
-- Stability : provisional
-- Portability : portable
--
-- This module contains a transformation for HaRe.
-- Add type ... | forste/haReFork | refactorer/RefacTypeSig.hs | bsd-3-clause | 7,685 | 0 | 20 | 2,558 | 1,702 | 895 | 807 | -1 | -1 |
-- Copyright 2013 Kevin Backhouse.
{-|
An example of the use of the
'Control.Monad.MultiPass.Instrument.OrdCons.OrdCons' instrument.
-}
module Control.Monad.MultiPass.Example.OrdCons ( convertArray )
where
import Control.Monad.ST2
import Control.Monad.MultiPass
import Control.Monad.MultiPass.Instrument.CreateST2Arra... | kevinbackhouse/Control-Monad-MultiPass | src/Control/Monad/MultiPass/Example/OrdCons.hs | bsd-3-clause | 1,304 | 0 | 12 | 301 | 445 | 240 | 205 | -1 | -1 |
-- |
-- Module : Network.SimpleIRC.Core
-- Copyright : (c) Dominik Picheta 2010
-- License : BSD3
--
-- Maintainer : morfeusz8@gmail.com
-- Stability : provisional
-- Portability : portable
--
-- For information on how to use this library please take a look at the readme file on github, <http://github.com/dom96/SimpleI... | MagneticDuck/simpleirc | Network/SimpleIRC/Core.hs | bsd-3-clause | 17,535 | 0 | 20 | 4,651 | 5,436 | 2,764 | 2,672 | 433 | 5 |
{-# LANGUAGE CPP, ForeignFunctionInterface #-}
#include "ghcconfig.h"
-----------------------------------------------------------------------------
--
-- (c) The University of Glasgow, 2004
--
-- runghc program, for invoking from a #! line in a script. For example:
--
-- script.lhs:
-- #!/usr/bin/env /usr/bin/r... | nomeata/ghc | utils/runghc/runghc.hs | bsd-3-clause | 5,945 | 9 | 25 | 1,819 | 1,451 | 764 | 687 | 100 | 6 |
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE OverloadedStrings #-}
module Views.UserSplices where
import Control.Arrow (second)
import Control.Monad.Trans
import Data.Maybe (fromMaybe)
import qualified Data.Text as T
import Data.Time
import ... | HaskellCNOrg/snap-web | src/Views/UserSplices.hs | bsd-3-clause | 2,837 | 0 | 10 | 750 | 482 | 263 | 219 | 47 | 2 |
import Prelude
{-import Data.AltComposition-}
(%*.**) :: (c -> d -> e) -> (a -> b -> c) -> a -> b -> d -> e
(f %*.** g) x y z = f (g x y) z
infixr 9 %*.**
(%*-**) :: (c -> d -> e) -> (a -> b -> c) -> (a,b,d) -> e
(f %*-** g) (x,y,z) = f (g x y) z
infixr 9 %*-**
add :: Int -> Int -> Int
add x y = x + y
mult :: Int ... | jcristovao/altcomposition | test/test0.hs | bsd-3-clause | 1,291 | 0 | 14 | 406 | 701 | 380 | 321 | -1 | -1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeFamilies, QuasiQuotes, MultiParamTypeClasses,TemplateHaskell, OverloadedStrings #-}
module Handler.Caption (postCaptionR) where
import Foundation
import Forms.Caption
import Helpers.Document
import qualified Data.Text as T
postCaptionR :: ImagesId ->Handler RepHtml
postCaptionR i... | pankajmore/Imghost | Handler/Caption.hs | bsd-3-clause | 632 | 0 | 18 | 146 | 148 | 77 | 71 | 15 | 2 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.PGI.VertexHints
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability ... | haskell-opengl/OpenGLRaw | src/Graphics/GL/PGI/VertexHints.hs | bsd-3-clause | 1,353 | 0 | 5 | 175 | 152 | 99 | 53 | 28 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.