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 ViewPatterns, ScopedTypeVariables, FlexibleContexts #-}
module Language.SecreC.TypeChecker.Statement where
import Language.SecreC.Vars
import Language.SecreC.Utils as Utils
import Language.SecreC.Monad
import Language.SecreC.Syntax
import Language.SecreC.Parser.Tokens
import Language.SecreC.Pretty
import... | haslab/SecreC | src/Language/SecreC/TypeChecker/Statement.hs | gpl-3.0 | 19,705 | 0 | 19 | 4,401 | 7,413 | 3,572 | 3,841 | 340 | 5 |
-- This file contains implementation of some commonly used kernel functions. Most recommended one is radial basis kernel.
{-# OPTIONS_GHC -XBangPatterns #-} -- For bang in function arguements to avoid laziness
module Svm.Kernel_functions where
import Data.List (foldl')
{- Kernel function gives inne... | rahulaaj/ML-Library | src/Svm/Kernel_functions.hs | gpl-3.0 | 2,383 | 15 | 11 | 434 | 665 | 367 | 298 | 22 | 1 |
module E2ASM.Assembler.Instruction
( Instruction(..)
) where
import qualified Data.Data as D
data Instruction
-- Moving
= LDI
| LDM
| STM
-- Arithmetic
| ADD
| ADDI
| SUB
| SUBI
| SR
| SL
| NEG
-- Bitwise
| AND
| OR
| XOR
| NOT
-- Predicate bitwise
| PAND
| POR
| PXOR
| P... | E2LP/e2asm | src/E2ASM/Assembler/Instruction.hs | gpl-3.0 | 460 | 0 | 7 | 156 | 132 | 88 | 44 | 32 | 0 |
{-|
Description : Parametrization of formatting
-}
module Language.Haskell.Formatter.Style
(Style, lineLengthLimit, ribbonsPerLine, successiveEmptyLinesLimit,
classIndentation, doIndentation, caseIndentation, letIndentation,
whereIndentation, onsideIndentation, orderImportDeclarations,
or... | evolutics/haskell-formatter | src/library/Language/Haskell/Formatter/Style.hs | gpl-3.0 | 4,784 | 0 | 12 | 1,248 | 912 | 532 | 380 | 94 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/UpdateStack.hs | mpl-2.0 | 15,244 | 0 | 10 | 3,081 | 1,565 | 946 | 619 | 157 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/DescribeSnapshots.hs | mpl-2.0 | 11,202 | 0 | 11 | 2,269 | 1,093 | 681 | 412 | 101 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Decommission.hs | mpl-2.0 | 7,069 | 0 | 18 | 1,587 | 949 | 557 | 392 | 131 | 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/TargetPools/RemoveInstance.hs | mpl-2.0 | 5,489 | 0 | 19 | 1,254 | 636 | 378 | 258 | 101 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/Insert.hs | mpl-2.0 | 3,649 | 0 | 14 | 813 | 394 | 240 | 154 | 62 | 1 |
func | True = x
| lspitzner/brittany | data/Test87.hs | agpl-3.0 | 16 | 0 | 7 | 5 | 12 | 5 | 7 | 1 | 1 |
{-# LANGUAGE RankNTypes #-}
module Haskell.Codewars.Church where
import Prelude hiding (succ, pred, fst, snd)
pred :: Number -> Number
pred (Nr n) = Nr $ \f x -> n (\h g -> g $ h f) (\_ -> x) id
subt :: Number -> Number -> Number
subt f (Nr g) = g pred f
-- cannot be placed in Preloaded right now as there is a bug... | ice1000/OI-codes | codewars/301-400/church-numbers-find-the-predecessor-and-subtract.hs | agpl-3.0 | 1,181 | 0 | 13 | 324 | 656 | 343 | 313 | 33 | 1 |
{-# LANGUAGE GADTs #-}
module OpenCog.Lib where
import OpenCog.AtomSpace
import Foreign.C
import Foreign.Ptr
foreign export ccall "someFunc"
c_func :: Ptr AtomSpaceRef -> UUID -> IO (UUID)
c_func = exportFunction someFunc
someFunc :: Atom -> AtomSpace Atom
someFunc a = pure a
| ceefour/atomspace | tests/haskell/executionTestLib/src/OpenCog/Lib.hs | agpl-3.0 | 285 | 0 | 9 | 49 | 82 | 44 | 38 | 10 | 1 |
module StearnsWharf.Materials where
import Data.Ratio (Ratio)
data Material = Wood {
emodulus,
mySigma,
myTau :: Double,
glulam :: Bool, -- ^ Limtre == True
stClass :: String -- ^ Strength Class
... | baalbek/stearnswharf | src/StearnsWharf/Materials.hs | lgpl-3.0 | 722 | 0 | 9 | 384 | 116 | 78 | 38 | 17 | 0 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-|
Module : Haskoin.Keys.Common
Copyright : No rights reserved
L... | haskoin/haskoin | src/Haskoin/Keys/Common.hs | unlicense | 5,939 | 0 | 17 | 1,690 | 1,341 | 717 | 624 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GADTs #-}
module MyTypeFamilies where
import Data.IORef
import Control.Applicative
import Data.Foldable (forM_)
import Control.Concurrent.STM
import Control.Concurrent.MVar
class IOStore store where
newIO :: a -> IO (store a)
getIO :... | songpp/my-haskell-playground | src/MyTypeFamilies.hs | apache-2.0 | 1,143 | 0 | 13 | 253 | 427 | 218 | 209 | 39 | 1 |
addThree :: Int -> Int -> Int -> Int
addThree x y z = x + y + z
addThree' :: Int -> Int -> Int -> Int
addThree' = \x -> \y -> \z -> x + y + z
| EricYT/real-world | src/chapter-13/addThree.hs | apache-2.0 | 144 | 0 | 9 | 43 | 83 | 44 | 39 | 4 | 1 |
{-# LANGUAGE PackageImports #-}
-- | A generic caching interface.
--
-- The intent is to support many concrete implementations,
-- and to use specify caching policies using combinators.
--
-- Note that even though we _support_ many concrete implementations,
-- for simplicity we only provide one based on an association-... | gelisam/hawk | src/Data/Cache.hs | apache-2.0 | 6,323 | 0 | 15 | 1,884 | 1,624 | 881 | 743 | 97 | 3 |
{-# LANGUAGE TemplateHaskell #-}
{-| Unittests for the job queue functionality.
-}
{-
Copyright (C) 2012, 2013 Google Inc.
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 sourc... | mbakke/ganeti | test/hs/Test/Ganeti/JQueue.hs | bsd-2-clause | 12,016 | 0 | 19 | 3,121 | 2,505 | 1,289 | 1,216 | 203 | 2 |
module Handler.Profile
( getProfileR
, getEditProfileR
, postEditProfileR
) where
import Import
import Yesod.Auth -- TODO
import Yesod.Comments.Management -- TODO
import Data.Maybe (fromMaybe)
import Helpers.Profile
import Network.Gravatar
getProfileR :: Handler RepHtml
getProfileR = do
(Entity _ ... | pbrisbin/devsite | Handler/Profile.hs | bsd-2-clause | 1,269 | 0 | 12 | 368 | 358 | 179 | 179 | 38 | 2 |
module BrownPLT.TypedJS.ReachableStatements
( unreachableStatements
) where
import BrownPLT.TypedJS.Prelude
import qualified Data.Set as S
import qualified Data.Graph.Inductive as G
import Data.Graph.Inductive.Query.BFS (bfs)
import BrownPLT.JavaScript.Analysis
import BrownPLT.JavaScript.Analysis.Intraprocedural
i... | brownplt/strobe-old | src/BrownPLT/TypedJS/ReachableStatements.hs | bsd-2-clause | 1,101 | 0 | 14 | 214 | 322 | 185 | 137 | 23 | 2 |
module Distribution.Client.Dependency.Modular.Preference where
-- Reordering or pruning the tree in order to prefer or make certain choices.
import qualified Data.List as L
import qualified Data.Map as M
import Data.Monoid
import Data.Ord
import Distribution.Client.Dependency.Types
( PackageConstraint(..), Package... | alphaHeavy/cabal | cabal-install/Distribution/Client/Dependency/Modular/Preference.hs | bsd-3-clause | 11,809 | 0 | 19 | 2,930 | 2,830 | 1,456 | 1,374 | 140 | 4 |
module Scurry.NetTask (
NetMsg(..),
netTask,
) where
import Prelude hiding (catch)
import Control.Concurrent
import Control.Concurrent.MVar
import Control.Exception
import Control.Monad
import qualified Data.ByteString.Lazy as B
import Network.Socket hiding (send, sendTo, recv, recvFrom)
import Network.Socke... | sw17ch/Scurry | src/Scurry/NetTask.hs | bsd-3-clause | 2,175 | 0 | 15 | 669 | 725 | 370 | 355 | 62 | 1 |
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# LANGUAGE MultiParamTypeClasses, TypeFamilies, OverloadedStrings, DataKinds, TypeOperators, TypeSynonymInstances, FlexibleInstances, DeriveGeneric #-}
module WebApi.ResponseSpec (spec) where
import GHC.Generics
import WebApi hiding (get, put, post)
import Test.Hspec
impor... | byteally/webapi | webapi/tests/WebApi/ResponseSpec.hs | bsd-3-clause | 5,073 | 0 | 18 | 1,323 | 1,243 | 663 | 580 | -1 | -1 |
{-# LANGUAGE MultiWayIf #-}
module Games.Cribbage where
import Prelude as P
import qualified Data.Map as M
data Suit
= Hearts
| Clubs
| Diamonds
| Spades
deriving (Eq,Show)
data Rank
= Ace
| Two
| Three
| Four
| Five
| Six
| Seven
| Eight
| Nine
| Ten
| Jack
| Queen
| King
deri... | kylcarte/games | src/Games/Cribbage.hs | bsd-3-clause | 1,937 | 0 | 14 | 568 | 933 | 515 | 418 | 77 | 2 |
{-# LANGUAGE DeriveDataTypeable, TypeFamilies, PatternGuards, OverloadedStrings #-}
module Data.FieldML.Level1ToLevel2 (loadL2ModelFromURL) where
import qualified Data.FieldML.Level1Structure as L1
import qualified Data.FieldML.Level2Structure as L2
import Network.Curl
import Data.IORef
import System.FilePath
import C... | A1kmm/declarative-fieldml-prototype | src/Data/FieldML/Level1ToLevel2.hs | bsd-3-clause | 88,654 | 0 | 36 | 21,629 | 23,073 | 11,655 | 11,418 | 1,288 | 17 |
{-
Author: Andrey Mokhov, Newcastle University
Date: 24 December 2012
Contact: andrey.mokhov@{ncl.ac.uk, gmail.com}
Description: Testing Haskell interface to BDDs.
-}
import Predicate
import BDD
import Prelude hiding (not, (&&), (||))
x = variable 0
y = variable 1
z = (variable 2) :: Node Int
x' = not x
y' = not... | tuura/compote | src/haskell/test/test-Predicate.hs | bsd-3-clause | 877 | 3 | 13 | 241 | 392 | 195 | 197 | 28 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Stack.Script
( scriptCmd
) where
import Control.Exception (assert)
import Control.Exception.Safe (throwM)
import Control.Monad (unless, forM)
i... | Fuuzetsu/stack | src/Stack/Script.hs | bsd-3-clause | 12,242 | 0 | 24 | 4,024 | 2,683 | 1,371 | 1,312 | 227 | 9 |
module Races (predictions, predictionsExts) where
import Ultra
import Converters
import Data.Maybe
import PredictionExts
import Interval
import Text.Printf
data Race =
Normal { name :: String
, distance :: Double } |
TimeBased { name :: String
, time :: Double } |
Trail ... | jrosti/ultra | src/Races.hs | bsd-3-clause | 3,734 | 11 | 12 | 1,020 | 1,063 | 565 | 498 | 92 | 4 |
import Graphics.Rendering.Chart
import Data.Colour
import Data.Colour.Names
import Data.Default.Class
import Graphics.Rendering.Chart.Backend.Cairo
import Control.Lens
import System.Environment(getArgs)
setLinesBlue :: PlotLines a b -> PlotLines a b
setLinesBlue = plot_lines_style . line_color .~ opaque blue
chart ar... | visood/bioalgo | src/Chapters/Replication/Patterns/runningCount.hs | bsd-3-clause | 1,179 | 0 | 17 | 318 | 404 | 214 | 190 | -1 | -1 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Rash.Runtime.Process where
import qualified Control.Concurrent.Async as Async
import Control.Exception (throw, try)
import Control.Monad.IO.Class (liftIO)
import qualified Control.Monad.Trans.State as Stat... | pbiggar/rash | src/Rash/Runtime/Process.hs | bsd-3-clause | 5,103 | 0 | 18 | 1,260 | 1,542 | 793 | 749 | 103 | 4 |
{-# LANGUAGE Rank2Types, DefaultSignatures #-}
import Prelude hiding (sum)
import Data.Monoid
import Data.Void
import Control.Applicative
import Control.Monad.Cont
newtype Explore a =
Explore { unExplore :: forall m. Monoid m => Cont m a }
runExplore :: Monoid m => Explore a -> (a -> m) -> m
runExplore = runCont . ... | crypto-agda/explore | explore.hs | bsd-3-clause | 4,205 | 0 | 12 | 933 | 1,630 | 847 | 783 | 90 | 2 |
module Parse.Module (moduleDecl, elmModule) where
import qualified Control.Applicative
import Data.Map.Strict hiding (foldl, map)
import Elm.Utils ((|>))
import Text.Parsec hiding (newline, spaces)
import Parse.Helpers
import Parse.Declaration as Decl
import qualified AST.Declaration
import qualified AST.Module as Mo... | nukisman/elm-format-short | parser/src/Parse/Module.hs | bsd-3-clause | 10,194 | 0 | 18 | 2,788 | 3,281 | 1,679 | 1,602 | 226 | 9 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE DataKinds #-}
module ManageMyTime.Docs.Undecidable where
import Servant.Docs (ToSample, ToCapture(..), DocCapture(..), singleSample, toSamples)
import Servant.API (Capture)
import Database.Persist.Sql (ToBackendKey, Sq... | berdario/managemytime | src/ManageMyTime/Docs/Undecidable.hs | bsd-3-clause | 628 | 0 | 9 | 116 | 156 | 90 | 66 | -1 | -1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Hasbitica.Settings where
import Control.Applicative ((<|>))
import Data.Maybe(listToMaybe,maybeToList)
import Data.Aeson (FromJSON, decode)
import qualifie... | kobeyu/hasbitica | src/Hasbitica/Settings.hs | bsd-3-clause | 1,364 | 0 | 10 | 278 | 346 | 192 | 154 | 31 | 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.
------------------... | rfranek/duckling | Duckling/Ranking/Classifiers/AR.hs | bsd-3-clause | 825 | 0 | 6 | 105 | 66 | 47 | 19 | 8 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ViewPatterns #-}
module Language.Granule.Checker.Checker where
import Control.Monad (unless)
import ... | dorchard/gram_lang | frontend/src/Language/Granule/Checker/Checker.hs | bsd-3-clause | 53,808 | 0 | 25 | 13,421 | 14,602 | 7,552 | 7,050 | 841 | 14 |
-- !!! Bug # 7600.
-- See file T7600 for main description.
{-# LANGUAGE CPP #-}
module T7600_A (test_run) where
import Control.Monad.ST
import Data.Array.Unsafe( castSTUArray )
import Data.Array.ST hiding( castSTUArray )
import Data.Char
import Data.Word
import Numeric
import GHC.Float
#include "ghcconfig.h"
-- Tes... | gcampax/ghc | testsuite/tests/codeGen/should_run/T7600_A.hs | bsd-3-clause | 2,346 | 0 | 13 | 609 | 616 | 325 | 291 | 56 | 4 |
{-# LANGUAGE TupleSections #-}
import Control.Monad (void, forM, when, forever)
import Control.Monad.IO.Class
import Control.Concurrent
import Control.Applicative
import Data.Version
import Data.Char (isSpace)
import Data.Maybe (listToMaybe)
import Data.Ord (comparing)
import Data.List (sortBy,isPrefixOf)
import Syste... | bgamari/hoogle-index | Main.hs | bsd-3-clause | 13,831 | 0 | 25 | 3,993 | 3,629 | 1,807 | 1,822 | 278 | 4 |
{-# LANGUAGE OverloadedStrings #-}
-- | An unframed snappy stream.
--
-- Example encoding of the string "foobar\\n":
--
-- > 00000000 07 18 66 6f 6f 62 61 72 0a |..foobar.|
--
-- Reference: https://github.com/google/snappy/blob/master/format_description.txt
module Codec.Compression.Snappy.Frame... | asayers/snappy-framed | src/Codec/Compression/Snappy/Framed/NoFraming.hs | bsd-3-clause | 833 | 0 | 6 | 142 | 86 | 60 | 26 | 10 | 1 |
{-# LANGUAGE Safe #-}
module Data.FSA.Internal.NodeState (
NodeState,
newState,
terminal,
nonTerminal,
isTerminal,
confluence,
nonConfluence,
isConfluence
) where
import Data.Word (Word8)
import Data.Bits (setBit, testBit, clearBit)
type NodeState = Word8
terminalBit :: Int
termi... | jahaynes/fsa | src/Data/FSA/Internal/NodeState.hs | bsd-3-clause | 1,249 | 0 | 5 | 216 | 236 | 135 | 101 | 31 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE RecordWildCards #-}
import Control.Monad (unless)
import Data.Monoid
import Data.Version (showVersion)
import Options.Applicative
import System.Exit (ExitCode (ExitSuccess), exitWit... | ygale/yesod | yesod-bin/main.hs | mit | 10,979 | 0 | 21 | 4,471 | 2,324 | 1,189 | 1,135 | 185 | 14 |
{- |
Module : ./Syntax/Print_AS_Structured.hs
Description : pretty printing of CASL structured specifications
Copyright : (c) Klaus Luettich, Uni Bremen 2002-2006
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : non-portable(Grot... | spechub/Hets | Syntax/Print_AS_Structured.hs | gpl-2.0 | 10,509 | 0 | 20 | 2,766 | 3,447 | 1,691 | 1,756 | 231 | 26 |
module PrettyJSON
(
renderJValue
) where
import Data.Bits ((.&.), shiftR)
import Numeric (showHex)
import Data.Char (ord)
import Prettify (Doc, (<>), char, double, fsep, hcat, punctuate, text,
compact, pretty)
import SimpleJSON (JValue(..))
renderJValue :: JValue -> Doc
renderJ... | timstclair/experimental | haskell/real_world_haskell/ch05/PrettyJSON.hs | unlicense | 1,883 | 0 | 12 | 560 | 738 | 381 | 357 | 49 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
module Args
( BuildArg(..)
, buildArgs)
where
import System.Console.ParseArgs
-- Command line args for the buildbot.
data BuildArg
= ArgHelp
| ArgVerbose
-- Automated builds
| ArgDaily
| ArgDailyNow
| ArgDailyTomorrow
-- Building GHC and libs.
| ArgScratchDir
| ArgGhc... | mainland/dph | dph-buildbot/src/Args.hs | bsd-3-clause | 7,126 | 310 | 8 | 1,847 | 1,696 | 1,003 | 693 | 183 | 1 |
{-# LANGUAGE TypeFamilies #-}
module Tuura.Concept.Abstract (
Concept (..),
initialConcept, excitedConcept, invariantConcept,
(.&&.), (.||.),
quiescent
) where
import Control.Applicative
-- Abstract concepts
-- * s is the type of states
-- * e is the type of events
data Concept s e = Concept
... | tuura/concepts | src/Tuura/Concept/Abstract.hs | bsd-3-clause | 1,616 | 0 | 10 | 601 | 464 | 264 | 200 | 32 | 1 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Misc
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stability : experimental
-- Portab... | TOSPIO/yi | src/library/Yi/Misc.hs | gpl-2.0 | 9,523 | 0 | 17 | 2,595 | 2,113 | 1,117 | 996 | -1 | -1 |
{-# language GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleInstances,
DeriveDataTypeable, DeriveFunctor, DeriveFoldable, TypeSynonymInstances #-}
-- | version of the save type from 2011-03-25
module Legacy.Old2 where
import Data.Data
import qualified Data.IntMap
import Data.Convertable
import Data.... | geocurnoff/nikki | src/Legacy/Old2.hs | lgpl-3.0 | 2,377 | 0 | 13 | 493 | 726 | 398 | 328 | 57 | 0 |
--
-- Copyright (c) 2012 Citrix Systems, Inc.
--
-- 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 2 of the License, or
-- (at your option) any later version.
--
-- This progra... | jean-edouard/manager | xenmgr/XenMgr/Rpc.hs | gpl-2.0 | 1,863 | 0 | 12 | 424 | 354 | 195 | 159 | 32 | 1 |
{-# LANGUAGE NondecreasingIndentation #-}
-- Implements the \"@.\/cabal sdist@\" command, which creates a source
-- distribution for this package. That is, packs up the source code
-- into a tarball, making use of the corresponding Cabal module.
module Distribution.Client.SrcDist (
sdist,
allPackageS... | thomie/cabal | cabal-install/Distribution/Client/SrcDist.hs | bsd-3-clause | 8,259 | 0 | 20 | 1,870 | 1,637 | 878 | 759 | 131 | 6 |
-- #1814
module ShouldFail where
import Tcfail186_Help
foo = f "hoo" | sdiehl/ghc | testsuite/tests/typecheck/should_fail/tcfail186.hs | bsd-3-clause | 71 | 0 | 5 | 13 | 16 | 10 | 6 | 3 | 1 |
{-# OPTIONS -Wall #-}
{-# LANGUAGE OverloadedStrings #-}
module Data.Maybe.Extra where
-- | When a value is Just, do something with it, monadically.
whenJust :: Monad m => Maybe a -> (a -> m c) -> m ()
whenJust (Just a) m = m a >> return ()
whenJust _ _ = return ()
| plow-technologies/ircbrowse | src/Data/Maybe/Extra.hs | bsd-3-clause | 276 | 0 | 10 | 64 | 91 | 46 | 45 | 6 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TemplateHaskell #-}
module T15572 where
import Language.Haskell.TH
$([d| type AbsoluteUnit1 = '() |])
$(pure [TySynD (mkName "AbsoluteUnit2") [] (ConT '())])
| sdiehl/ghc | testsuite/tests/th/T15572.hs | bsd-3-clause | 200 | 0 | 11 | 28 | 60 | 35 | 25 | 6 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
module Expr where
import Data.Data
import Data.Typeable
import Language.Haskell.TH as TH
import Language.Haskell.TH.Quote
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Char
data Expr = IntExpr Integer
| An... | ezyang/ghc | testsuite/tests/quasiquotation/qq006/Expr.hs | bsd-3-clause | 3,391 | 0 | 14 | 1,109 | 1,180 | 605 | 575 | 88 | 4 |
module A061b where
| urbanslug/ghc | testsuite/tests/driver/A061b.hs | bsd-3-clause | 19 | 0 | 2 | 3 | 4 | 3 | 1 | 1 | 0 |
module Helpers
( getSym
, getKeyState
, getModifiers
, emptyStackSet
, singleton'
, modToWLCMod
) where
import Data.Bits
import qualified Data.Dependent.Map as DMap
import Data.Dependent.Sum
import Data.GADT.Compare
import Data.Set hiding (filter)
import ... | cocreature/reactand | src/Helpers.hs | isc | 1,539 | 0 | 15 | 545 | 376 | 207 | 169 | 46 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Utils (
encode
, ioLogging
, makeContext
, packetLogging
, tlsParams
, Context
, HostName
, PortNumber
) where
import Data.Default.Class (def)
import qualified Data.ByteString.Lazy as BSL
import qualified Crypto.Random.AESCtr as AESCtr
import qualified Network.IRC... | hlian/thomas-hauk | src/Utils.hs | mit | 2,041 | 0 | 14 | 445 | 545 | 311 | 234 | 56 | 1 |
module Nunavut.PropogationSpec where
import Test.Hspec
import Nunavut.Propogation
import Nunavut.Util.Arbitrary ()
import Nunavut.Util.TestUtils
spec :: Spec
spec =
describe "PropData" $
validMonoid (undefined :: PropData)
| markcwhitfield/nunavut | test/Nunavut/PropogationSpec.hs | mit | 232 | 0 | 7 | 33 | 57 | 34 | 23 | 9 | 1 |
-- :l C:\Local\Dev\haskell\learn_chapter4.hs
-- Syntax in Functions (Sintaxe em funções)
-- Pattern matching (correspondência de padrão)
lucky :: (Integral a) => a -> String
lucky 7 = "LUCKY NUMBER SEVEN!"
lucky x = "Sorry, you're out of luck, pal!"
-- A função lucky aceita um argumento que pertence à Typeclass Integ... | feliposz/learning-stuff | haskell/learn_chapter4.hs | mit | 5,759 | 0 | 11 | 1,472 | 1,946 | 1,033 | 913 | 117 | 3 |
module RL.UI.Sprite (
gameSprites,
SpriteEnv(..),
Sprite(..),
SpriteAttr(..),
Color,
toMessage
) where
import RL.Game
import RL.Player
import RL.UI.Common
import RL.Util (enumerate, equating, groupBy')
import Data.Maybe (catMaybes, fromJust, isJust, listToMaybe)
import qualified Data.List as L... | MichaelMackus/hsrl | RL/UI/Sprite.hs | mit | 18,789 | 0 | 21 | 5,571 | 6,989 | 3,512 | 3,477 | 297 | 46 |
{-# LANGUAGE OverloadedLists, ViewPatterns #-}
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.Bipartite.AdjacencyMap
-- Copyright : (c) Andrey Mokhov 2016-2022
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- St... | snowleopard/alga | test/Algebra/Graph/Test/Bipartite/AdjacencyMap.hs | mit | 60,910 | 0 | 20 | 20,018 | 16,940 | 8,331 | 8,609 | -1 | -1 |
{-# htermination id :: a -> a #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_id_1.hs | mit | 34 | 0 | 2 | 8 | 3 | 2 | 1 | 1 | 0 |
-- | Convert linear constraints that only mention one variable to bounds
module Numeric.Limp.Canon.Simplify.Bounder where
import Numeric.Limp.Canon.Constraint
import Numeric.Limp.Canon.Linear
import Numeric.Limp.Canon.Program
import Numeric.Limp.Rep
import Numeric.Limp.Error
import Data.Either
import qualified Data.Ma... | amosr/limp | src/Numeric/Limp/Canon/Simplify/Bounder.hs | mit | 2,150 | 0 | 15 | 632 | 738 | 387 | 351 | 53 | 2 |
{-# htermination (fromIntMyInt :: MyInt -> MyInt) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
data MyInt = Pos Nat | Neg Nat ;
data Nat = Succ Nat | Zero ;
fromIntMyInt :: MyInt -> MyInt
fromIntMyInt x = x;
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/fromInt_3.hs | mit | 271 | 0 | 8 | 65 | 83 | 49 | 34 | 7 | 1 |
-- Name : Lotus Sudoku Solver
-- Author: Sharynne Azhar
-- Description : A Haskell-based solver
-- Updated: 05-02-2016
{-# OPTIONS_HADDOCK prune #-}
module Main where
import Data.List
import Data.List.Split
import Data.Maybe (fromMaybe)
import qualified Data.Map as Map
type Lotus = [Int]
type Solns = [Int]
type Ind... | sharynneazhar/lotus_sudoku | lotus.hs | mit | 8,380 | 0 | 12 | 1,902 | 2,778 | 1,667 | 1,111 | 127 | 2 |
module Main (main) where
import System.Exit
import Control.Monad
import qualified Data.ByteString.Lazy as L
import Client
main :: IO ()
main = do
(success, output) <- client
L.putStr output
unless success exitFailure
| hspec/sensei | driver/seito.hs | mit | 256 | 0 | 8 | 70 | 75 | 42 | 33 | 10 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
-- | Defines what can be a Server's State, and some utility functions for that.
module Hetcons.Hetcons_State
( Hetcons_State
, Participant_State_Var
, Participant_State
, Observer_State_Var
, O... | isheff/hetcons | src/Hetcons/Hetcons_State.hs | mit | 5,456 | 0 | 16 | 1,129 | 989 | 564 | 425 | 73 | 1 |
{-# LANGUAGE RankNTypes, OverloadedStrings #-}
module Main where
import Data.Text as T
import Reflex as Reflex
import Reflex.Host.Class (newEventWithTriggerRef, runHostFrame, fireEvents)
import Control.Monad.Fix (MonadFix)
import Control.Monad.Identity (Identity(..))
import Control.Monad.IO.Class (liftIO)
import Data.I... | deech/fltkhs-reflex-host | src/reflex-host.hs | mit | 4,396 | 0 | 30 | 1,238 | 1,408 | 698 | 710 | 116 | 7 |
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
import Data.Foldable (for_)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Queens (boardString, canAttack)
main :: IO ()
main = hspecWith defaultConfig {configFastFail = True} specs
sp... | exercism/xhaskell | exercises/practice/queen-attack/test/Tests.hs | mit | 3,122 | 0 | 15 | 1,557 | 606 | 361 | 245 | 57 | 1 |
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Hadoop.Protos.NamenodeProtocolProtos.RollEditLogRequestProto (RollEditLogRequestProto(..)) where
import Prelude ((+), (/))
import qualified Prelude as Prelude'
impor... | alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/NamenodeProtocolProtos/RollEditLogRequestProto.hs | mit | 2,898 | 1 | 16 | 533 | 554 | 291 | 263 | 53 | 0 |
import Data.Vector (Vector, generate, slice, toList, fromList, (!), (//))
import Data.Either.Unwrap
import Data.Maybe
import Data.List
import System.IO
data Player = X | O deriving (Eq, Show, Enum)
type Tile = Either Int Player
type Board = Vector Tile
data State = State { board :: Board, player :: Player } deriving (... | Jinxit/mcts | TicTacToe.hs | mit | 2,119 | 0 | 13 | 626 | 901 | 472 | 429 | -1 | -1 |
-----------------------------------------------------------------------------
--
-- Module : Packing
-- Copyright : Armin Kazmi (2015)
-- License : MIT
--
-- Maintainer : Armin Kazmi
-- Stability : experimental
-- Portability : GHC only or compatible
--
-- |
--
--------------------------------------------... | apriori/daak | lib/DAAK/Algorithms/Gamo/Packing.hs | mit | 16,610 | 0 | 16 | 4,187 | 3,263 | 1,816 | 1,447 | 230 | 2 |
module Hiker where
answer :: Int
answer = 6 * 9
isSolution [_] = True
isSolution [_, _] = False
isSolution [_, _, _] = False
isSolution cells = (not (hasDuplicates (map toColumn cells))) && (not (hasDuplicates (map toRow cells))) && (not diag cells)
where toColumn (_,c) = c
toRow(r, _) = r
toD... | murex/murex-coding-dojo | Paris/2015/2015-03-19-EightQueens-Randori-Coffeescript-Haskell/hiker.hs | mit | 422 | 0 | 12 | 94 | 212 | 114 | 98 | 12 | 1 |
--
-- riot/Riot/Entry.hs
--
-- Copyright (c) Tuomo Valkonen 2004-2005.
--
-- 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 2 of the License, or
-- (at your option) any later ve... | opqdonut/riot | Riot/Entry.hs | gpl-2.0 | 14,821 | 0 | 14 | 3,692 | 5,797 | 3,036 | 2,761 | 317 | 7 |
{-# LANGUAGE RecursiveDo #-}
import Probability
import Tree
import Tree.Newick
n_leaves = 3
allStrings = [ c : s | s <- "" : allStrings, c <- ['a','b','c','d','e','f','g','h','i','j'] ]
model = do
tree <- uniform_time_tree 1.0 n_leaves
let ltree = add_labels (take n_leaves allSt... | bredelings/BAli-Phy | tests/prob_prog/sample_tree/4/Main.hs | gpl-2.0 | 825 | 0 | 15 | 242 | 291 | 147 | 144 | 18 | 2 |
module Locals where
import Graphics.X11.Xlib
import XMonad
myFont :: String
myFont = "-*-terminus-*-*-*-*-32-*-*-*-*-*-*-*"
myPromptHeight :: Dimension
myPromptHeight = 50
myBorderWidth :: Dimension
myBorderWidth = 2
myWorkspaces :: [WorkspaceId]
myWorkspaces = ["con","edit","www"] ++ map show [4 .. 9]
| shaohme/home-dir | .xmonad/lib/Locals.hs | gpl-3.0 | 306 | 0 | 7 | 39 | 80 | 49 | 31 | 11 | 1 |
-- problem description:
-- 2 inputs A and B
-- 2 outputs A and B
-- each input data has to be copied to the corresponding output
-- inputs
inA :: [Int]
inA = [4, 5, -1, 9, 8, 5, 6]
inB :: [Int]
inB = [4, -6, 8, 7, 11, 43, 1]
-- expected outputs
outA :: [Int]
outA = [4, 5, -1, 9, 8, 5, 6]
outB :: [Int]
outB = [4, -... | simonced/haskell-kata | tis-100/prob01.hs | gpl-3.0 | 1,247 | 0 | 9 | 280 | 328 | 200 | 128 | 20 | 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/InstanceGroupManagers/DeletePerInstanceConfigs.hs | mpl-2.0 | 5,600 | 0 | 18 | 1,223 | 548 | 325 | 223 | 100 | 1 |
module System.HDFS
( FileSystem
, File
, IOMode(..)
, FileInfo(..)
, withHdfs
, connect
, disconnect
, withFile
, open
, close
, write
, writeL
, flush
, read
, available
, seek
, tell
, pread
, exists
, cp
, mv
, rm
, mv'
, ls
, cwd
, cd
, mkdir
, chown
, ch... | kim/hdfs-haskell | src/System/HDFS.hs | lgpl-3.0 | 7,398 | 0 | 18 | 1,723 | 2,639 | 1,341 | 1,298 | -1 | -1 |
{-# LANGUAGE TypeSynonymInstances, TypeOperators, ViewPatterns, FlexibleInstances, RecordWildCards, FlexibleContexts, OverlappingInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, DeriveDataTypeable, UndecidableInstances, TypeFamilies, ScopedTypeVariables #-}
module Language.Pascal.JVM.CodeGen where
impor... | portnov/simple-pascal-compiler | spc-jvm/Language/Pascal/JVM/CodeGen.hs | lgpl-3.0 | 12,563 | 0 | 23 | 3,241 | 4,221 | 2,033 | 2,188 | 289 | 4 |
{-# LANGUAGE NamedFieldPuns,RecordWildCards #-}
module StearnsWharf.XML.XmlLoads where
import qualified Data.Map as Map
import qualified Text.XML.Light as X
import qualified StearnsWharf.XML.Common as XC
import qualified StearnsWharf.Loads as L
import qualified StearnsWharf.Nodes as N
type LoadDef = (String,L.Load)
... | baalbek/stearnswharf | src/StearnsWharf/XML/XmlLoads.hs | lgpl-3.0 | 2,033 | 0 | 12 | 588 | 676 | 358 | 318 | 43 | 2 |
module Lib where
{-
example follows Henderson (2002)
- constructing images out of recursively-subdivided images
- each image may be modified by a spatial transformation
Basic Building Blocks
-}
data Tile
-- terminal constructors: haskell and church
haskell :: Tile
haskell = undefined
church :: Tile
church = un... | haroldcarr/learn-haskell-coq-ml-etc | haskell/book/2021-05-06-Algebra_Driven_Design-Sandy_Maguire/src/Lib.hs | unlicense | 7,382 | 0 | 9 | 1,696 | 258 | 157 | 101 | -1 | -1 |
-- from http://learnyouahaskell.com/functionally-solving-problems
data Section = Section { getA :: Int, getB :: Int, getC :: Int } deriving (Show)
type RoadSystem = [Section]
data Label = A | B | C deriving (Show)
type Path = [(Label, Int)]
roadStep :: (Path, Path) -> Section -> (Path, Path)
roadStep (pathA, pathB) ... | dkandalov/katas | haskell/shortest-path/shortest-path.hs | unlicense | 1,331 | 0 | 12 | 390 | 467 | 259 | 208 | 28 | 3 |
module Week2.LogAnalysis where
import Data.Char (isSpace)
import Data.List (foldl')
import Data.Maybe (fromMaybe, listToMaybe)
import Week2.Log
-- Ex. 1
parseMessage :: String -> LogMessage
parseMessage line = case line of
'I':rest -> fromMaybe unknown $ maybeReadInfo rest
'W':rest -> fromMaybe unknown $ may... | raphaelnova/cis194 | src/Week2/LogAnalysis.hs | unlicense | 1,934 | 0 | 11 | 421 | 682 | 347 | 335 | 42 | 4 |
module Cryptography.CaesarCipher.BruteBreaker
( bruteBreak
, bruteBreakIO
) where
import Cryptography
import Cryptography.CaesarCipher
bruteBreak :: Alphabet -> String -> [(Int, String)]
bruteBreak alphabet str = zip allPossibleKeys (map (\s -> decode s alphabet str) allPossibleKeys)
where all... | dmitmel/goiteens-hw-in-haskell | Utils/Cryptography/CaesarCipher/BruteBreaker.hs | apache-2.0 | 527 | 0 | 12 | 95 | 167 | 90 | 77 | 10 | 1 |
module Metrics.BoundedDistance
( BoundedDistance(..)
) where
import Algebra.Semiring
data BoundedDistance = BD Int
deriving(Eq)
instance Show BoundedDistance where
show (BD k)
| ( k < intMu ) = show k
| otherwise = "µ"
instance Semiring (BoundedDistance) where
add (BD x) (BD y) = BD (min x y)
zero =... | sdynerow/Semirings-Library | haskell/Metrics/BoundedDistance.hs | apache-2.0 | 565 | 0 | 11 | 157 | 287 | 146 | 141 | 23 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
-- | This is a fairly simple module that just connects the smtp-mail package
-- with the tls package. Hopefully this will make it easier to connect to, say,
-- GMail.
... | erochest/tls-smtp | Network/Mail/SMTP/TLS.hs | apache-2.0 | 5,103 | 0 | 13 | 1,492 | 1,324 | 692 | 632 | 111 | 3 |
import qualified NLP.Skladnica.Extract as E
main :: IO ()
main = do
E.mapMWEs
-- "./data/skladnica-small/"
-- "./data/skladnica-medium/"
"./data/skladnica/"
-- "./data/skladnica/NKJP_1M_7121900001/morph_17-p/"
"./data/walenty/verbs/walenty_2015_05_verbs_verified.txt"
"./data/walenty/expand.... | kawu/skladnica-with-walenty | tmp/test2.hs | bsd-2-clause | 413 | 0 | 8 | 68 | 45 | 26 | 19 | 9 | 1 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-|
Module : Numeric.AERN.RefinementOrder.Arbitrary
Description : random generation of tuples with various relation constraints
Copyright : (c) Michal Kon... | michalkonecny/aern | aern-order/src/Numeric/AERN/RefinementOrder/Arbitrary.hs | bsd-3-clause | 11,974 | 0 | 14 | 3,092 | 2,968 | 1,588 | 1,380 | 239 | 2 |
module Control.Monad.Syntax.Two where
(==<<) :: Monad m =>
(a -> b -> m c)
-> m a
-> b -> m c
(==<<) mf x b = x >>= (`mf` b)
infixl 1 ==<<
(=.<<) :: Monad m =>
(a -> b -> m c)
-> m b
-> a -> m c
(=.<<) mf x a = mf a =<< x
infixl 1 =.<<
| athanclark/composition-extra | src/Control/Monad/Syntax/Two.hs | bsd-3-clause | 288 | 0 | 10 | 117 | 155 | 84 | 71 | 13 | 1 |
{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-}
module Opaleye.Internal.RunQuery where
import Control.Applicative (Applicative, pure, (*>), (<*>), liftA2)
import qualified Database.PostgreSQL.Simple.Cursor as PGSC (Cursor)
import Database.PostgreSQL.Simple.Internal (R... | WraithM/haskell-opaleye | src/Opaleye/Internal/RunQuery.hs | bsd-3-clause | 13,296 | 0 | 15 | 2,340 | 2,343 | 1,314 | 1,029 | 168 | 3 |
module Limonad.Templates.Shortcuts where
import Limonad.Templates.Types
import Limonad.Templates.Parser
import Limonad.Templates.Eval
renderString :: Env -> String -> IO String
renderString env = evaluate env . parseTemplate
renderFile :: Env -> FilePath -> IO String
renderFile env f = readFile f >>= renderSt... | davbaumgartner/limonad | Limonad/Templates/Shortcuts.hs | bsd-3-clause | 328 | 0 | 7 | 50 | 92 | 49 | 43 | 8 | 1 |
module Cassandra.QQ (schema) where
import Data.Generics
import Language.Haskell.TH.Quote
import Language.Haskell.TH
import Cassandra.Schema
schema :: QuasiQuoter
schema = QuasiQuoter { quoteExp = quoteSchemaExp
, quotePat = undefined
, quoteType = undefined
... | bch29/cassandra-th | src/Cassandra/QQ.hs | bsd-3-clause | 652 | 0 | 13 | 204 | 178 | 94 | 84 | 19 | 2 |
module Bertrand.Shell
(Shell,
ShellDesc(..),
ShellStyle(..),
-- ShellCommand,
CommandFunc,
shell,
shellDesc,
shellStyle,
get,
put,
modify,
outputStr,
outputStrLn
) where
import Prelude hiding (putChar, putStr, putStrLn)
import qualified System.IO as ... | fujiy00/bertrand | src/Bertrand/Shell.hs | bsd-3-clause | 3,979 | 0 | 24 | 1,673 | 1,285 | 686 | 599 | 103 | 5 |
module Properties.JsonProperties
( jsonProps
) where
import Data.Aeson
import Test.Tasty
import Test.Tasty.QuickCheck
import Network.Syncthing.Internal
import Properties.JsonArbitrary
import Properties.JsonInstances
type Ei... | jetho/syncthing-hs | tests/Properties/JsonProperties.hs | bsd-3-clause | 2,541 | 0 | 9 | 757 | 673 | 373 | 300 | 44 | 1 |
module Data.CfgTests (tests) where
import qualified Data.Cfg.BnfTests
import qualified Data.Cfg.CyclicTests
import qualified Data.Cfg.EpsilonProductionsTests
import qualified Data.Cfg.FirstSetTests
import qualified Data.Cfg.FollowSetTests
import qualified Data.Cfg.FreeCfgTests
import qualified Data.Cfg.LeftFactorTests... | nedervold/context-free-grammar | tests/Data/CfgTests.hs | bsd-3-clause | 896 | 0 | 7 | 102 | 179 | 123 | 56 | 24 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Appoint.IssueStatus where
import Database.Persist.TH
data IssueStatus = Open | Closed
deriving (Show, Read, Eq)
derivePersistField "IssueStatus"
| rob-b/appoint | src/Appoint/IssueStatus.hs | bsd-3-clause | 192 | 0 | 6 | 28 | 44 | 25 | 19 | 6 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternGuards #-}
module Mafia.Include
( getIncludeDirs
) where
import qualified Data.Text as T
import Mafia.Cabal
import Mafia.IO
import Mafia.Path
import Mafia.Error
import Mafia... | ambiata/mafia | src/Mafia/Include.hs | bsd-3-clause | 1,101 | 0 | 13 | 262 | 306 | 159 | 147 | 34 | 2 |
module Main where
import Control.Monad
import Data.List.Split
import Data.Monoid
import System.Environment
import System.Process
import Latex
import Rep
main :: IO ()
main = do
args <- getArgs
if length args < 2 then
putStrLn "Usage: cross... | oswynb/Crossword-Helper | src/Main.hs | bsd-3-clause | 857 | 0 | 15 | 221 | 225 | 111 | 114 | 24 | 2 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE JavaScriptFFI #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-----------------------------------------------------------------------------
-- |
-- Module : Program.View.GroundMapVie... | achirkin/ghcjs-modeler | src/Program/View/GroundMapView.hs | bsd-3-clause | 7,109 | 15 | 21 | 1,714 | 2,062 | 1,095 | 967 | -1 | -1 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module Main where
import Prolog2
instance TwoD String where
next = (++ " next")
down = (++ " down")
fact1, fact2 :: Fact String String
fact1 = const [Con "likes", Con "wallace", Con "cheese"]
fact2 = const [Con "likes", Con "grommit", Con "c... | YoshikuniJujo/lojysamban | src/testProlog.hs | bsd-3-clause | 2,562 | 14 | 9 | 515 | 1,295 | 681 | 614 | 53 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.