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-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/List.hs | mpl-2.0 | 18,010 | 0 | 40 | 6,689 | 2,754 | 1,569 | 1,185 | 396 | 1 |
-- GSoC 2015 - Haskell bindings for OpenCog.
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
-- | This Module defines some util syntactic sugar for embedded atom notation.
... | printedheart/atomspace | opencog/haskell/OpenCog/AtomSpace/Sugar.hs | agpl-3.0 | 1,858 | 0 | 11 | 443 | 546 | 303 | 243 | -1 | -1 |
{-# OPTIONS_GHC -fallow-undecidable-instances #-}
-- coverage condition を満たしていないインスタンス宣言があるため
-----------------------------------------------------------------------------
data Prop
data S
data E
infixl 9 :@
data Expr t where
BVar :: Int -> Expr t
FVar :: String -> Expr t
(:@) :: Expr (a->b) -> Expr a -... | msakai/ptq | misc/Test3.hs | lgpl-2.1 | 1,207 | 0 | 9 | 248 | 400 | 215 | 185 | -1 | -1 |
{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveGeneric, DerivingVia #-}
module ProjectM36.MerkleHash where
import Data.ByteString (ByteString)
import GHC.Generics
import Control.DeepSeq (NFData)
newtype MerkleHash = MerkleHash { _unMerkleHash :: ByteString }
deriving (Show, Eq, Generic, Monoid, Semigroup, NFData)
... | agentm/project-m36 | src/lib/ProjectM36/MerkleHash.hs | unlicense | 351 | 0 | 6 | 69 | 72 | 43 | 29 | 7 | 0 |
module Main where
import Data.Char
import System.Environment
lowers :: String -> Int
lowers xs = length [x | x <- xs, isLower x]
count :: Char -> String -> Int
count x xs = length [x' | x' <- xs, x==x']
positions x xs = [ i | (x',i) <- zip xs [0..n], x == x' ]
where
n = length xs - 1
let2int :: Char -> Int
let... | Some-T/Portfolio | HASKELL/Labs/H7/H7.1.hsproj/H7_1.hs | unlicense | 1,434 | 0 | 13 | 376 | 790 | 415 | 375 | 42 | 1 |
module Exercise5 where
isPrime :: Int -> Bool
isPrime x = length [ y | y <- [1..x], x `mod` y == 0] <= 2
primes :: Int -> [Int]
primes x = take x [y | y <- [1..], isPrime y] | tonilopezmr/Learning-Haskell | Exercises/2/Exercise_5.hs | apache-2.0 | 180 | 0 | 10 | 46 | 104 | 56 | 48 | 5 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-
Copyright 2017 The CodeWorld Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
h... | parvmor/codeworld | codeworld-server/src/CommentUtil.hs | apache-2.0 | 19,059 | 0 | 26 | 5,125 | 5,564 | 2,742 | 2,822 | 305 | 6 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, IncoherentInstances #-}
{-# LANGUAGE OverloadedStrings, Rank2Types #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Properties.Common
(
Small(..)
, qc
, Props
, Eq'(..)
, SameAs(..)
, (=?=)
, (=??=)
, (=*=)
, (=?*=)
, (... | bos/critbit | tests/Properties/Common.hs | bsd-2-clause | 5,361 | 0 | 15 | 1,287 | 2,168 | 1,194 | 974 | -1 | -1 |
-- |
--
-- Copyright:
-- This file is part of the package vimeta. It is subject to the
-- license terms in the LICENSE file found in the top-level
-- directory of this distribution and at:
--
-- https://github.com/pjones/vimeta
--
-- No part of this package, including this file, may be copied,
-- modified... | pjones/vimeta | src/Vimeta/UI/Common/Util.hs | bsd-2-clause | 1,023 | 0 | 7 | 207 | 169 | 98 | 71 | 12 | 1 |
module Compiler.CodeGeneration.StatementCompilation where
import Control.Monad
import Compiler.Syntax
import Compiler.SymbolTable
import Compiler.CodeGeneration.CompilationState
import Compiler.CodeGeneration.ExpressionEvaluation
import Compiler.CodeGeneration.InstructionSet
import Compile... | michaelmelanson/cminus-compiler | Compiler/CodeGeneration/StatementCompilation.hs | bsd-2-clause | 3,632 | 0 | 12 | 1,481 | 887 | 408 | 479 | 82 | 6 |
module Fusion where
import Criterion.Main
import qualified Data.Vector as V
testV' :: Int -> V.Vector Int
testV' n =
V.map (+n) $ V.map (+n) $
V.map (+n) $ V.map (+n)
(V.fromList [1..10000])
testV :: Int -> V.Vector Int
testV n =
V.map ( (+n) . (+n)
. (+n) . (+n) ) (V.fromList [1..10000... | dmvianna/strict | src/fusion.hs | bsd-3-clause | 501 | 0 | 10 | 155 | 223 | 121 | 102 | 18 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module LendingClub.Invest
( InvestResponse (..)
, ErrorMessage (..)
, InvestConfirmation (..)
, ExecutionStatus (..)
) where
import Control.Applicative (pure, (<|>), (<$>), (<*>))
import Data.Aeson
import ... | WraithM/lendingclub | src/LendingClub/Invest.hs | bsd-3-clause | 2,792 | 0 | 12 | 647 | 632 | 347 | 285 | 72 | 0 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[RnSource]{Main pass of renamer}
-}
{-# LANGUAGE CPP, ScopedTypeVariables #-}
module RnSource (
rnSrcDecls, addTcgDUs, findSplice
) where
#include "HsVersions.h"
import {-# SOURCE #-} RnExpr( rnLExpr )
import {-# SOURCE #-} RnSplice (... | urbanslug/ghc | compiler/rename/RnSource.hs | bsd-3-clause | 69,789 | 5 | 28 | 21,713 | 14,219 | 7,547 | 6,672 | 848 | 4 |
module Data.Stream (Stream (..)) where
infixr 5 :|
data Stream a = a :| Stream a
| sonyandy/wart | src/Data/Stream.hs | bsd-3-clause | 83 | 0 | 7 | 18 | 34 | 21 | 13 | 3 | 0 |
module GameSession
( createSession
, joinSession
, leaveSession
, maxPlayers ) where
import Data.Time.Clock (UTCTime)
import DB
import Types
maxPlayers :: Int
maxPlayers = 6
removeItem :: Eq a => a -> [a] -> [a]
removeItem _ [] = []
removeItem r (x:xs) | r == x = removeItem r xs
... | yohad/OWTeamQueue | src/GameSession.hs | bsd-3-clause | 1,041 | 0 | 11 | 363 | 359 | 181 | 178 | 34 | 2 |
{-# LANGUAGE TupleSections #-}
module NanoUtils.Set
(
randCoprimeFactors
, randPartition
, randFixedPartition
, randPicks
, randPick
) where
import Control.Monad.Random
import Control.Monad (liftM)
import Data.Int
import Data.List (partition)
import NanoUtils.List (sortOn,removeAt)
import... | nanonaren/NanoUtils | NanoUtils/Set.hs | bsd-3-clause | 2,059 | 4 | 17 | 538 | 953 | 495 | 458 | 55 | 2 |
{-# LANGUAGE BangPatterns #-}
module Pipes.Illumina where
import Data.Bits
import Data.Word
import Data.Int
import Foreign.Ptr
import Foreign.Storable
import Foreign.ForeignPtr.Unsafe
import Foreign.ForeignPtr.Safe
import Foreign.Marshal.Alloc
import Data.ByteString.Internal
import Control.Applicative
import Control.M... | rcallahan/pipes-illumina | Pipes/Illumina.hs | bsd-3-clause | 4,138 | 4 | 23 | 1,790 | 1,239 | 602 | 637 | 121 | 8 |
-- 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.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.AmountOfMoney.EN.AU.Corpus
( allExamples
, negativeExample... | facebookincubator/duckling | Duckling/AmountOfMoney/EN/AU/Corpus.hs | bsd-3-clause | 1,264 | 0 | 9 | 456 | 226 | 134 | 92 | 35 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module IrcScanner.KeywordRulesParser(parseKwFile,saveKwFile) where
import Text.ParserCombinators.ReadP
import IrcScanner.Types
import Text.Read(readMaybe)
import qualified Data.Text as T
import Test.Hspec
import Control.Monad.Trans.Either
import Control.Monad.State as S
import Contr... | redfish64/IrcScanner | src/IrcScanner/KeywordRulesParser.hs | bsd-3-clause | 4,524 | 0 | 22 | 1,057 | 1,307 | 664 | 643 | 94 | 6 |
-- | This package provides an OpenGL abstraction that targets either
-- WebGL (with GHCJS) or native OpenGL bindings (with GHC). Only the
-- context setup code differs; the same shader & rendering code can be
-- used in both cases.
--
-- The library is deliberately low-level, staying as close to the
-- original APIs a... | bergey/bothgl | src/Graphics/BothGL.hs | bsd-3-clause | 617 | 0 | 5 | 102 | 43 | 32 | 11 | 5 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
-- | 'Lucid.HtmlT' inspired monad for creating 'ReactElement's
module Glazier.React.ReactElement
( ReactElement -- constructor is not exported
, mkBranchElement
, mkLeafElement... | louispan/glazier-react | src/Glazier/React/ReactElement.hs | bsd-3-clause | 2,928 | 13 | 12 | 511 | 410 | 229 | 181 | 35 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
module Main where
import Calc.Calc
import Calc.Compiler
import System.Console.CmdArgs
fib :: Num a => [a]
fib = 0 : 1 : zipWith (+) fib (tail fib)
fibProg :: Int -> Prog
fibProg n = Compute (fib !! n)
data Fib = Fib
{ n :: Int
} deriving (Data, Typeable, Show)
defaultA... | jeannekamikaze/calc | Calc/Main.hs | bsd-3-clause | 613 | 0 | 11 | 156 | 221 | 115 | 106 | 20 | 1 |
module Definition where
import Prelude hiding (Applicative, Eq, Functor, Show, fmap, pure, show, (*>), (/=), (<$), (<*>),
(==))
class Show a where
-- Minimum complete definition: show
show :: a -> String
class Eq a where
-- Minimum complete definition: (==) or (/=)
(==) :: a -> a ->... | hjwylde/haskell-type-classes-workshop | src/Definition.hs | bsd-3-clause | 2,628 | 0 | 11 | 804 | 695 | 382 | 313 | 40 | 0 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- | Stability: Experimental
module Mahjong.Player where
import Mahjong.Class
import Mahjong.Tile
-- | Tiles can only be stolen to make a Meld, and once that Meld is formed using
-- a stolen tile it cannot be changed for the duration of the hand. Since
-- visualization is ... | TakSuyu/mahsjong | src/Mahjong/Player.hs | mit | 2,234 | 0 | 10 | 504 | 381 | 215 | 166 | 37 | 1 |
module Main where
import Game.Minecraft.Map
import System.Environment
import System.Exit
showHelp :: IO ()
showHelp = do
progName <- getProgName
die $ "Usage: " ++ progName ++ " INPUT_REGION_DIR OUTPUT.png [Y_SLICING_HEIHGT]"
buildAndSave :: FilePath -> FilePath -> Int -> IO ()
b... | DFLY-Entertainment/hsMCMap | exc-src/Main.hs | gpl-3.0 | 727 | 0 | 13 | 224 | 225 | 110 | 115 | 21 | 3 |
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE RelaxedPolyRec #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE LambdaCase #-}
module OpenCog.Lojban.Syntax where
import Prelude hidi... | misgeatgit/opencog | opencog/nlp/lojban/HaskellLib/src/OpenCog/Lojban/Syntax.hs | agpl-3.0 | 64,858 | 1 | 26 | 23,716 | 20,442 | 10,669 | 9,773 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-missing-fields #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-------------------... | Orvid/fbthrift | thrift/compiler/test/fixtures/namespace/gen-hs/My/Namespacing/Extend/Test/ExtendTestService.hs | apache-2.0 | 8,193 | 0 | 18 | 1,191 | 2,242 | 1,261 | 981 | 132 | 2 |
{-# LANGUAGE ScopedTypeVariables, RecursiveDo #-}
import Data.Char
import System.Environment
import Control.Applicative
import Text.Earley
data Expr
= Expr :+: Expr
| Expr :*: Expr
| Var String
| Lit Int
deriving (Show)
grammar :: forall r. Grammar r (Prod r String Char Expr)
grammar = mdo
whitespace <- ... | sboosali/Earley | examples/Expr2.hs | bsd-3-clause | 997 | 0 | 16 | 275 | 396 | 199 | 197 | 34 | 1 |
-- |
-- Module: Data.Aeson
-- Copyright: (c) 2011-2015 Bryan O'Sullivan
-- (c) 2011 MailRank, Inc.
-- License: Apache
-- Maintainer: Bryan O'Sullivan <bos@serpentine.com>
-- Stability: experimental
-- Portability: portable
--
-- Types and functions for working efficiently with JSON data.
--
-... | plaprade/aeson | Data/Aeson.hs | bsd-3-clause | 11,699 | 0 | 8 | 2,460 | 835 | 602 | 233 | 75 | 1 |
module Main where
import Data.Maybe
import Control.Monad
import qualified Data.ByteString.Lazy.Char8 as C
import Network.Socket hiding (send, recv)
import Network.Socket.ByteString.Lazy
import Data.Int
import Data.Binary.Get
import Data.Binary.Put
import Debug.Trace
import Data.NineP
connector :: IO Socket
connector... | l29ah/9ph | test9p.hs | bsd-3-clause | 1,676 | 0 | 14 | 552 | 498 | 235 | 263 | 44 | 1 |
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
{-# LANGUAGE TypeFamilies #-}
module T4200 where
class C a where
type In a :: *
op :: In a -> Int
-- Should be ok; no -XUndecidableInstances required
instance (In c ~ Int) => C [c] where
type In [c] = In c
op x = 3
| green-haskell/ghc | testsuite/tests/indexed-types/should_compile/T4200.hs | bsd-3-clause | 279 | 0 | 8 | 64 | 83 | 46 | 37 | 9 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-route53/gen/Network/AWS/Route53/GetHostedZoneCount.hs | mpl-2.0 | 3,361 | 0 | 9 | 678 | 374 | 225 | 149 | 51 | 1 |
{-# LANGUAGE CPP
, DeriveDataTypeable
, FlexibleInstances
, MultiParamTypeClasses
, TypeFamilies
, Rank2Types
, BangPatterns
#-}
-- |
-- Module : Data.Vector
-- Copyright : (c) Roman Leshchinskiy 2008-2010
-- License : BSD-style
--
-- Maint... | seckcoder/vector | Data/Vector.hs | bsd-3-clause | 45,855 | 0 | 13 | 9,973 | 9,687 | 5,429 | 4,258 | -1 | -1 |
-----------------------------------------------------------------------------
-- Standard Library: IO operations, beyond those included in the prelude
--
-- Suitable for use with Hugs 98
-----------------------------------------------------------------------------
module Hugs.IO (
Handle, -- instances: Eq... | kaoskorobase/mescaline | resources/hugs/packages/hugsbase/Hugs/IO.hs | gpl-3.0 | 4,994 | 69 | 15 | 1,459 | 1,113 | 616 | 497 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilyDependencies #-}
{-# LANGUAGE TypeInType #-}
module Main where
import Data.Kind
import Data.Proxy
import Language.Haskell.TH hiding (Type)
-- Anonymous tyvar binder example
newtype Foo1 = Foo1... | ezyang/ghc | testsuite/tests/th/T14060.hs | bsd-3-clause | 1,109 | 0 | 13 | 199 | 359 | 203 | 156 | -1 | -1 |
{-# LANGUAGE StandaloneKindSignatures #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -ddump-splices #-}
module T17164 where
import Data.Kind
$([d| type T :: forall k -> k -> Type
type family T :: forall k -> k -... | sdiehl/ghc | testsuite/tests/saks/should_compile/T17164.hs | bsd-3-clause | 335 | 0 | 6 | 63 | 26 | 19 | 7 | -1 | -1 |
-- GSoC 2015, 2018 - Haskell bindings for OpenCog.
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
-- | This Module defines the main functions to interact with the AtomSpace
-- creating/removing/modi... | ngeiswei/atomspace | opencog/haskell/OpenCog/AtomSpace/Api.hs | agpl-3.0 | 14,150 | 9 | 45 | 5,121 | 3,605 | 1,759 | 1,846 | 336 | 7 |
<?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="fa-IR">
<title>Replacer | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref loc... | thc202/zap-extensions | addOns/replacer/src/main/javahelp/org/zaproxy/zap/extension/replacer/resources/help_fa_IR/helpset_fa_IR.hs | apache-2.0 | 969 | 78 | 66 | 158 | 411 | 208 | 203 | -1 | -1 |
{-# OPTIONS -Wall -Werror #-}
module Main where
import Data.Time
main :: IO ()
main = do
now <- getCurrentTime
putStrLn (show (utctDay now) ++ "," ++ show (utctDayTime now))
putStrLn (show (utcToZonedTime utc now :: ZonedTime))
myzone <- getCurrentTimeZone
putStrLn (show (utcToZonedTime myzone now :: ZonedTime)... | bergmark/time | test/Test/CurrentTime.hs | bsd-3-clause | 322 | 0 | 13 | 55 | 120 | 59 | 61 | 10 | 1 |
module DrawLex where
import Monad(join)
import List(groupBy)
import Maybe(mapMaybe,fromMaybe)
import Fudgets
import FudDraw(ulineD')
import GIFAltFile
import OpTypes(eqBy)
import PfePlumbing(Label(..),lblPos,Icons,CertsStatus,addRefPos,refPos,assertionDefLbl)
import TokenTags as C
import HsLexerPass1(nextPos1,Pos(..))... | forste/haReFork | tools/pfe/Browser/DrawLex.hs | bsd-3-clause | 4,554 | 21 | 22 | 1,158 | 1,585 | 832 | 753 | 102 | 23 |
module CoreToLog where
import Data.Set
-- ISSUE: can we please allow things like `empty` to also
-- appear in type and alias specifications, not just in
-- measures as in `goo` below?
{-@ type IsEmp a = {v:[a] | Data.Set.elems v = Data.Set.empty } @-}
{-@ foo :: IsEmp Int @-}
foo :: [Int]
foo = []
{-@ measure goo... | mightymoose/liquidhaskell | tests/pos/coretologic.hs | bsd-3-clause | 428 | 0 | 7 | 101 | 97 | 57 | 40 | 7 | 1 |
module D1 where
--Any type/data constructor name declared in this module can be renamed.
--Any type variable can be renamed.
--Rename type Constructor 'BTree' to 'MyBTree'
data BTree a = Empty | T a (BTree a) (BTree a)
deriving Show
buildtree :: Ord a => [a] -> BTree a
buildtree [] = Empty
buildtree... | kmate/HaRe | old/testing/unfoldAsPatterns/D1.hs | bsd-3-clause | 579 | 0 | 13 | 134 | 226 | 120 | 106 | 13 | 1 |
import Control.Concurrent
import Control.Exception
-- version of conc015 using mask in place of the old deprecated
-- block/unblock.
-- test blocking & unblocking of async exceptions.
-- the first exception "foo" should be caught by the "caught1" handler,
-- since async exceptions are blocked outside this handler.
... | seereason/ghcjs | test/ghc/concurrent/conc015a.hs | mit | 1,432 | 10 | 24 | 332 | 307 | 156 | 151 | 28 | 1 |
module Bug2 ( x ) where
import B
x :: A
x = A
| DavidAlphaFox/ghc | utils/haddock/html-test/src/Bug2.hs | bsd-3-clause | 46 | 0 | 4 | 14 | 22 | 14 | 8 | 4 | 1 |
-- Trac #2529
-- The example below successfully performed the {{{show}}}, but {{{reads}}}
-- returns an empty list. It fails in both GHCi and GHC. It succeeds if you
-- replaces the infix symbol with a name.
module Main where
data A = (:<>:) { x :: Int, y :: Int } deriving (Read, Show)
t :: A
t = 1 :<>: 2
s :: Stri... | siddhanathan/ghc | testsuite/tests/deriving/should_run/T2529.hs | bsd-3-clause | 429 | 14 | 7 | 105 | 124 | 71 | 53 | 11 | 1 |
module Futhark.CodeGen.ImpGen.Multicore.Base
( extractAllocations,
compileThreadResult,
Locks (..),
HostEnv (..),
AtomicBinOp,
MulticoreGen,
decideScheduling,
decideScheduling',
groupResultArrays,
renameSegBinOp,
freeParams,
renameHistOpLambda,
atomicUpdateLocking,
... | HIPERFIT/futhark | src/Futhark/CodeGen/ImpGen/Multicore/Base.hs | isc | 14,776 | 0 | 19 | 3,659 | 4,325 | 2,178 | 2,147 | 331 | 10 |
{-# htermination intersect :: Eq a => [(Maybe a)] -> [(Maybe a)] -> [(Maybe a)] #-}
import List
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/List_intersect_10.hs | mit | 96 | 0 | 3 | 18 | 5 | 3 | 2 | 1 | 0 |
module Oden.Infer.Subsumption (
SubsumptionError(..),
typeSubsumedBy,
subsumedBy,
collectSubstitutions
) where
import Oden.Core.Expr (typeOf)
import Oden.Core.Typed as Typed
import Oden.Substitution
import Oden.Metadata
import Oden.SourceInfo
i... | oden-lang/oden | src/Oden/Infer/Subsumption.hs | mit | 3,413 | 0 | 13 | 715 | 1,062 | 529 | 533 | 64 | 2 |
-- ------------------------------------------------------ --
-- Copyright © 2014 AlephCloud Systems, Inc.
-- ------------------------------------------------------ --
{-# LANGUAGE UnicodeSyntax #-}
{-# LANGUAGE OverloadedStrings #-}
module Main
( main
) where
import Network.Wai.Middleware.Cors
import Web.Scotty
mai... | alephcloud/wai-cors | test/server.hs | mit | 419 | 0 | 9 | 62 | 67 | 37 | 30 | 10 | 1 |
{-# LANGUAGE QuasiQuotes, RecordWildCards #-}
-- | (you should read the source for documentation: just think of this module as a config file)
module Commands.Frontends.Dragon13.Shim.Commands where
import Commands.Frontends.Dragon13.Shim.Types
import Commands.Frontends.Natlink.Types
import Text.InterpolatedS... | sboosali/commands | commands-frontend-DragonNaturallySpeaking/sources/Commands/Frontends/Dragon13/Shim/Commands.hs | mit | 11,093 | 0 | 9 | 2,384 | 221 | 129 | 92 | 23 | 5 |
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Parse ( JSONCell (..)
, JSONPiece (..)
, JSON (..)
, readJSON
) where
--------------------------------------------------------------------------------
------------------------------------ Header ------------------... | sebmathguy/icfp-2015 | library/Parse.hs | mit | 3,063 | 0 | 19 | 938 | 454 | 265 | 189 | 42 | 1 |
-- | This module defines how the SoH editor and controls are rendered.
module View (renderControls, renderEditor) where
import Control.Lens.Extras (is)
import Import
import qualified JavaScript.Ace as Ace
import JavaScript.IFrame
import JavaScript.TermJs
import Model (... | fpco/schoolofhaskell | soh-client/src/View.hs | mit | 4,755 | 0 | 20 | 1,074 | 1,281 | 612 | 669 | -1 | -1 |
--------------------------------------------------------------------------------
-- (c) Tsitsimpis Ilias, 2011-2012
--
-- Utilities for error reporting
--
--------------------------------------------------------------------------------
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
module ErrUtils (
Message, mkLocMe... | iliastsi/gac | src/basicTypes/ErrUtils.hs | mit | 5,013 | 0 | 12 | 1,039 | 1,121 | 634 | 487 | 100 | 3 |
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE DeriveGeneric #-}
-----------------------------------------------------------------------------
-- |
-- Module : Network.RPC
-- Copyright : (c) Phil Hargett 2014
-- License : MIT (see LICENSE file)
--
-- Maintainer : phil@haphazardhouse.net
-- Stab... | hargettp/courier | src/Network/RPC.hs | mit | 16,205 | 0 | 21 | 4,135 | 3,314 | 1,689 | 1,625 | 248 | 5 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE InstanceSigs #-}
module Lib
( module Control.Lens
, module Control.Appl... | shouya/thinking-dumps | optics-exercises/src/Lib.hs | mit | 673 | 0 | 6 | 103 | 116 | 78 | 38 | 25 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ViewPatterns #-}
{-# OPTI... | lambdacms/lambdacms.org | lambdacmsorg-page/LambdaCmsOrg/Page/Foundation.hs | mit | 3,074 | 0 | 13 | 794 | 754 | 397 | 357 | 61 | 1 |
module Scale where
import Note
data Scale a = Scale a a a a a a a deriving (Eq, Ord, Show)
type IntervalScale = Scale Int
type NoteScale = Scale Note
toList :: Scale a -> [a]
toList (Scale i ii iii iv v vi vii) = [i, ii, iii, iv, v, vi, vii]
applyScale :: IntervalScale -> Note -> [Note]
applyScale s... | damianfral/soundchorden | src/Scale.hs | mit | 1,209 | 0 | 11 | 505 | 445 | 231 | 214 | 26 | 1 |
module Main where
import System.Environment (getProgName)
import System.IO (hPutStrLn, stderr)
import Client (getServerStatus, serverCommand, stopServer)
import CommandArgs
import Daemonize (daemonize)
import Server (startServer, createListenSocket)
import Types (Command(..))
defaultSocketFilename :: FilePath
defaul... | dan-t/hdevtools | src/Main.hs | mit | 2,399 | 0 | 12 | 547 | 803 | 393 | 410 | 59 | 6 |
module Graphics.CG.Draw.Triangle where
import Graphics.CG.Draw.Lines
import Graphics.CG.Primitives.Triangle
import Graphics.Gloss
drawTriangle :: Triangle -> Picture
drawTriangle (a, b, c) = drawClosedLines [a, b, c]
| jagajaga/CG-Haskell | Graphics/CG/Draw/Triangle.hs | mit | 249 | 0 | 6 | 55 | 65 | 41 | 24 | 6 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
module PredictionsByStop where
import System.Exit (exitFailure, exitSuccess)
im... | thesietch/homOS | homOS-backend/src/PredictionsByStop.hs | mit | 5,471 | 0 | 21 | 1,151 | 1,439 | 804 | 635 | 100 | 1 |
module Quark.QuoteUtils where
import Quark.Type
import qualified Data.Sequence as Seq
import qualified Data.Set as Set
import Data.Foldable (toList)
--- Quote Utilities ---
-- checks if a QItem is a QFunc
isFunc :: QItem -> Bool
isFunc (QFunc _) = True
isFunc _ = False
-- returns the AtomSet of a QProg (non recurs... | henrystanley/Quark | Quark/QuoteUtils.hs | cc0-1.0 | 1,703 | 0 | 12 | 330 | 538 | 281 | 257 | 35 | 2 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE InstanceSigs #-}
module Course.Extend where
import Course.Core
import Course.Id
import Course.List
import Course.Optional
import Course.Functor
-- | All instances of the `Extend` type-class must satisfy one law. This law
-- is not c... | harrisi/on-being-better | list-expansion/Haskell/course/src/Course/Extend.hs | cc0-1.0 | 1,853 | 0 | 10 | 433 | 309 | 183 | 126 | 42 | 1 |
module HeelGenerators.SandalsToe(sandalToeDebugToFile, sandalToeStlToFile ) where
import TriCad.MathPolar(
slopeAdjustedForVerticalAngle,
createTopFaces,
createBottomFacesSimplified,
radiusAdjustedForZslope,
xyQuadrantAngle,
createCornerPoint,
Slope(..),
Radius(..),
Angle(..),
flatXSlope,
flatYSl... | heathweiss/Tricad | src/Examples/ShoeLift/SandalsToe.hs | gpl-2.0 | 7,407 | 0 | 11 | 1,247 | 1,783 | 1,027 | 756 | 186 | 1 |
{---------------------------------------------------------------------}
{- Copyright 2015 Nathan Bloomfield -}
{- -}
{- This file is part of Feivel. -}
{- ... | nbloomf/carl | src/Carl/Orders.hs | gpl-3.0 | 1,572 | 0 | 10 | 613 | 222 | 124 | 98 | 11 | 1 |
module QFeldspar.Prelude.MiniFeldspar
(Dp,Syn(..),toExpF,frmExpF,Type,Num,EqE,OrdE,Fractional,conF,
Word32,Float,Bool,pattern TrueE,pattern FalseE,(?),while,fst,snd,
Ary,mkArr,lnArr,ixArr,Vec(..),share,Complex,pattern (:+.),
Opt,some,none,option,
(*),(+),(-),(==.),(<.),save,
realPartE,imagPartE,divE,(/... | shayan-najd/QFeldspar | QFeldspar/Prelude/MiniFeldspar.hs | gpl-3.0 | 6,934 | 2 | 16 | 1,929 | 3,397 | 1,801 | 1,596 | -1 | -1 |
{-# language NoMonomorphismRestriction #-}
module FAnormalize
( normalizeBDFA
, normalizeTNFA
)
where
import FAmap
import FAtypes
import Ids
import Options
import FiniteMap
import Set
normalizeTNFA :: Ord a => Opts -> TNFA a -> TNFA Int
normalizeTNFA opts a @ (TNFA cons all starts moves) =
let fm = list... | jwaldmann/rx | src/FAnormalize.hs | gpl-3.0 | 702 | 2 | 13 | 178 | 245 | 123 | 122 | 20 | 1 |
--------------------------------------------------------------------------
-- Common operations on types
--------------------------------------------------------------------------
module Operations(
-- * Generalization, skolemization and instantiation
generalize
... | alvisespano/Lw | extras/hml-prototype/Operations.hs | gpl-3.0 | 18,574 | 0 | 24 | 7,045 | 4,868 | 2,373 | 2,495 | 394 | 7 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-cloudscheduler/gen/Network/Google/Resource/CloudScheduler/Projects/Locations/Get.hs | mpl-2.0 | 4,520 | 0 | 15 | 1,021 | 695 | 406 | 289 | 100 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-mirror/gen/Network/Google/Resource/Mirror/Settings/Get.hs | mpl-2.0 | 2,724 | 0 | 12 | 613 | 303 | 188 | 115 | 45 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-bigquerydatatransfer/gen/Network/Google/Resource/BigQueryDataTransfer/Projects/Locations/DataSources/CheckValidCreds.hs | mpl-2.0 | 7,093 | 0 | 16 | 1,457 | 794 | 468 | 326 | 125 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Instances/GetScreenshot.hs | mpl-2.0 | 3,807 | 0 | 17 | 886 | 470 | 280 | 190 | 76 | 1 |
module Scanner where
import Data.List
import Data.Char
import Text.ParserCombinators.Parsec hiding (token, tokens)
import Control.Applicative ((<*), (*>), (<$>), (<*>))
data Token = Identifier String
| SConstant String
| IConstant Integer
| Operator
| Var
| Function
| If
| Else
| While
| Do
| ... | lolepezy/hajs | src/Scanner.hs | unlicense | 2,348 | 0 | 12 | 610 | 929 | 525 | 404 | 71 | 1 |
-- |
-- Module : DMSS.Storage.TH
-- License : Public Domain
--
-- Maintainer : daveparrish@tutanota.com
-- Stability : experimental
-- Portability : untested
--
-- Dead Man Switch System storage schema
--
{-# LANGUAGE GADTs #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE T... | dmp1ce/DMSS | src-lib/DMSS/Storage/TH.hs | unlicense | 1,241 | 0 | 7 | 364 | 66 | 47 | 19 | 9 | 0 |
-----------------------------------------------------------------------------
-- Copyright 2019, Ideas project team. This file is distributed under the
-- terms of the Apache License 2.0. For more information, see the files
-- "LICENSE.txt" and "NOTICE.txt", which are included in the distribution.
-----------------... | ideas-edu/ideas | src/Ideas/Text/HTML.hs | apache-2.0 | 9,173 | 0 | 18 | 2,755 | 2,972 | 1,581 | 1,391 | 188 | 11 |
-- insertion sort
is k [] = [k]
is k (x:xs)
| k <= x = (k:x:xs)
| otherwise = x:(is k xs)
ans n i x
| n == i = []
| otherwise =
let k = x!!i
t = drop (i+1) x
h = is k $ take i x
r = h ++ t
in
(r:ans n (i+1) r)
main = do
n <- getLine
i <- getLine
let n' = read... | a143753/AOJ | ALDS1_1_A.hs | apache-2.0 | 442 | 0 | 12 | 180 | 283 | 138 | 145 | 19 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Data.Geometry.ClipSpec where
import qualified Control.Monad as ControlMonad
import qualified Data.Aeson as Aeson
import qualified Data.Geometry.VectorTile.VectorTile as VectorTile
import qualified Data.Geospatial ... | sitewisely/zellige | test/Data/Geometry/ClipSpec.hs | apache-2.0 | 13,968 | 0 | 16 | 1,677 | 4,297 | 2,414 | 1,883 | 186 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveDataTypeable #-}
-----------------------------------------------------------------------------
--
-- Module : Database
-- Copyright :
-- License : AllRightsReserved
--
-- Maintainer :
-- Stability :
-- Portability :
--
-- ... | uvNikita/FileService | src/Database.hs | apache-2.0 | 2,480 | 0 | 11 | 594 | 817 | 450 | 367 | 71 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Kubernetes.V1.EnvVar where
import GHC.Generics
import Data.Text
import Kubernetes.V1.EnvVarSource
import qualified Data.Aeson
-- | EnvVar repr... | minhdoboi/deprecated-openshift-haskell-api | kubernetes/lib/Kubernetes/V1/EnvVar.hs | apache-2.0 | 1,166 | 0 | 9 | 187 | 106 | 65 | 41 | 17 | 0 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RecordWildCards #-}
module PrivateCloud.Aws.Monad where
import Aws.Aws
import Aws.Core
import Aws.S3.Core
import Control.Exception.Safe
import Control.Monad.IO.Class
import Control.Monad.Trans.Reader
import Control.Monad.Trans.R... | rblaze/private-cloud | src/PrivateCloud/Aws/Monad.hs | apache-2.0 | 965 | 0 | 9 | 163 | 238 | 138 | 100 | 29 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-| This module takes compute graph and turns them into a string representation
that is easy to display using TensorBoard. See the python and Haskell
frontends to see how to do that given the string representa... | tjhunter/karps | haskell/src/Spark/Core/Internal/Display.hs | apache-2.0 | 2,926 | 0 | 17 | 480 | 865 | 499 | 366 | 55 | 1 |
-- http://www.codewars.com/kata/515e271a311df0350d00000f
module SquareSum where
squareSum :: [Integer] -> Integer
squareSum = sum . map (^2) | Bodigrim/katas | src/haskell/6-Squaren-Sum.hs | bsd-2-clause | 141 | 0 | 7 | 16 | 33 | 20 | 13 | 3 | 1 |
{-# LANGUAGE BangPatterns #-}
-- | Replace a string by another string
--
-- Tested in this benchmark:
--
-- * Search and replace of a pattern in a text
--
module Benchmarks.Replace
( benchmark
, initEnv
) where
import Test.Tasty.Bench (Benchmark, bgroup, bench, nf)
import qualified Data.ByteString.Char8 as... | bos/text | benchmarks/haskell/Benchmarks/Replace.hs | bsd-2-clause | 1,597 | 0 | 12 | 376 | 517 | 289 | 228 | 37 | 1 |
module Text.RSS.Import.Tests where
import Test.HUnit (Assertion, assertEqual)
import Test.Framework (Test, mutuallyExclusive, testGroup)
import Test.Framework.Providers.HUnit (testCase)
import Text.RSS.Import
import Text.RSS.Syntax
import Text.XML.Light as XML
import Text.RSS.Utils (createContent, createQName)
import ... | danfran/feed | tests/Text/RSS/Import/Tests.hs | bsd-3-clause | 2,384 | 0 | 17 | 640 | 525 | 301 | 224 | 46 | 1 |
module TGA(createTGA,putTGApixels)
where
import System.IO
import qualified Data.ByteString as B
import Data.Word
pixeltopacked (u,v,w) =
B.pack (
[fromIntegral (w `mod` 256),
fromIntegral (v `mod` 256),
fromIntegral (u `mod` 256)]::[Word8]
)
createTGA :: String -> (Int, Int) -> IO Handle
crea... | hacxman/renderer | TGA.hs | bsd-3-clause | 1,713 | 24 | 14 | 392 | 737 | 376 | 361 | 43 | 2 |
import System.IO
import Databases
| davbaumgartner/flaskell | src/WebServer/Tempdb.hs | bsd-3-clause | 35 | 0 | 4 | 5 | 9 | 5 | 4 | 2 | 0 |
{-# OPTIONS -fno-warn-tabs #-}
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and
-- detab the module (please do the detabbing in a separate patch). See
-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
-- fo... | nomeata/ghc | compiler/nativeGen/RegAlloc/Graph/SpillCost.hs | bsd-3-clause | 8,068 | 173 | 17 | 1,760 | 1,528 | 854 | 674 | 144 | 4 |
----------------------------------------------------------------------------
-- |
-- Module : Data.KeyMap
-- Copyright : (c) Sergey Vinokurov 2016
-- License : BSD3-style (see LICENSE)
-- Maintainer : serg.foo@gmail.com
-- Created : Monday, 19 September 2016
----------------------------------------... | sergv/tags-server | src/Data/KeyMap.hs | bsd-3-clause | 4,785 | 0 | 13 | 1,063 | 1,982 | 1,043 | 939 | 121 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ViewPatterns #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.HABSim.Grib2.CSVParse.Types
-- Copyright : (C) 2017 Ricky Elrod
-- License : (see project LICENSE file)
-- Maintainer : Ricky Elrod <ricky@elrod.... | kg4sgp/habsim | haskell/src/Data/HABSim/Grib2/CSVParse/Types.hs | bsd-3-clause | 4,787 | 0 | 25 | 1,144 | 981 | 561 | 420 | 81 | 0 |
module Shared where
import qualified Prelude
import Feldspar.Multicore
n' :: Word32
n' = 4
n :: Data Word32
n = value n'
shared :: Multicore ()
shared = do
s0 <- allocSem 0
b0 <- allocSArr n'
s1 <- allocSem 1
b1 <- allocLArr 1 n'
s2 <- allocSem 2
b2 <- allocSArr n'
onHost $ do
i... | kmate/raw-feldspar-mcs | examples/Shared.hs | bsd-3-clause | 1,922 | 0 | 19 | 670 | 820 | 402 | 418 | 61 | 2 |
module Grammar where
import qualified Data.Map.Strict as DataMap
import qualified Data.Set as DataSet
data Expr a = Empty
| EmptySet
| Internal a
| Call a (Expr a)
| Return a
| Or (Expr a) (Expr a)
| And (Expr a) (Expr a)
| Not (Expr a)
| Concat (Expr a) (Expr a)
| Interleave (Expr... | katydid/nwe | src/Grammar.hs | bsd-3-clause | 3,440 | 0 | 9 | 839 | 1,320 | 666 | 654 | 68 | 2 |
import Criterion.Main
import Control.Applicative
import Control.Monad
import Control.Monad.ST
import qualified Data.Sequence as S
import qualified Data.Vector as V
import Data.Random.Distribution.Uniform as Uni
import Data.Random
import Math.Probable.Random as Pr
import System.Random.MWC.Monad as MWC
import System... | nsmryan/Misc | bench/Bench.hs | bsd-3-clause | 15,222 | 0 | 21 | 4,382 | 4,134 | 2,042 | 2,092 | 238 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module ParserSpec where
import qualified Data.Attoparsec.Text as A
import Parser.PropType
import Test.HUnit
import Types.PropTypes as P
testParseInstanceOf = do
let parsedValue = A.parseOnly parseInstanceOf "instanceOf(Date)"
assertEqual "succ... | tpoulsen/generate-component | test/ParserSpec.hs | bsd-3-clause | 2,825 | 0 | 15 | 436 | 610 | 301 | 309 | 43 | 1 |
{-# LANGUAGE TypeSynonymInstances #-}
-- | Parses the input string into Haskell data.
-- Uses a parser combinator library called "Parsec",
-- which is commonly used in production code.
-- "Parsec" parsers produce good error messages
-- when given malformed input.
-- The style in which it's used is known as ap... | garethrowlands/marsrover | src/Parser.hs | bsd-3-clause | 3,240 | 0 | 12 | 679 | 551 | 295 | 256 | 45 | 1 |
{-# LANGUAGE GADTs, FlexibleInstances #-}
-- | I Tags rappresentano le coordinate dei prodotti. Quando vogliamo selezionare un prodotto indichiamo un sottoinsieme dei suoi tags. Un insieme vuoto di tags seleziona qualsiasi prodotto.
-- Un valore Tags è utilizzato come selettore o definizione, matematicamente identici ... | paolino/consumattori | Tags.hs | bsd-3-clause | 1,918 | 2 | 10 | 358 | 560 | 302 | 258 | -1 | -1 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, ExistentialQuantification,
TemplateHaskell, RecordWildCards, FlexibleContexts #-}
-- |This module exports basic WD actions that can be used to interact with a
-- browser session.
module Test.WebDriver.Commands
( -- * Sessions
createSessio... | plow-technologies/hs-webdriver | src/Test/WebDriver/Commands.hs | bsd-3-clause | 33,455 | 0 | 13 | 7,676 | 7,073 | 3,739 | 3,334 | 455 | 3 |
-- #hide
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.GLboolean
-- Copyright : (c) Sven Panne 2002-2005
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer : sven.panne@aedion.de
-- Stability ... | FranklinChen/hugs98-plus-Sep2006 | packages/OpenGL/Graphics/Rendering/OpenGL/GL/GLboolean.hs | bsd-3-clause | 860 | 0 | 6 | 115 | 89 | 57 | 32 | 7 | 1 |
{- |
Module : $Header$
Description : The propositional formula and the operations on it.
Copyright : (c) Till Theis
License : MIT
Maintainer : Till Theis <theis.till@gmail.com>
Stability : experimental
Portability : portable
This is the main module which implements the propositional 'Formula' typ... | tilltheis/propositional-logic | src/PropositionalLogic/Logic.hs | bsd-3-clause | 20,255 | 0 | 14 | 4,813 | 5,325 | 2,801 | 2,524 | 263 | 12 |
module AnsiToPrompt (
main
) where
import Control.Monad.State.Strict as S
import qualified Control.Monad.State.Strict (State)
import System.Environment (getArgs)
main :: IO ()
main = do
args <- getArgs
let pt = case args of
["--bash"] -> Bash
["--haskeline"] -> Haskeline
... | thomaseding/ansi2prompt | src/AnsiToPrompt.hs | bsd-3-clause | 1,348 | 0 | 20 | 474 | 410 | 208 | 202 | 41 | 7 |
module Main where
import System.Random (newStdGen)
import Lib
main :: IO ()
main = do
gen <- newStdGen
let w = 20
h = 12
maze = createMaze gen w h
soln = solveMaze maze (1, 1) (w, h)
putStr . renderMaze maze $ soln
| ford-prefect/haskell-maze | app/Main.hs | bsd-3-clause | 242 | 0 | 11 | 72 | 103 | 55 | 48 | 11 | 1 |
{-# OPTIONS_HADDOCK hide #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.IOState
-- Copyright : (c) Sven Panne 2002-2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- P... | hesiod/OpenGL | src/Graphics/Rendering/OpenGL/GL/IOState.hs | bsd-3-clause | 1,947 | 0 | 12 | 377 | 613 | 332 | 281 | 33 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.