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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module Language.Lua.AST where
import Text.Parsec (SourcePos)
import Language.Lua.Symbol (Intrinsic)
data LuaProgram = LuaProgram FilePath Block deriving(Eq, Ord, Show)
data Block = Block [Statement] (Maybe LastStatement) deriving(Eq, Ord, Show)
data Function = Function SourcePos [Name] Block SourcePos deriving(Eq, O... | ykst/llint | Language/Lua/AST.hs | mit | 2,282 | 0 | 8 | 421 | 692 | 390 | 302 | 63 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
-- | This module enables debugging all 'ByteString' to 'Text' to 'String' conversions.
-- This is an internal module.
--
-- @since 0.5.67
module B9.Text
( Text,
LazyText,
ByteString,
LazyByteString,
Textual (..),
writeTextFi... | sheyll/b9-vm-image-builder | src/lib/B9/Text.hs | mit | 4,306 | 0 | 16 | 901 | 740 | 423 | 317 | -1 | -1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE RecordWildCards #-... | unisonweb/platform | parser-typechecker/src/Unison/Codebase/Editor/HandleInput.hs | mit | 132,775 | 0 | 42 | 40,681 | 36,988 | 18,359 | 18,629 | -1 | -1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# OPTIONS_GHC -Wno-orphans #-}
module Instances.Response where
import GHC.Generics
import Test.QuickCheck.Arbitrary.Generic
import Test.QuickCheck.Instances()
import Web.Face... | Vlix/facebookmessenger | test/Instances/Response.hs | mit | 3,784 | 0 | 9 | 485 | 673 | 371 | 302 | 100 | 0 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UndecidableInstances #-}
module WeiXin.PublicPlatform.Conversation.Yesod where
-- {{{1 imports
import ClassyPrelude.Yesod hiding (Proxy, proxy)
import qualified Control.Exception.Safe as ExcSafe
import Control.Monad.Logger
import Data.Proxy
import qualified Data.ByteSt... | yoo-e/weixin-mp-sdk | WeiXin/PublicPlatform/Conversation/Yesod.hs | mit | 26,066 | 1 | 27 | 8,515 | 5,391 | 2,736 | 2,655 | -1 | -1 |
module Exercise where
perfect :: Int -> Bool
perfect n = sum (delers n) == n
delers :: Int -> [Int]
delers n = [x | x <- [1..n-1], n `mod` x == 0]
perfectTill :: Int -> [Int]
perfectTill n = filter perfect [1..n]
| tcoenraad/functioneel-programmeren | 2012/opg1a.hs | mit | 217 | 0 | 9 | 49 | 118 | 64 | 54 | 7 | 1 |
module Graphics.UI.Gtk.WebKit.WebView.Concrete (
titleChanged,
resourceRequestStarting
) where
import Graphics.UI.Gtk.WebKit.NetworkRequest (NetworkRequest)
import Graphics.UI.Gtk.WebKit.NetworkResponse (NetworkResponse)
import Graphics.UI.Gtk.WebKit.WebFrame (WebFrame)
import Graphics.UI.Gtk.WebKit.WebResource (W... | fmap/hwb | src/Graphics/UI/Gtk/WebKit/WebView/Concrete.hs | mit | 795 | 0 | 12 | 71 | 193 | 119 | 74 | 14 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeApplications #-}
module Examples.Rpc.EchoServer (main) where
import Network.Simple.TCP (serve)
import Capnp.New (SomeServer, def, defaultLimit, export, handleParsed)
import Capnp.Rpc (ConnConfig(..), handleConn, socket... | zenhack/haskell-capnp | examples/lib/Examples/Rpc/EchoServer.hs | mit | 817 | 0 | 13 | 152 | 215 | 124 | 91 | 18 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Concurrent (threadDelay)
import Control.Monad (forever)
import Control.Monad.IO.Class (liftIO)
import Data.Text (Text)
import System.Environment (getArgs)
import System.Random (randomRIO)
import HBar
main :: IO ()
main = do
selection <- head <$> g... | kosmoskatten/plotly-hs | plotly-hbar-demo/src/Main.hs | mit | 1,971 | 0 | 12 | 379 | 533 | 273 | 260 | 60 | 3 |
-- Statistics for an Athletic Association
-- http://www.codewars.com/kata/55b3425df71c1201a800009c/
module Codewars.G964.Stat where
import Data.List (sort, intercalate)
import Data.List.Split (split, dropDelims, oneOf)
import Text.Printf (printf)
stat :: String -> String
stat "" = ""
stat results = present . map ((s... | gafiatulin/codewars | src/6 kyu/Stat.hs | mit | 1,191 | 0 | 15 | 413 | 467 | 250 | 217 | 20 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module System.Etc.Resolver.Cli.CommandTest where
import RIO
import qualified RIO.Set as Set
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit (assertBool, assertEqual, assertFai... | roman/Haskell-etc | etc/test/System/Etc/Resolver/Cli/CommandTest.hs | mit | 11,878 | 0 | 19 | 4,345 | 1,940 | 1,016 | 924 | 263 | 8 |
{-# LANGUAGE Arrows, NoMonomorphismRestriction, RebindableSyntax #-}
module System.ArrowVHDL.Circuit.Defaults where
import Control.Category
import Prelude hiding (id, (.))
import qualified Data.Bits as B -- (shiftL, shiftR, xor, (.&.))
import System.ArrowVHDL.Circuit
import System.ArrowVHDL.Circuit.Grid
import Sys... | frosch03/arrowVHDL | src/System/ArrowVHDL/Circuit/Defaults.hs | cc0-1.0 | 12,752 | 0 | 13 | 4,855 | 2,686 | 1,590 | 1,096 | 266 | 1 |
{- Circuit patterns transliterated from Lava / the Haskell Prelude / ...
- Copyright : (C)opyright 2006, 2009-2011 peteg42 at gmail dot com
- License : GPL (see COPYING for details)
-
- We count from /1/ to /n/, i.e. the first element of the list has index 1.
- FIXME try to remove all the ~'s.
-}
module A... | peteg/ADHOC | ADHOC/Patterns.hs | gpl-2.0 | 4,686 | 14 | 16 | 1,320 | 1,968 | 1,089 | 879 | -1 | -1 |
-- Cyclic nand, constructive with input 'false'.
module T where
import Tests.Basis
c = combLoop (andA >>> notA >>> arr dupA)
prop_correct = property (\xs -> simulate c xs == map res xs)
where res x = if x == false then true else bottom
test_constructive = isNothing (isConstructive c)
| peteg/ADHOC | Tests/01_CyclicCircuits/010_nand.hs | gpl-2.0 | 294 | 0 | 9 | 59 | 98 | 52 | 46 | 6 | 2 |
{-# LANGUAGE FlexibleContexts, TypeFamilies, DeriveGeneric, DeriveAnyClass, OverloadedStrings #-}
module Model (
Color (..)
, Number (..)
, Shape (..)
, Fill (..)
, Card (..)
, Game (..)
, cardDeck
, isSolution
, initGame
, removeCards
, solutionCards
, solutions
) where
import Test.QuickCh... | drever/fluxette | src/Model.hs | gpl-2.0 | 5,597 | 0 | 22 | 1,505 | 2,260 | 1,203 | 1,057 | 158 | 2 |
{- |
Module : $Header$
Copyright : (c) Heng Jiang and Till Mossakowski, Uni Bremen 2002-2006
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : non-portable (Logic)
display the logic graph
-}
module GUI.ShowLogicGraph (showPlainL... | nevrenato/HetsAlloy | GUI/ShowLogicGraph.hs | gpl-2.0 | 12,687 | 0 | 22 | 4,648 | 2,811 | 1,401 | 1,410 | 255 | 11 |
-- |
-- Module : Setup
-- Copyright : (C) 2007-2008 Bryan O'Sullivan
-- (C) 2012-2014 Jens Petersen
--
-- Maintainer : Jens Petersen <petersen@fedoraproject.org>
-- Stability : alpha
-- Portability : portable
--
-- Explanation: Command line option processing for building RPM
-- packages.... | mimi1vx/cabal-rpm | src/Setup.hs | gpl-3.0 | 6,406 | 0 | 28 | 1,797 | 1,547 | 858 | 689 | 124 | 2 |
import Minitel.Minitel
import Minitel.Generator
import Minitel.Queue
import Minitel.MString
import Control.Concurrent
import Control.Monad
import System.Hardware.Serialport
import Data.Char
haskellMinitel :: Minitel -> IO ()
haskellMinitel m = forM_ [2,4 .. 20] $ \ x ->
m <<< [ mLocate (x - 1) x
, mSiz... | Zigazou/HaMinitel | example/testMinitel.hs | gpl-3.0 | 887 | 3 | 14 | 287 | 255 | 125 | 130 | 26 | 1 |
{-# LANGUAGE CPP #-}
module Main where
import Control.Category
import Control.Monad.Writer.Strict
import Control.Wire as W
import Data.Char (ord)
import Data.Maybe (fromJust, isJust)
import Data.Traversable
import Experiment.Planets.Instance... | mstksg/netwire-experiments | src/Experiment/Planets.hs | gpl-3.0 | 6,078 | 4 | 21 | 1,667 | 1,794 | 958 | 836 | -1 | -1 |
module WeatherFetch where
import Data.Maybe (fromJust)
import Network.HTTP
import Network.URI
import qualified Data.ByteString.Lazy as L
-- {{{ Units for temperature + speed
data Unit
= Default
| Metric
| Imperial
deriving (Show, Read, Eq)
-- generate a string that can be fit into an URL
showUnitUrl... | ibabushkin/hweather | WeatherFetch.hs | gpl-3.0 | 2,026 | 0 | 11 | 470 | 606 | 320 | 286 | 48 | 1 |
module Main where
import System.Environment
import Text.ParserCombinators.Parsec hiding (spaces)
import Control.Monad
data LispVal = Atom String
| List [LispVal]
| DottedList [LispVal] LispVal
| Number Integer
| String String
| Bool Bool
symbol :: Parse... | lifengsun/haskell-exercise | scheme/02/datatypeparser.hs | gpl-3.0 | 1,156 | 0 | 11 | 293 | 394 | 197 | 197 | 41 | 3 |
{-# LANGUAGE TemplateHaskell #-}
module Poslist
( Poslist
, parse
, convertToGraph
) where
import DeriveJSON
import Data.Foldable (foldr')
import Data.Text.Lazy.Internal (Text)
import Data.Text.Lazy.Encoding (encodeUtf8)
import Graph (Graph, mkEmptyGraph, addEdge)
-------------------------------... | chrisbloecker/Hive | tools/Poslist.hs | gpl-3.0 | 1,206 | 0 | 16 | 213 | 363 | 206 | 157 | 26 | 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/TransferOperations/Cancel.hs | mpl-2.0 | 5,582 | 0 | 17 | 1,306 | 852 | 495 | 357 | 119 | 1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
--------------------------------------------------------------------------------
{-|
Module : Media
Copyright : (c) Daan Leijen 2003
(c) shelarcy 2007
License : wxWindows
Maintainer : wxhaskell-devel@lists.sourceforge.net
Stability... | sherwoodwang/wxHaskell | wx/src/Graphics/UI/WX/Media.hs | lgpl-2.1 | 3,833 | 0 | 9 | 686 | 474 | 268 | 206 | 41 | 1 |
module Main where
import qualified Data.Map as M
-- guzaiがnabeに入っていたらその具材の個数を1減らす、
-- guzaiの個数がゼロになったらその項目をMapから消す、
-- ように、関数eatを追記してください。
eat :: String -> M.Map String Int -> M.Map String Int
eat guzai nabe = do
let num = M.lookup guzai nabe in
case num of
Just x ->
if x <= 1 then M.delete guzai... | jtwp470/my-programming-learning-book | haskell/exercise-7-nabe/src/Main.hs | unlicense | 1,488 | 0 | 20 | 306 | 487 | 240 | 247 | 31 | 4 |
module ProjectEuler.A268681 (a268681) where
import Data.List (nub)
import Tables.A007318 (a007318_row)
a268681 :: Integer -> Integer
a268681 n = sum $ filter squareFree $ nub $ concatMap a007318_row [0..n-1] where
squareFree k = all (\d -> k `mod` d /= 0) $ map (^2) [2..20]
| peterokagey/haskellOEIS | src/ProjectEuler/A268681.hs | apache-2.0 | 280 | 0 | 12 | 49 | 126 | 69 | 57 | 6 | 1 |
module Helpers.CostasLikeArrays (countPermutationsUpToDihedralSymmetry, distinctDirections, distinctDistances) where
import Data.List (elemIndex, nub)
import Data.Maybe (mapMaybe)
import Data.Ratio ((%))
import Helpers.Subsets (eachPair)
type Permutation = [Int]
distinctDistances :: Permutation -> Int
distinctDistanc... | peterokagey/haskellOEIS | src/Helpers/CostasLikeArrays.hs | apache-2.0 | 1,882 | 0 | 11 | 267 | 580 | 319 | 261 | 30 | 1 |
-- Show expressions in prefix notation
module OperationExtension1 where
import DataBase
import DataExtension
instance Show Lit
where
show (Lit i) = "Lit " ++ show i
instance (Exp x, Exp y, Show x, Show y) => Show (Add x y)
where
show (Add x y) = "Add (" ++ show x ++ ") (" ++ show y ++ ")"
instance (Exp x, S... | egaburov/funstuff | Haskell/tytag/xproblem_src/samples/expressions/Haskell/OpenDatatype1/OperationExtension1.hs | apache-2.0 | 392 | 0 | 10 | 95 | 175 | 89 | 86 | 9 | 0 |
module Time where
import Data.IORef (readIORef, IORef, newIORef, modifyIORef')
import Control.Monad
import qualified Graphics.UI.GLUT as GLUT
import Concurrency (writeIORef)
type FloatType = Float
type Time = FloatType
type DTime = FloatType
type TimeIORef = IORef Time
newTimeIORef :: IO TimeIORef
newTimeIORef =... | epeld/zatacka | old/Time.hs | apache-2.0 | 628 | 0 | 9 | 116 | 180 | 98 | 82 | 20 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Haddock.Version
-- Copyright : (c) Simon Marlow 2003
-- License : BSD-like
--
-- Maintainer : haddock@projects.haskell.org
-- Stability : experimental
-- Portability : portable
----------------------------... | ghcjs/haddock-internal | src/Haddock/Version.hs | bsd-2-clause | 705 | 0 | 5 | 104 | 75 | 50 | 25 | 9 | 1 |
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
-- |
-- Module : FRP.Animas.Vector3
-- Copyright : (c) Antony Courtney and Henrik Nilsson, Yale University, 2003
-- License : BSD-style (see the LICENSE file in the distribution)
--
-- Maintainer : nilsson@cs.yale.edu
-- Stability : provisiona... | eamsden/Animas | src/FRP/Animas/Vector3.hs | bsd-3-clause | 3,576 | 5 | 14 | 1,000 | 1,156 | 607 | 549 | 75 | 1 |
{-# LANGUAGE LambdaCase, OverloadedStrings #-}
-- | Bash script evaluation.
module Bash.Config.Eval
( Eval(..)
, interpret
) where
import Control.Applicative
import Control.Monad.Reader.Class
import Control.Monad.State.Class
import Data.Map (Map)
im... | knrafto/bash-config | src/Bash/Config/Eval.hs | bsd-3-clause | 5,812 | 0 | 13 | 1,746 | 1,829 | 931 | 898 | 121 | 4 |
{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
module Silvi
( module Silvi.Encode
, module Silvi.Random
, module Silvi.Types
) where
import Silvi.Encode
import Silvi.Random
import Silvi.Types
| chessai/silvi | src/Silvi.hs | bsd-3-clause | 203 | 0 | 5 | 30 | 40 | 26 | 14 | 8 | 0 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.NV.FramebufferMultisampleCoverage
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stab... | haskell-opengl/OpenGLRaw | src/Graphics/GL/NV/FramebufferMultisampleCoverage.hs | bsd-3-clause | 959 | 0 | 5 | 113 | 72 | 52 | 20 | 12 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : SMSAero.Types
-- Copyright : (c) 2016, GetShopTV
-- License : BSD3
-- Maintainer : nickolay@getshoptv.com
-- Stability : experimental
--
-- This module defi... | GetShopTV/smsaero | src/SMSAero/Types.hs | bsd-3-clause | 4,219 | 0 | 12 | 768 | 841 | 489 | 352 | 76 | 0 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
import Control.Applicative
import Control.Exception
import Control.Monad
import Data.List
import Data.Traversable (for)
import Distribution.PackageDescription
import Distribution.Simple
import Distribution.Simple.BuildPaths
import Distribution.Simple.Loca... | sethfowler/hslibvoyeur | Setup.hs | bsd-3-clause | 5,766 | 2 | 17 | 1,270 | 1,568 | 802 | 766 | 119 | 2 |
-- | This module exports the types used to create flag writes.
module Data.Factual.Write.Flag
(
-- * Flag type
Flag(..)
-- * Problem type
, Problem(..)
-- * Required modules
, module Data.Factual.Shared.Table
) where
import Data.Factual.Write
import Data.Factual.Shared.Table
import Data.Maybe (... | rudyl313/factual-haskell-driver | Data/Factual/Write/Flag.hs | bsd-3-clause | 2,737 | 0 | 12 | 868 | 609 | 343 | 266 | 53 | 1 |
module Language.SequentCore.Driver.Flags (
SeqFlags(..), SeqDumpFlag(..), SeqGeneralFlag(..),
FloatOutSwitches(..), FinalPassSwitches(..), ContifySwitches(..),
sgopt, sgopt_set, sgopt_unset,
sdopt, sdopt_set, sdopt_unset,
parseSeqFlags
) where
import CmdLineParser
import FastString
import MonadUtils
im... | lukemaurer/sequent-core | src/Language/SequentCore/Driver/Flags.hs | bsd-3-clause | 13,520 | 0 | 15 | 3,163 | 2,863 | 1,595 | 1,268 | 235 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS -fno-warn-name-shadowing #-}
module Snap.Snaplet.Fay (
Fay
, initFay
, fayServe
, fayax
, toFayax
, fromFayax
) where
import Control.Applicative
import Control.M... | bergmark/snaplet-fay | src/Snap/Snaplet/Fay.hs | bsd-3-clause | 6,274 | 0 | 18 | 1,678 | 1,634 | 825 | 809 | 126 | 6 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
module Kiosk.Backend.Data ( DataTemplateEntry (..)
, DataTemplateEntryKey (..)
, DataTemplate (..)
... | plow-technologies/cobalt-kiosk-data-template | src/Kiosk/Backend/Data.hs | bsd-3-clause | 959 | 0 | 5 | 420 | 90 | 64 | 26 | 19 | 0 |
module Day2 where
import Test.Hspec
import Utils
import qualified Text.Megaparsec.String as P
import qualified Text.Megaparsec as P
-- Input DSL
data Instruction = U | D | L | R deriving (Show)
-- Parsing
parser :: P.Parser [[Instruction]]
parser = P.sepBy (P.many (parserInstruction)) (P.string "\n")
parserInstru... | guibou/AdventOfCode2016 | src/Day2.hs | bsd-3-clause | 2,376 | 0 | 15 | 717 | 883 | 479 | 404 | 52 | 5 |
module Handler.RemoveDeck where
import Kerchief.Prelude
import Prelude hiding (putStrLn)
import System.Directory (removeFile)
import System.FilePath ((</>))
import Kerchief (Kerchief, getDecksDir)
import Utils (askYesNo, getDirectoryContents')
handleRemoveDeck :: [String] -> Kerchief ()
handleRe... | mitchellwrosen/kerchief | src/Handler/RemoveDeck.hs | bsd-3-clause | 1,119 | 0 | 15 | 293 | 274 | 147 | 127 | 24 | 2 |
{-|
Description: helpers for matching requests
contains various matching utilities
-}
{-# LANGUAGE TupleSections #-}
module Web.Respond.Request where
import Network.Wai
import qualified Data.ByteString.Lazy as LBS
import Control.Applicative ((<$>))
import Control.Monad.IO.Class (liftIO)
import qualified Network.HTTP... | raptros/respond | src/Web/Respond/Request.hs | bsd-3-clause | 4,720 | 0 | 11 | 758 | 874 | 466 | 408 | 42 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
import qualified Data.ByteString.Lazy.Char8 as B
import System.Console.CmdArgs
import System.Exit
import Text.WikiEngine
import qualified Text.Blaze.Renderer.Utf8 as RenderUtf8 (renderHtml)
import qualified Text.Blaze.Renderer.Pretty as RenderPretty (renderHtml)
import qualified ... | vincenthz/wikiengine | Wikihtml.hs | bsd-3-clause | 1,567 | 25 | 16 | 289 | 519 | 266 | 253 | 40 | 5 |
import Common.Numbers.Numbers (powMod)
main = print $ 1 + (28433 * (powMod 2 (7830457 :: Int) modulo) `mod` modulo) where
modulo = 10^10 :: Integer
| foreverbell/project-euler-solutions | src/97.hs | bsd-3-clause | 154 | 1 | 12 | 31 | 72 | 39 | 33 | 3 | 1 |
{-# LANGUAGE PatternGuards, ViewPatterns, CPP, ScopedTypeVariables #-}
module General.Util(
PkgName, ModName,
URL,
pretty, parseMode, applyType, applyFun1, unapplyFun, fromName, fromQName, fromTyVarBind, declNames, isTypeSig,
fromDeclHead, fromContext, fromIParen, fromInstHead,
tarballReadFiles,
... | ndmitchell/hoogle | src/General/Util.hs | bsd-3-clause | 12,086 | 0 | 16 | 2,799 | 4,832 | 2,510 | 2,322 | 276 | 9 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE UndecidableInstances #-}
module Web.Zwaluw.Regular
( mkRouters
, Routers
, RouterList(..)
-- * Re-exported from Generics.Regular
, deriveAll
, PF
... | MedeaMelana/Zwaluw | Web/Zwaluw/Regular.hs | bsd-3-clause | 2,485 | 0 | 15 | 666 | 1,072 | 563 | 509 | 57 | 1 |
{-# LANGUAGE BangPatterns, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
module Database.Riak.Protocol.GetBucketRequest (GetBucketRequest(..)) where
import Prelude ((+), (/))
import qualified Prelude as Prelude'
import qualified Data.Typeable as Prelude'
import qualified Data.Data as Prelude'
import ... | iand675/hiker | Database/Riak/Protocol/GetBucketRequest.hs | bsd-3-clause | 3,116 | 0 | 16 | 584 | 590 | 308 | 282 | 49 | 0 |
{-# language CPP #-}
-- No documentation found for Chapter "Exception"
module OpenXR.Exception (OpenXrException(..)) where
import GHC.Exception.Type (Exception(..))
import OpenXR.Core10.Enums.Result (Result)
import OpenXR.Core10.Enums.Result (Result(..))
-- | This exception is thrown from calls to marshalled Vulkan c... | expipiplus1/vulkan | openxr/src/OpenXR/Exception.hs | bsd-3-clause | 719 | 0 | 8 | 107 | 156 | 93 | 63 | -1 | -1 |
{-# LANGUAGE ForeignFunctionInterface, CPP #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.ARB.ShadingLanguageInclude
-- Copyright : (c) Sven Panne 2014
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.co... | mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/ARB/ShadingLanguageInclude.hs | bsd-3-clause | 2,366 | 0 | 14 | 243 | 399 | 231 | 168 | -1 | -1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# L... | ekmett/hask | old/src/Hask/Power.hs | bsd-3-clause | 4,423 | 2 | 15 | 1,015 | 1,428 | 759 | 669 | 75 | 1 |
-- Copyright (c) 2017 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/chill | src/IR/FlatIR/Syntax.hs | bsd-3-clause | 60,607 | 28 | 17 | 18,793 | 14,673 | 8,055 | 6,618 | 1,018 | 2 |
{-# OPTIONS #-}
-----------------------------------------------------------------------------
-- |
-- Module : Language.Py.ParserMonad
-- Copyright : (c) 2009 Bernie Pope
-- License : BSD-style
-- Maintainer : bjpop@csse.unimelb.edu.au
-- Stability : experimental
-- Portability : ghc
--
-- Monad support ... | codeq/language-py | src/Language/Py/ParserMonad.hs | bsd-3-clause | 5,757 | 0 | 13 | 1,169 | 1,610 | 887 | 723 | 166 | 2 |
-- |
-- Module : Crypto.PubKey.DSA
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : Good
--
-- An implementation of the Digital Signature Algorithm (DSA)
{-# LANGUAGE DeriveDataTypeable #-}
module Crypto.PubKey.DSA
( Params(..)
,... | tekul/cryptonite | Crypto/PubKey/DSA.hs | bsd-3-clause | 5,630 | 0 | 14 | 1,598 | 1,430 | 800 | 630 | 101 | 2 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- | Provide ability to upload tarballs to Hackage.
module Stack.Upload
( -- * Upload
upload
, uploadBytes
, uploadRevi... | MichielDerhaeg/stack | src/Stack/Upload.hs | bsd-3-clause | 8,635 | 0 | 19 | 3,263 | 1,647 | 833 | 814 | 191 | 5 |
module Models where
import Data.Monoid
import Language.Haskell.TH
import qualified Data.Text as Text
import Database.Persist.Quasi
import Database.Persist.Quasi.Internal
import Database.Persist.TH
import Database.Persist.Sql
-- TODO: we use lookupName and reify etc which breaks in IO. somehow need to
-- test this ou... | yesodweb/persistent | persistent/bench/Models.hs | mit | 1,640 | 0 | 12 | 379 | 498 | 275 | 223 | 44 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeOperators #-}
module DTypes.Classes.DTraversable
( DTraversable (..)
, dtraverse'
, dsequenceA'
, dtoList
) where
import DTypes.Classes.DFunctor
import DTypes.Compose
import DTypes.Trafo
import Data.Functor.Identit... | timjb/ftypes | src/DTypes/Classes/DTraversable.hs | mit | 1,725 | 0 | 12 | 336 | 475 | 255 | 220 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
module Tinc.Cache (
Cache
, CachedPackage(..)
, readCache
, findReusablePackages
, cachedExecutables
, populateCache
#ifdef TEST
, PopulateCacheAction(..)
, populateCacheAction
, PackageLocation... | haskell-tinc/tinc | src/Tinc/Cache.hs | bsd-3-clause | 7,770 | 0 | 16 | 1,363 | 2,063 | 1,057 | 1,006 | 144 | 2 |
{-# LANGUAGE GeneralizedNewtypeDeriving, ConstraintKinds, PatternGuards, TupleSections #-}
module Idris.ParseExpr where
import Prelude hiding (pi)
import Text.Trifecta.Delta
import Text.Trifecta hiding (span, stringLiteral, charLiteral, natural, symbol, char, string, whiteSpace, Err)
import Text.Parser.LookAhead
impo... | NightRa/Idris-dev | src/Idris/ParseExpr.hs | bsd-3-clause | 52,579 | 1 | 37 | 19,378 | 15,961 | 7,834 | 8,127 | -1 | -1 |
{-# LANGUAGE Rank2Types #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Array.Lens
-- Copyright : (C) 2012-16 Edward Kmett
-- License : BSD-style (see the file LICENSE)
-- Maintainer : Edward Kmett <ekmett@gmail.com>
-- Stability : provisional
-... | ddssff/lens | src/Data/Array/Lens.hs | bsd-3-clause | 1,120 | 0 | 9 | 201 | 125 | 81 | 44 | 9 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.LineSegments
-- Copyright : (c) Sven Panne 2002-2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
-... | hesiod/OpenGL | src/Graphics/Rendering/OpenGL/GL/LineSegments.hs | bsd-3-clause | 6,619 | 0 | 9 | 965 | 362 | 248 | 114 | 30 | 1 |
------------------------------------------------------------------------------
--
-- Haskell: The Craft of Functional Programming, 3e
-- Simon Thompson
-- (c) Addison-Wesley, 1996-2011.
--
-- Chapter 10
--
-------------------------------------------------------------------------
-- Generalization: patterns of com... | c089/haskell-craft3e | Chapter10.hs | mit | 4,289 | 8 | 9 | 973 | 1,216 | 682 | 534 | 63 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
module Stack.Constants.Config
( distDirFromDir
, workDirFromDir
, distRelativeDir
, imageStagingDir
, projectDockerSandboxDir
, configCacheFile
, configCabalMod
, buildCachesDir
, testSuccessFile
,... | anton-dessiatov/stack | src/Stack/Constants/Config.hs | bsd-3-clause | 5,034 | 0 | 13 | 1,231 | 1,240 | 641 | 599 | 116 | 2 |
module Stack.Options.TestParser where
import Data.Maybe
import Data.Monoid.Extra
import Options.Applicative
import Options.Applicative.Args
import Options.Applicative.Builder.Extra
import Stack.Options.Utils
import Stack.Types.Config
-- | Parser fo... | AndreasPK/stack | src/Stack/Options/TestParser.hs | bsd-3-clause | 1,314 | 0 | 17 | 571 | 204 | 107 | 97 | 34 | 1 |
{-# LANGUAGE CPP, Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude, MagicHash, StandaloneDeriving, BangPatterns,
KindSignatures, DataKinds, ConstraintKinds,
MultiParamTypeClasses, FunctionalDependencies #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
-- ip :: IP x a => a is strictly speaking ambigu... | snoyberg/ghc | libraries/ghc-prim/GHC/Classes.hs | bsd-3-clause | 37,767 | 2 | 12 | 10,676 | 17,866 | 11,177 | 6,689 | -1 | -1 |
{-# LANGUAGE Arrows #-}
module CmdFail006 where
f = proc x -> ~(_ -< _)
| sdiehl/ghc | testsuite/tests/parser/should_fail/cmdFail006.hs | bsd-3-clause | 73 | 2 | 7 | 16 | 25 | 15 | 10 | -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="pl-PL">
<title>Technology detection | ZAP Extension</title>
<maps>
<homeID>top</homeID>
... | kingthorin/zap-extensions | addOns/wappalyzer/src/main/javahelp/org/zaproxy/zap/extension/wappalyzer/resources/help_pl_PL/helpset_pl_PL.hs | apache-2.0 | 984 | 78 | 66 | 159 | 418 | 211 | 207 | -1 | -1 |
module E.Annotate where
import Control.Monad.Reader
import Data.Monoid
import qualified Data.Traversable as T
import E.E
import E.Program
import E.Subst
import GenUtil
import Info.Info(Info)
import Name.Id
import Util.HasSize
import Util.SetLike
annotateCombs :: forall m . Monad m =>
(IdMap (Maybe E))
-> (Id... | m-alvarez/jhc | src/E/Annotate.hs | mit | 6,286 | 0 | 22 | 2,197 | 2,771 | 1,383 | 1,388 | -1 | -1 |
{-# LANGUAGE CPP, MagicHash #-}
-- | Dynamically lookup up values from modules and loading them.
module DynamicLoading (
#ifdef GHCI
-- * Loading plugins
loadPlugins,
-- * Force loading information
forceLoadModuleInterfaces,
forceLoadNameModuleInterface,
forceLoadTyCon,... | urbanslug/ghc | compiler/main/DynamicLoading.hs | bsd-3-clause | 10,751 | 1 | 24 | 2,945 | 1,980 | 1,028 | 952 | 2 | 0 |
{-# LANGUAGE PolyKinds , GADTs, ScopedTypeVariables, PatternSynonyms,
ViewPatterns #-}
module T12968 where
data TypeRep (a :: k)
data TRAppG (fun :: k2) where
TRAppG :: forall k1 k2 (a :: k1 -> k2) (b :: k1) .
TypeRep a -> TypeRep b -> TRAppG (a b)
pattern TRApp :: forall k2 (fun :: k2). ()
... | sdiehl/ghc | testsuite/tests/patsyn/should_compile/T12968.hs | bsd-3-clause | 515 | 0 | 12 | 147 | 196 | 112 | 84 | -1 | -1 |
module Distribution.Simple.Test.LibV09
( runTest
-- Test stub
, simpleTestStub
, stubFilePath, stubMain, stubName, stubWriteLog
, writeSimpleTestStub
) where
import Distribution.Compat.CreatePipe ( createPipe )
import Distribution.Compat.Environment ( getEnvironment )
import... | DavidAlphaFox/ghc | libraries/Cabal/Cabal/Distribution/Simple/Test/LibV09.hs | bsd-3-clause | 10,854 | 0 | 27 | 3,138 | 2,254 | 1,158 | 1,096 | 177 | 4 |
module B4 (myFringe) where
import D4 hiding (sumSquares)
import qualified D4
instance SameOrNot Float
where
isSameOrNot a b = a == b
isNotSame a b = a /= b
myFringe :: (Tree a) -> [a]
myFringe (Leaf x) = [x]
myFringe (Branch left right) = myFringe right
sumSquares ((x : xs)) = (x ^ 2) + (sumSquares ... | kmate/HaRe | old/testing/renaming/B4_AstOut.hs | bsd-3-clause | 343 | 0 | 8 | 83 | 157 | 85 | 72 | 11 | 1 |
{-# OPTIONS -fglasgow-exts -O -dshow-passes #-}
module Foo where
import GHC.Base
foo :: Int -> Int
foo (I# n#) = bar i i
where i# = n# +# 1#
i = I# i#
bar :: Int -> Int -> Int
{-# INLINE [0] bar #-}
bar _ n = n
{- The trouble here was
*** Simplify:
Result size = 25
Result size ... | ezyang/ghc | testsuite/tests/eyeball/inline2.hs | bsd-3-clause | 810 | 0 | 7 | 291 | 82 | 45 | 37 | -1 | -1 |
module P004Spec where
import qualified P004 as P
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "isPalindrome" $
it "回文数判定" $ do
let t = True
let f = False
let input = [0, 1, 9, 10, 11, 12, 21, 22, 100, 101, 111, 112, 121, 1001, 1010, 2022, 3303, 4444, 4554]... | yyotti/euler_haskell | test/P004Spec.hs | mit | 747 | 0 | 13 | 179 | 310 | 177 | 133 | 20 | 1 |
#!/usr/bin/env runhaskell
{-# LANGUAGE UnicodeSyntax #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}
-- import Control.Monad
-- import Data.Functor
-- import Data.Maybe
-- import Data.Monoid
import Debug.Trace
import qualified Data.Text as T
import qualified Data.... | sourcegraph/srclib-haskell | process-all-dependencies.hs | mit | 2,199 | 5 | 18 | 530 | 825 | 414 | 411 | 61 | 4 |
import Control.Monad (unless)
import Test.Hspec (Spec, describe, expectationFailure, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import House (rhyme)
main :: IO ()
main = hspecWith defaultConfig {configFastFail = True} specs
specs :: Spec
specs = describe "rhyme" $ do... | exercism/xhaskell | exercises/practice/house/test/Tests.hs | mit | 4,864 | 0 | 14 | 1,616 | 392 | 209 | 183 | 20 | 4 |
-- CamelCase Method
-- https://www.codewars.com/kata/587731fda577b3d1b0001196
module CamelCase.JorgeVS.Kata where
import Data.Char (toUpper)
camelCase :: String -> String
camelCase = concatMap (\(x:xs) -> toUpper x:xs) . words
| gafiatulin/codewars | src/6 kyu/CamelCase.hs | mit | 230 | 0 | 10 | 28 | 62 | 36 | 26 | 4 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module InTheKnow.Routes.Common.Templates (
base
) where
import Prelude hiding (head, div)
import Text.Blaze.Html5 hiding (base)
import qualified Text.Blaze.Html5.Attributes as A
import Data.Text (Text)
import Data.Monoid ((<>))
base :: Text -> Html -> Html
base t content =
doc... | jb55/intheknow | InTheKnow/Routes/Common/Templates.hs | mit | 488 | 0 | 14 | 104 | 160 | 90 | 70 | 16 | 1 |
{-# LANGUAGE RecordWildCards #-}
{- |
Generate and solve friction constraints for colliding objects.
-}
module Physics.Constraints.Contact.Friction where
import Control.Lens
import Physics.Constraint
import Physics.Constraints.SolutionProcessors
import Physics.Constraints.Type... | ublubu/shapes | shapes/src/Physics/Constraints/Contact/Friction.hs | mit | 1,593 | 0 | 11 | 445 | 391 | 224 | 167 | 43 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
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.Class (MonadIO, liftIO)
import... | junjihashimoto/persistent | persistent/Database/Persist/Sql/Raw.hs | mit | 6,836 | 0 | 22 | 2,279 | 1,628 | 828 | 800 | 133 | 7 |
{-
**************************************************************
* Filename : RegTypes.hs *
* Author : Markus Forsberg *
* d97forma@dtek.chalmers.se *
* Last Modified : 5 July, 2001 ... | SAdams601/ParRegexSearch | test/fst-0.9.0.1/FST/RegTypes.hs | mit | 7,853 | 54 | 11 | 2,888 | 2,120 | 1,097 | 1,023 | 137 | 2 |
-- Tube strike options calculator
-- http://www.codewars.com/kata/568ade64cfd7a55d9300003e/
module Codewars.Kata.Tube where
import Codewars.Kata.Tube.Types
calculator :: Double -> Double -> Double -> Decision
calculator distance busDrive busWalk | 60 * (distance / 5) < 10 = Walk
... | gafiatulin/codewars | src/7 kyu/Tube.hs | mit | 504 | 0 | 11 | 177 | 137 | 73 | 64 | 7 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
module RLPTest where
import Control.Monad (sequence)
import Data.Aeson
import Data.Aeson.Types (typeMismatch)
import Data.ByteString
import qualified Data.By... | iostat/relapse | test/RLPTest.hs | mit | 3,532 | 0 | 13 | 932 | 962 | 504 | 458 | 59 | 1 |
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances,
MultiParamTypeClasses, DeriveDataTypeable, OverloadedStrings #-}
-----------------------------------------------------------------------------
--
-- Module : IDE.Pane.Trace
-- Copyright : 2007-2011 Juergen Nicklisch-Franken, Hamish Mackenzie
-- License ... | JPMoresmau/leksah | src/IDE/Pane/Trace.hs | gpl-2.0 | 11,455 | 1 | 29 | 2,754 | 2,803 | 1,444 | 1,359 | 273 | 4 |
module Game.Handlers where
import qualified Graphics.UI.GLFW as GLFW
import Reactive.Banana.Frameworks
charHandler :: GLFW.Window -> AddHandler (GLFW.Window, Char)
charHandler win callback = do
GLFW.setCharCallback win . Just $ \w c -> callback (w, c)
return (GLFW.setCharCallback win Nothing)
... | theguruofreason/glfw-b-test | Game/Handlers.hs | gpl-2.0 | 1,182 | 0 | 10 | 454 | 313 | 166 | 147 | 22 | 1 |
module Moonbase.Util.Gtk.Widget.Graph
( GraphStyle(..)
, GraphDirection(..)
, GraphConfig(..)
, GraphHistory
, Graph
, graphNew
, graphConfig
, graphHistory
, pollingGraphNew
, defaultGraphConfig
) where
import Control.Monad
import Control.Concurrent
import Control.Exception
import qualified Moonbase.Them... | felixsch/moonbase-gtk | src/Moonbase/Util/Gtk/Widget/Graph.hs | gpl-2.0 | 6,590 | 0 | 19 | 2,064 | 2,260 | 1,128 | 1,132 | 174 | 2 |
{-# Language DoAndIfThenElse #-}
-- | Configuración de la lista de símbolos.
module GUI.SymbolList where
import Equ.Theories
import Equ.Syntax
import Graphics.UI.Gtk hiding (eventButton, eventSent,get)
import qualified Graphics.UI.Gtk as Gtk
import Data.Text(unpack)
import Control.Lens hiding (set)
import Control.Mo... | alexgadea/fun-gui | GUI/SymbolList.hs | gpl-3.0 | 4,198 | 0 | 16 | 1,471 | 1,140 | 573 | 567 | 90 | 2 |
{-# LANGUAGE TemplateHaskell #-}
module Lamdu.GUI.ExpressionGui.Types
( ExpressionGui, egWidget, egAlignment
, SugarExpr
, Payload(..)
, plStoredEntityIds, plInjected, plNearestHoles, plShowAnnotation
, emptyPayload
, EvalModeShow(..)
, FuncApplyLimit(..)
, ShowAnnotation(..), showEx... | da-x/lamdu | Lamdu/GUI/ExpressionGui/Types.hs | gpl-3.0 | 3,839 | 0 | 12 | 725 | 796 | 476 | 320 | -1 | -1 |
module Config
where
import System.Console.GetOpt
import Global
import Common
configOptions :: [(OptDescr (ConfigOptions -> ConfigOptions))]
configOptions = [
Option ['n'] ["name"] (ReqArg setConfigName "name") "your name"
]
data ConfigOptions = ConfigOptions { configName :: String }
setConfigName :: String -... | anttisalonen/nix | src/Config.hs | gpl-3.0 | 653 | 0 | 16 | 105 | 211 | 114 | 97 | 15 | 1 |
{- ============================================================================
| Copyright 2011 Matthew D. Steele <mdsteele@alum.mit.edu> |
| |
| This file is part of Fallback. |
... | mdsteele/fallback | src/Fallback/State/Status.hs | gpl-3.0 | 14,461 | 51 | 17 | 3,063 | 3,471 | 1,859 | 1,612 | 269 | 10 |
{-# OPTIONS -O2 -Wall #-}
{-# LANGUAGE TemplateHaskell, Rank2Types #-}
module Editor.Data (
Definition(..), atDefBody,
Builtin(..),
Parameter(..),
VariableRef(..), onVariableIRef,
TypedParam(..),
Lambda(..), atLambdaParam, atLambdaBody,
Apply(..), atApplyFunc, atApplyArg,
HoleState(..),
emptyHoleSta... | nimia/bottle | codeedit/Editor/Data.hs | gpl-3.0 | 2,385 | 0 | 9 | 387 | 780 | 429 | 351 | 75 | 1 |
{- Grldd is a dependency tracking tool.
Copyright (C) 2009-2013 Laszlo Nagy
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) ... | rizsotto/Grldd | Src/Ldd.hs | gpl-3.0 | 3,353 | 0 | 16 | 1,250 | 756 | 387 | 369 | 72 | 3 |
-- project euler Problem 2
{--
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
Find the sum of all the even-valued terms in the sequence which do not exceed four million.
--}
--fibonac... | goalieca/haskelling | 002.hs | gpl-3.0 | 549 | 2 | 11 | 122 | 122 | 60 | 62 | 6 | 1 |
import Development.Hake
import Development.Hake.FunSetRaw
import HakeDefaults
allT = "all"
mods = [ "fill.o", "rotat.o" ]
main = hake $ defaultRules ++ [
dflt [ allT ]
,
file [ allT ] mods $ const []
,
task "clean" $ [ [ "rm", "-f" ] ++ mods ]
]
| YoshikuniJujo/hake_haskell | examples/nutshell/chap5/2/disp/fig/hakeMain.hs | gpl-3.0 | 256 | 0 | 10 | 58 | 96 | 54 | 42 | 9 | 1 |
{-|
Module : Parser.Functional.Library
Description : Functional parser library.
Copyright : 2014, Jonas Cleve
2015, Tay Phuong Ho
License : GPL-3
-}
module Parser.Functional.Library (
Parser (..),
next, eof, chainl1, mzero, return, mplus,
(<|>), (>>=)
) where
import Prelude (
... | Potregon/while | src/Parser/Functional/Library.hs | gpl-3.0 | 3,162 | 0 | 14 | 928 | 661 | 381 | 280 | 48 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Team/List.hs | mpl-2.0 | 3,307 | 0 | 14 | 812 | 469 | 278 | 191 | 67 | 1 |
{-
Copyright (C) 2010, 2011, 2012 Jeroen Ketema and Jakob Grue Simonsen
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... | jeroenk/iTRSsImplemented | ChurchRosser.hs | agpl-3.0 | 4,556 | 0 | 11 | 1,060 | 830 | 437 | 393 | 54 | 3 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -Wall #-}
module Reactive.Impulse.Internal.Types
where
import Reactive.Impulse.Core
import Reactive.... | JohnLato/impulse | src/Reactive/Impulse/Internal/Types.hs | lgpl-3.0 | 12,111 | 0 | 13 | 2,739 | 3,909 | 2,030 | 1,879 | -1 | -1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
module Spark.Core.ColumnSpec where
import Test.Hspec
import Data.List.NonEmpty(NonEmpty( (:|) ))
import Spark.Core.Context
import Spark.Core.Dataset
import Spark.Core.Column
import Spark.Core.Row
import Spark.Core.Functions
import Spark.Core.C... | krapsh/kraps-haskell | test-integration/Spark/Core/ColumnSpec.hs | apache-2.0 | 1,901 | 0 | 19 | 453 | 690 | 352 | 338 | 52 | 1 |
import Prelude ((+),(-),(==),(/=),(*),($),(.),(++),(&&),(||),(!!),div,mod,map,take,splitAt,replicate,length,fromIntegral,drop,head,Eq,Show)
import Data.ByteString (ByteString(..),append,cons,pack)
import Data.Word (Word8(..))
import Crypto.Hash.SHA256
type Bool = Word8
data Node = Terminal {h::ByteString, s::[Bool], v:... | andres-erbsen/dename | utils/hsverify/cbht.hs | apache-2.0 | 1,686 | 2 | 18 | 333 | 1,014 | 566 | 448 | 22 | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.